aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-04-03Staging: lustre: integer overflow in ioctlDan Carpenter1-1/+1
hdr->ioc_len is a user controlled u32 so the addition can overflow, especially on 32 bit systems. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-03Staging: lustre: brw_test.c: remove unneeded return statementAchille Aknin1-1/+0
Remove an unneeded return statement in this file Signed-off-by: Achille Aknin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-02staging: lustre: ping_test.c : remove space after function namesAuguste Olivry1-15/+15
remove space between function names and open parentheses as reported by checkpatch.pl. Signed-off-by: Auguste Olivry <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-02Staging: lustre: lov_io.c: remove useless unary plusesLuca Wehrstedt1-2/+2
Replace two occurrences of "+1" with simply "1". Signed-off-by: Luca Wehrstedt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-02iio: light: ltr501: Powerdown device on errorCristina Opriceana1-8/+10
Power down device when an error occurs in order to avoid wasting power. Move powerdown function up to be seen by the new call and align parameters for the ltr501_write_contr() call. Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01staging: dgnc_sysfs: Replace printk(KERN_ERR ) with pr_err()Ioana Ciornei1-1/+1
Fix the following checkpatch warning: WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: lustre: Mark internal functions static in llog_cat.cDarshana Padmadas1-3/+2
This patch marks functions llog_cat_set_first_idx and cat_cancel_cb static as these are used only within this file. Also since cat_cancel_cb is made static do not export it. This eliminates the following sparse warning: warning: symbol * was not declared. Should it be static? Signed-off-by: Darshana Padmadas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: lustre: Mark internal functions as staticDarshana Padmadas1-3/+3
This patch makes functions mgc_logname2resid, mgc_set_info_async and mgc_init static as these are only used internally. This also eliminates sparse warnings of the type: warning: symbol * was not declared. Should it be static? Signed-off-by: Darshana Padmadas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: lustre: Include header file that declares lprocfs_mdc_init_varsDarshana Padmadas1-0/+1
This patch includes the header file mdc_internal.h that declares the function lprocfs_mdc_init_vars. This also eliminates the sparse warning: warning: symbol 'lprocfs_mdc_init_vars' was not declared. Should it be static? Signed-off-by: Darshana Padmadas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: lustre: Include header for functions prototypesDarshana Padmadas1-0/+1
This patch includes the header lustre/include/lclient.h that declares the functions lov_lsm_put and lov_read_and_clear_async_rc defined in lov_object.c. This eliminates warnings reported by sparse: warning: symbol was not declared. Should it be static? Signed-off-by: Darshana Padmadas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: lustre: Add header that declares function lprocfs_lmv_init_varsDarshana Padmadas1-0/+1
This patch includes the header file lmv_internal.h that declares the function lprocfs_lmv_init_vars defined in lproc_lmv.c. This eliminates the sparse warning: warning: symbol 'lprocfs_lmv_init_vars' was not declared. Should it be static? Signed-off-by: Darshana Padmadas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: lustre: Make obd_proc_version_seq_show staticDarshana Padmadas1-1/+1
The function obd_proc_version_seq_show is only used in this file, so make it static. This eliminates the following sparse warning: warning: symbol 'obd_proc_version_seq_show' was not declared. Should it be static? Signed-off-by: Darshana Padmadas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: lustre: Add function prototypes in console.hDarshana Padmadas1-0/+3
Sparse reported the following warnings: warning: symbol 'lstcon_console_init' was not declared. Should it be static? warning: symbol 'lstcon_console_fini' was not declared. Should it be static? warning: symbol 'lstcon_ioctl_entry' was not declared. Should it be static? However since these functions are used in other files, they cannot be made static, so add protoypes for the same in console.h. Signed-off-by: Darshana Padmadas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: rtl8712: Remove zero-testing pointer typed valueAmitoj Kaur Chawla1-1/+1
Removes variable comparison with 0 by using !. Done using following coccinelle script. @ disable is_zero,isnt_zero @ expression *E; expression E1,f; @@ E = f(...) <... ( - E == 0 + !E | - E != 0 + E | - 0 == E + !E | - 0 != E + E ) ...> ?E = E1 @ disable is_zero,isnt_zero @ expression *E; @@ ( E == - 0 + NULL | E != - 0 + NULL | - 0 + NULL == E | - 0 + NULL != E ) Signed-off-by: Amitoj Kaur Chawla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: rtl8712: Remove duplicated argument to |Cristina Opriceana1-2/+1
Delete duplicated argument to | for the state argument in the _clr_fwstate_() function call as it is redundant. Detected with coccinelle. Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: rtl8712: Use memdup_user() instead of copy_from_user()Cristina Opriceana1-7/+3
Use memdup_user() to avoid its duplicated implementation and simplify code. memdup_user() uses GFP_KERNEL instead of GFP_ATOMIC, which is valid because copy_from_user() might sleep and it's useless to make the allocation atomic. Found with coccinelle. Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01iio: magnetometer: mag3110: Place driver on standby on errorCristina Opriceana1-8/+10
Place driver on standby mode on error in order to prevent wasting power. Move standby function above to be seen by the new call. Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: iio: accel: Remove explicit NULL comparisonCristina Opriceana1-3/+3
This patch removes explicit NULL comparison and writes it in its equivalent shorter form. Done with coccinelle. @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: iio: adc: Remove explicit NULL comparisonCristina Opriceana2-2/+2
This patch removes explicit NULL comparison and writes it in its shorter form. Detected with coccinelle. Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: iio: impedance-analyzer: Remove explicit NULL comparisonCristina Opriceana1-1/+1
This patch removes explicit NULL comparison and replaces it with its shorter form. Detected with coccinelle. Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: iio: trigger: Remove explicit NULL comparisonCristina Opriceana1-2/+2
This patch removes explicit NULL comparison and replaces it with its shorter form. Detected with coccinelle. Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: iio: meter: Remove explicit NULL comparisonCristina Opriceana3-3/+3
This patch removes explicit NULL comparison and replaces it with its shorter form. Detected with coccinelle. @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: iio: iio_simple_dummy: Remove explicit NULL comparisonCristina Opriceana2-4/+4
This patch removes explicit NULL comparison and writes it in its simpler form. Done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: iio: iio_dummy_evgen: Simplify NULL comparisonCristina Opriceana1-2/+2
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Staging: iio: Add error check on iio_register_device()Cristina Opriceana1-2/+9
This patch checks if an error occurred on probe and stops the device in order to avoid wasting power. Signed-off-by: Cristina Opriceana <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-04-01Merge tag 'iio-for-4.1b' of ↵Greg Kroah-Hartman18-92/+974
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of new devices, functionality and cleanup for IIO in the 4.1 cycle. New Functionality * Watermark logic for buffers. Allows for blocking reads to block until their requested amount is available - previously they only blocked until a single scan of data was available. Also allows for polling for a watermark amount of data to be available. This feature was first proposed some time ago to good responses, but not taken further by the original author Octavian has picked up the gauntlet and taken it through to merging (along with the hardware fifo support that follows). * New approach to hardware fifo handling - in particular handling the interaction of a hardware fifo feeding into a software fifo and their watershed events. We don't have every possible case well covered yet, but this is certainly a good, flexible starting point. This will replace the previous approach used in ancient drivers (sca3000) where we just exposed the hardware buffer directly to userspace. Very few pieces of hardware have sufficiently long buffers for that to be an adequate solution. * bmc150_accel - hardware fifo support. * mlx90614 - support dual IR sensor devices + some refactoring to clean up the code and allow some other functionality currently under review. * L3GD20H gyroscope support added to the st_gyro driver. * lis3lv02d accelerometer added to the st_gyro driver. Note this part is also supported by the older lis3 driver under misc. A lengthy discussion took place and concluded that holding parts out on the basis that whole driver would be subsumed into this one was counter productive. Better to add part support and add additional features as people need them. Basically there was not advantage in not merging the support. * max517 driver gains support for MAX520 and MAX521 DACs. Documentation * 3.20 -> 4.0 renaming for recent docs. Whilst technically a fix, I think people will cope until the next merge merge window. * An ABI typo hat -> What: More ABIs should have hats. * Document in_rot_offset, illuminance_raw and illuminance_scale. Cleanups * Fix a scale extraction bug in generic_buffer.c example. * Constify a load of device tree related structures.
2015-03-30iio: Documentation: fix kernel version for 4.0 new ABIIrina Tirdea1-10/+10
Kernel version for new ABI in 4.0 has been documented as 3.20, since the changes have been merged before the kernel version number change. Change kernel version from 3.20 to 4.0. Signed-off-by: Irina Tirdea <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-29Documentation/ABI:iio:fix typoMartin Kepplinger1-1/+1
Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-29iio: mlx90614: Support devices with dual IR sensorVianney le Clément de Saint-Marcq1-10/+57
The model is detected by reading the EEPROM configuration during probing. Signed-off-by: Vianney le Clément de Saint-Marcq <[email protected]> Cc: Arnout Vandecappelle (Essensium/Mind) <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-29iio: mlx90614: Add symbols for accessible registersVianney le Clément de Saint-Marcq1-1/+25
Add symbols for all accessible RAM and EEPROM registers, as well as the sleep command and timings defined in the datasheet. Signed-off-by: Vianney le Clément de Saint-Marcq <[email protected]> Cc: Arnout Vandecappelle (Essensium/Mind) <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-29iio: bmc150_accel: add support for hardware fifoOctavian Purdila1-16/+392
We only advertise hardware fifo support if the I2C bus supports full I2C or smbus I2C block data reads since it is mandatory to read the full frame in one read (otherwise the rest of the frame is discarded). The hardware fifo is enabled only when triggers are not active because: (a) when using the any-motion trigger the user expects to see samples based on ROC events, but the fifo stores samples based on the sample frequency (b) the data-ready trigger is waking the CPU for for every sample, so using the hardware fifo does not have any benefit Signed-off-by: Octavian Purdila <[email protected]> Reviewed-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-29iio: add support for hardware fifoOctavian Purdila3-13/+127
Some devices have hardware buffers that can store a number of samples for later consumption. Hardware usually provides interrupts to notify the processor when the FIFO is full or when it has reached a certain watermark level. This helps with reducing the number of interrupts to the host processor and thus it helps decreasing the power consumption. This patch enables usage of hardware FIFOs for IIO devices in conjunction with software device buffers. When the hardware FIFO is enabled the samples are stored in the hardware FIFO. The samples are later flushed to the device software buffer when the number of entries in the hardware FIFO reaches the hardware watermark or when a flush operation is triggered by the user when doing a non-blocking read on an empty software device buffer. In order to implement hardware FIFO support the device drivers must implement the following new operations: setting and getting the hardware FIFO watermark level, flushing the hardware FIFO to the software device buffer. The device must also expose information about the hardware FIFO such it's minimum and maximum watermark and if necessary a list of supported watermark values. Finally, the device driver must activate the hardware FIFO when the device buffer is enabled, if the current device settings allows it. The software device buffer watermark is passed by the IIO core to the device driver as a hint for the hardware FIFO watermark. The device driver can adjust this value to allow for hardware limitations (such as capping it to the maximum hardware watermark or adjust it to a value that is supported by the hardware). It can also disable the hardware watermark (and implicitly the hardware FIFO) it this value is below the minimum hardware watermark. Since a driver may support hardware FIFO only when not in triggered buffer mode (due to different semantics of hardware FIFO sampling and triggered sampling) this patch changes the IIO core code to allow falling back to non-triggered buffered mode if no trigger is enabled. Signed-off-by: Octavian Purdila <[email protected]> Reviewed-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-29iio: add watermark logic to iio read and pollJosselin Costanzi5-27/+131
Currently the IIO buffer blocking read only wait until at least one data element is available. This patch makes the reader sleep until enough data is collected before returning to userspace. This should limit the read() calls count when trying to get data in batches. Co-author: Yannick Bedhomme <[email protected]> Signed-off-by: Josselin Costanzi <[email protected]> [rebased and remove buffer timeout] Signed-off-by: Octavian Purdila <[email protected]> Reviewed-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-28IIO: Add support for L3GD20H gyroscopeRobert Dolca1-0/+83
It can be used exactly like L3GD20 but it has a different WhoAmI register value. Signed-off-by: Robert Dolca <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-28tools: iio: generic_buffer: Fix generic scale extractionIrina Tirdea1-3/+17
When using generic_buffer to read data, the scale is not properly detected for scale shared by type. This is caused by a problem with the generation of generic name out of the full name. E.g.: for current->name in_accel_z, the extracted generic name is "in" (when it should be "in_accel"). This is used in generic_buffer to generate scale and offset paths (in_accel_scale). Consider the in_ or out_ prefix when extracting the generic name from the full name. Signed-off-by: Irina Tirdea <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-28iio: Add ABI documentation for in_rot offset valueHaneen Mohammed1-0/+1
This patch adds ABI documentation entries for in_rot_offset. At least one user for these is present that is the HID Sensors Driver. Signed-off-by: Haneen Mohammed <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-28iio: max517: Add support for MAX520 and MAX521 chips.Antonio Fiol3-16/+42
MAX520 and MAX521 are protocol-compatible with the already supported chips, just have more channels. Signed-off-by: Antonio Fiol <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-28iio: constify of_device_id arrayFabian Frederick1-1/+1
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-28iio: Add ABI documentation for illuminance raw and scale values in lightDarshana Padmadas1-0/+6
This patchset adds ABI documentation for the following attributes: in_illuminance_scale, used atleast once in al3320a staging/iio/light/ in_illuminance_calibscale, used atleast once in cm32181 in_illuminance_input, used in cm3232 at least once in_illuminance_raw used atleast once in al3320a in_illuminance_clear_raw and in_illuminance_ir_raw exposed by gp2ap020a00f with modifiers IIO_MOD_LIGHT_CLEAR and IIO_MOD_LIGHT_IR respectively. Signed-off-by: Darshana Padmadas <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-28iio: st-sensors: add support for lis3lv02d accelerometerLinus Walleij4-0/+87
This adds support for the LIS3LV02 accelerometer found in the ST Microelectronics Nomadik board series. Cc: [email protected] Cc: Denis CIOCCA <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2015-03-27staging: sm750fb: Change "foo * bar" style to "foo *bar"Helen Fornazier1-1/+1
This patch fixes the checkpatch.pl error: ERROR: "foo * bar" should be "foo *bar" +int ddk750_initHw(initchip_param_t * pInitParam) Signed-off-by: Helen Fornazier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27staging: sm750fb: Move switch case trailing statmentHelen Fornazier1-5/+10
This patch fixes the checkpatch.pl error: ERROR: trailing statements should be on next line Signed-off-by: Helen Fornazier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27staging: sm750fb: Add spaces after ','Helen Fornazier1-27/+27
This patch fixes the checkpatch.pl error: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Helen Fornazier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27staging: sm750fb: Add space before switch statementHelen Fornazier1-3/+3
This patch fixes the checkpatch.pl warnings: ERROR: space required before the open parenthesis '(' + switch(divisor) { ERROR: space required before the open parenthesis '(' + switch(divisor) { ERROR: space required before the open parenthesis '(' + switch(reg) { Signed-off-by: Helen Fornazier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27staging: sm750fb: Add space before if statementHelen Fornazier1-7/+7
This patch fix the checkpatch.pl warning: ERROR: space required before the open parenthesis '(' Signed-off-by: Helen Fornazier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27staging: sm750fb: Fix for statement styleHelen Fornazier1-6/+6
This patch fixes the checkpatch.pl warnings: ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<=' (ctx:VxV) ERROR: spaces required around that '>' (ctx:VxV) ERROR: space required before the open parenthesis '(' ERROR: space required after that ';' (ctx:VxV) Signed-off-by: Helen Fornazier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27staging: sm750fb: Fix if/else/for/switch braces styleHelen Fornazier1-49/+26
This patch fixes the checkpatch.pl errors: ERROR: that open brace { should be on the previous line ERROR: else should follow close brace '}' WARNING: braces {} are not necessary for single statement blocks ERROR: space required before the open brace '{' Signed-off-by: Helen Fornazier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27staging: sm750fb: Add space after struct definitionHelen Fornazier1-1/+1
This patch fixes checkpatch.pl warning: WARNING: missing space after struct definition +typedef struct _pllcalparam{ Signed-off-by: Helen Fornazier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27Staging: slicoss: Remove redundant and disabled code blockNiranjan Dighe1-35/+0
Removing code guarded by undefined macro SLIC_TRACE_DUMP_ENABLED Signed-off-by: Niranjan Dighe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-27staging: unisys: remove comparisonSudip Mukherjee1-3/+1
the comparison is always true as the dev_t has been initialized in the init function and we are sending that initialized dev_t to the cleanup(). Signed-off-by: Sudip Mukherjee <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Signed-off-by: Benjamin Romer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>