- 12 Nov, 2016 6 commits
-
-
Linus Walleij authored
We have #defines for all the individual sensor registers and value/mask pairs #defined at the top of the file and used at exactly one spot. This is usually good if the #defines give a meaning to the opaque magic numbers. However in this case, the semantic meaning is inherent in the name of the C99-addressable fields, and that means duplication of information, and only makes the code hard to maintain since you every time have to add a new #define AND update the site where it is to be used. Get rid of the #defines and just open code the values into the appropriate struct elements. Make sure to explicitly address the .hz and .value fields in the st_sensor_odr_avl struct so that the meaning of all values is clear. This patch is purely syntactic should have no semantic effect. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Linus Walleij authored
We have #defines for all the individual sensor registers and value/mask pairs #defined at the top of the file and used at exactly one spot. This is usually good if the #defines give a meaning to the opaque magic numbers. However in this case, the semantic meaning is inherent in the name of the C99-addressable fields, and that means duplication of information, and only makes the code hard to maintain since you every time have to add a new #define AND update the site where it is to be used. Get rid of the #defines and just open code the values into the appropriate struct elements. Make sure to explicitly address the .hz and .value fields in the st_sensor_odr_avl struct so that the meaning of all values is clear. This patch is purely syntactic should have no semantic effect. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Linus Walleij authored
We have #defines for all the individual sensor registers and value/mask pairs #defined at the top of the file and used at exactly one spot. This is usually good if the #defines give a meaning to the opaque magic numbers. However in this case, the semantic meaning is inherent in the name of the C99-addressable fields, and that means duplication of information, and only makes the code hard to maintain since you every time have to add a new #define AND update the site where it is to be used. Get rid of the #defines and just open code the values into the appropriate struct elements. Make sure to explicitly address the .hz and .value fields in the st_sensor_odr_avl struct so that the meaning of all values is clear. This patch is purely syntactic should have no semantic effect. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Peter Rosin authored
The i2c mux core can then take appropriate action depending on if it is used for an actual i2c mux, or for an arbitrator or gate. In this case it is used as a gate. This will make devicetree bindings simpler when they are eventually added. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Colin Ian King authored
status is a u8 hence the check if status is less than zero has no effect. Fix this by replacing status with int ret so the less than zero compare will correctly detect errors. Issue found with static analysis with CoverityScan, CID 1375919 Signed-off-by: Colin Ian King <colin.king@canonical.com> Fixes: 974e6f02 ("iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub") Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Dan Carpenter authored
We should be testing "ret" here. Fixes: aa16c6bd ("iio:adc: Add support for AD7766/AD7767") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
- 08 Nov, 2016 4 commits
-
-
Arnd Bergmann authored
The new mpu3050 driver fails to build if I2C is disabled: drivers/iio/built-in.o: In function `mpu3050_i2c_driver_exit': mpu3050-i2c.c:(.exit.text+0x17f): undefined reference to `i2c_del_driver' drivers/iio/built-in.o: In function `mpu3050_i2c_driver_init': mpu3050-i2c.c:(.init.text+0x215): undefined reference to `i2c_register_driver' This adds a Kconfig dependency to ensure we only build it when I2C is available. Fixes: 3904b28e ("iio: gyro: Add driver for the MPU-3050 gyroscope") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Arnd Bergmann authored
The newly added mpu3050 driver has two initializations for the module owner, which causes a warning for 'make W=1': include/linux/export.h:37:21: error: initialized field overwritten [-Werror=override-init] drivers/iio/gyro/mpu3050-core.c:749:19: note: in expansion of macro 'THIS_MODULE' This removes one of the two. Fixes: 3904b28e ("iio: gyro: Add driver for the MPU-3050 gyroscope") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Arnd Bergmann authored
Removing a call to the taos_chip_off() makes it unused when CONFIG_PM is disabled: drivers/staging/iio/light/tsl2583.c:438:12: error: ‘taos_chip_off’ defined but not used [-Werror=unused-function] This removes all the #ifdef in this file, and marks the PM functions as __maybe_unused instead, which is more reliable and gives us better compile time coverage. Fixes: 0561155f ("staging: iio: tsl2583: don't shutdown chip when updating the lux table") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Arnd Bergmann authored
The regulator changes assigned data to an uninitialized pointer: drivers/staging/iio/frequency/ad9832.c: In function 'ad9832_probe': drivers/staging/iio/frequency/ad9832.c:214:11: error: 'st' may be used uninitialized in this function [-Werror=maybe-uninitialized] This moves the allocation of the 'st' structure before its first use, as it should have been. Fixes: 43a07e48 ("staging: iio: ad9832: clean-up regulator 'reg'") Fixes: a98461d7 ("staging: iio: ad9832: add DVDD regulator") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
- 07 Nov, 2016 30 commits
-
-
Andrew Kanner authored
Removed redundant declaration of variable 'tx' in local scope Fixed: sparse warning: socklnd_cb.c:2476:41: warning: symbol 'tx' shadows an earlier one socklnd_cb.c:2435:25: originally declared here Signed-off-by: Andrew Kanner <andrew.kanner@gmail.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicholas Hanley authored
This patch fixes all CODE_INDENT checkpatch errors in o2iblnd. Signed-off-by: Nicholas Hanley <nicholasjhanley@gmail.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Oleg Drokin authored
This define only made sense in a userspace library client, not in the kernel. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jinshan Xiong authored
Otherwise, if the race between page fault and truncate occurs, it will cause the page fault routine to return an EIO error. In filemap_fault() { page_not_uptodate: ... ClearPageError(page); error = mapping->a_ops->readpage(file, page); if (!error) { wait_on_page_locked(page); if (!PageUptodate(page)) error = -EIO; } ... } However, I tend to think this is a defect in kernel implementation, because it assumes PageUptodate shouldn't be cleared but file read routine doesn't make the same assumption. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/22827 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8633Reviewed-by: Li Dongyang <dongyang.li@anu.edu.au> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bobi Jam authored
When stride-RA hit case miss, we only reset normal sequential read-ahead window, but not reset the stride IO to avoid the overhead of re-detecting stride IO. While when the normal RA window is set to not insect with the stride-RA window, when we try to increase the stride-RA window length later, the presumption does not hold. This patch resets the stride IO as well in this case. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Reviewed-on: http://review.whamcloud.com/23032 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8683Reviewed-by: wangdi <di.wang@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Amir Shehata authored
cpu_pattern can specify exactly 1 cpu in a partition: "0[0]". That means CPT0 will have CPU 0. CPU 0 can have hyperthreading enabled. This combination would result in weight = cfs_cpu_ht_nsiblings(0); hrp->hrp_nthrs = cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i); hrp->hrp_nthrs /= weight; evaluating to 0. Where cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i) == 1 weight == 2 Therefore, if hrp_nthrs becomes zero, just set it to 1. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Reviewed-on: http://review.whamcloud.com/19106 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8492Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bobi Jam authored
Need to check file's lli_clob object before calling lov_read_and_clear_async_rc(). Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Reviewed-on: http://review.whamcloud.com/23031 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8682Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Patrick Farrell authored
-EAGAIN is a normal return when requesting POSIX flocks. We can't recognize exactly that case here, but it's the only case that should result in -EAGAIN on LDLM_ENQUEUE, so don't print to console in that case. Signed-off-by: Patrick Farrell <paf@cray.com> Reviewed-on: http://review.whamcloud.com/22856 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8658Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hongchao Zhang authored
If there is no request passed into ldlm_cli_enqueue, the enqueue request will not engage ELC to drop unneeded locks. currently, this kind of request is mainly related to EXTENT locks enqueue requests (except for glimpse EXTENT lock for it has an intent). Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com> Reviewed-on: http://review.whamcloud.com/21739 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8209Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Oleg Drokin authored
The function becomes used again with the next patch, so bring it back from dead, only this time make it static. Reverts: bf2a0333 ("staging/lustre/ldlm: Remove unused ldlm_enqueue_pack()") Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andrew Perepechko authored
This patch releases cl_pages on error in ll_write_begin() to avoid memory and object reference leaks. Also, it reuses per-cpu lu_env in ll_invalidatepage() in the same way as done in ll_releasepage(). Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com> Seagate-bug-id: MRP-3504 Reviewed-on: http://review.whamcloud.com/22745 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8509Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jinshan Xiong authored
cl_env hash table is under heavy contention when there are lots of processes doing IO at the same time; reduce lock contention by replacing cl_env cache with percpu array; remove cl_env_nested_get() and cl_env_nested_put(); remove cl_env_reenter() and cl_env_reexit(); Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/20254 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4257Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Niu Yawei authored
Otherwise, those leftovers would interfere with new timestamps especially when the timestamps are set back in time on the other clients. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Niu Yawei <yawei.niu@intel.com> Reviewed-on: http://review.whamcloud.com/22623 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8446Reviewed-by: Bobi Jam <bobijam@hotmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andriy Skulysh authored
PW lock isn't replayed once a lock is marked LDLM_FL_CANCELING and glimpse lock doesn't wait for conflicting locks on the client. So the server will grant a PR lock in response to the glimpse lock request, which conflicts with the PW lock in LDLM_FL_CANCELING state on the client. Lock in LDLM_FL_CANCELING state may still have pending IO, so it should be replayed until LDLM_FL_BL_DONE is set to avoid granted conflicting lock by a server. Seagate-bug-id: MRP-3311 Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com> Reviewed-on: http://review.whamcloud.com/20345 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8175Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hongchao Zhang authored
1, in client_import_del_conn, the export returned from class_conn2export is not released after using it. 2, in ptlrpc_connect_interpret, the export is not released if the connect_flags isn't compatible. Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com> Reviewed-on: http://review.whamcloud.com/22031 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8500Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Oleg Drokin authored
blocking_refs is only used on the server, so drop it on the client. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sergio Paracuellos authored
Blank lines aren't necessary after an open brace '{'. Clean them in p80211req.c source file to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sergio Paracuellos authored
Avoid no necessary parentheses to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sergio Paracuellos authored
Comparison to NULL could be written in preferred form. Change it to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sergio Paracuellos authored
After open brace or before close brace blank lines are not really necessary. Remove them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sergio Paracuellos authored
Add spaces around or operator to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Maninder Singh authored
This patch fixes the following checkpatch.pl error: ERROR: Macros with complex values should be enclosed in parentheses Signed-off-by: Maninder Singh <maninder.s2@samsung.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nick Rosbrook authored
Running checkpath on card.c shows two locations where multiple assignments are used. This patch modifies the assignments into single assignments. Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Elise Lennion authored
dev_*() functions print identifying information about the struct device and should be used instead of pr_*() whenever possible. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nadim Almas authored
This patch compresses two lines into a single line if immediate return statement is found. Remove variable data as it is no longer needed. It is done using script Coccinelle. And coccinelle uses the following semantic patch for this compression function @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Nadim Almas <nadim.902@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Souptick Joarder authored
There are few functions where we need to free previously allocated memory when kmalloc fails. Else it may lead to memory leakage. In _init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are not freeing previously allocated memory when kmalloc fails. Signed-off-by: Souptick joarder <jrdr.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Wei Yongjun authored
Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ted Chen authored
Fix the following warnings by initializing these variables to zero and add error check to return early when the check returns an error. drivers/staging/comedi/drivers/ni_tio.c: In function ‘ni_tio_set_sync_mode’: drivers/staging/comedi/drivers/ni_tio.c:492:28: warning: ‘ps’ may be used uninitialized in this function [-Wuninitialized] drivers/staging/comedi/drivers/ni_tio.c: In function ‘ni_tio_insn_config’: drivers/staging/comedi/drivers/ni_tio.c:820:2: warning: ‘temp64’ may be used uninitialized in this function [-Wuninitialized] drivers/staging/comedi/drivers/ni_tio.c:811:6: note: ‘temp64’ was declared her Signed-off-by: Ted Chen <tedc.37zngo@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Some more printk warnings snuck in recently, no one seems to be building this on 64bit machines... Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Lee Jones <lee@kernel.org> Cc: Eric Anholt <eric@anholt.net> Cc: Michael Zoran <mzoran@crowfest.net> Cc: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Stefan Wahren authored
The current order during module probe is prone to race conditions: * debugfs entries, sysfs entries, platform code So fix this by swapping the steps debugfs entries and platform code. As a benefit this saves us a clean up step in the error path. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-