- 22 2月, 2018 30 次提交
-
-
由 NeilBrown 提交于
Possibly the most interesting is the for-loop with no body. Rearranging and initializing end_dirent on each iteration of the outer while, makes the intent clearer. Reviewed-by: N"Eremin, Dmitry" <dmitry.eremin@intel.com> Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
There is no "struct cfs_crypto_hash_desc" structure. There are only pointers to this structure, which are cast back and forth to struct ahash_request. So discard cfs_crypto_hash_desc, and just use ahash_request directly. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
The only interesting difference between libcfs_kvzalloc() and kvzalloc() is that the former appears to work with GFP_NOFS, which the latter gives a WARN_ON_ONCE() when that is attempted. Each libcfs_kvzalloc() should really be analysed and either converted to a kzalloc() call if the size is never more than a page, or to use GFP_KERNEL if no locks are held. If there is ever a case where locks are held and a large allocation is needed, then some other technique should be used. It might be nice to not always blindly zero pages too... For now, just convert libcfs_kvzalloc() calls to kvzalloc(), and let the warning remind us that there is work to do. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
Using vmalloc with GFP_NOFS is not supported as vmalloc performs some internal allocations with GFP_KERNEL. So in cases where the size passed to libcfs_kvzalloc() is clearly at most 1 page, convert to kzalloc(). In cases where the call clearly doesn't hold any filesystem locks, convert to GFP_KERNEL. Unfortunately there are many more that are not easy to fix. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
This library code is unnecessarily generic, but also not generic enough. Library code that performs allocations should always take a gfp_flags argument. So discard the library and in the one file where it is used, just use kzalloc or krealloc as needed. In this context, it is clear that vmalloc is never needed. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
This function is used precisely once, and is sufficiently trivial that it may as well be open-coded. Doing so helpfully highlights the similarity between the new kvzalloc_node() call and the already existing kzalloc_node() call in the same function. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
cfs_block_sigsinv() and cfs_restore_sigs() are now simple enough to inline them. This means we can discard linux-prim.c Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
According to comment for set_current_blocked() in kernel/signal.c, changing ->blocked directly is wrong. sigprocmask() should be called instead. So change cfs_block_sigsinv() and cfs_restore_sigs() to use sigprocmask(). For consistency, change them to pass the sigset_t by reference rather than by value. Also fix cfs_block_sigsinv() so that it correctly blocks signals above 32 on a 32bit host. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
cfs_block_sigs() is never used. cfs_clear_sigpending() is never used. cfs_block_allsigs() is no longer used. So those three functions can go. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
Both places that cfs_block_allsigs() is used here, the goal is to turn an interruptible wait into an uninterruptible way. So instead of blocking the signals, change TASK_INTERRUPTIBLE to TASK_NOLOAD. In each case, no other functions called while signals are blocked will sleep - just the one that has been fixed. In one case, an extra 'interruptible' flag needs to be passed down so the waiting decision can be made at the right place. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
Threads started by kthread_run() ignore all signals, as kthreadd() calls ignore_signals(), and this is inherited by all children. So there is no need to call cfs_block_allsigs() in functions that are only run from kthread_run(). Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
The only functionality remaining here is cfs_curproc_cap_pack(), and it can be trivially implemented as an inline in curproc.h. So do that and remove the file. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
Each of these functions is used precisely once, so having a separate exported function seems like overkill. cfs_cap_raised() is trivial - one line. cfs_cap_raise() and cfs_cap_lower() are used as a pair which is more effectively implemented with override_cred() / revert_creds(). Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 NeilBrown 提交于
Lustre defines a few CFS_CAP_* macros which are exactly the same as the corresponding CAP_* macro, with one exception. CFS_CAP_SYS_BOOT is 23 CAP_SYS_BOOT is 22. CFS_CAP_SYS_BOOT is only used through CFS_CAP_FS_MASK and causes capability 23 (CAP_SYS_NICE) to be dropped in certain circumstances. It is probable that the intention was to drop CAP_SYS_BOOT, and this is what is now done. CFS_CAP_CHOWN_MASK and CFS_CAP_SYS_RESOURCE_MASK are never used, so they have been removed. Signed-off-by: NNeilBrown <neilb@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christopher Diaz Riveros 提交于
Fix Coccinelle alert: drivers/staging//rtl8188eu/os_dep/usb_intf.c:336:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: NChristopher Diaz Riveros <chrisadr@gentoo.org> Acked-by: NLarry Finger <Larry.Finger@lwfinger.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christopher Diaz Riveros 提交于
Fix Coccinelle alert: drivers/staging//emxx_udc/emxx_udc.c:2689:19-21: WARNING: casting value returned by memory allocation function to (u8 *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: NChristopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christopher Diaz Riveros 提交于
Fix Coccinelle alert: drivers/staging//rtl8723bs/os_dep/sdio_intf.c:340:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: NChristopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christopher Diaz Riveros 提交于
Fix Coccinelle alert: drivers/staging//netlogic/xlr_net.c:996:12-30: WARNING: casting value returned by memory allocation function to (struct xlr_adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: NChristopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Quytelda Kahja 提交于
Fix a coding style problem. Signed-off-by: NQuytelda Kahja <quytelda@tamalin.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Quytelda Kahja 提交于
Convert the unsafe macro into an inline function. Signed-off-by: NQuytelda Kahja <quytelda@tamalin.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Quytelda Kahja 提交于
Convert the unsafe macros into inline functions. Signed-off-by: NQuytelda Kahja <quytelda@tamalin.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Quytelda Kahja 提交于
Convert the unsafe macros into inline functions. Signed-off-by: NQuytelda Kahja <quytelda@tamalin.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dafna Hirschfeld 提交于
Remove 'if' statements testing struct's field address. Since such statements always return true, they are redundant. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Valentin Vidic 提交于
Fixes checkpatch warning: CHECK: Avoid CamelCase: <addressFiltering> Signed-off-by: NValentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Valentin Vidic 提交于
Fixes checkpatch warning: CHECK: Avoid CamelCase: <thresholdDecrement> Signed-off-by: NValentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Valentin Vidic 提交于
Fixes checkpatch warning: CHECK: Avoid CamelCase: <txStartCondition> Signed-off-by: NValentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Eisha Chen-yen-su 提交于
Replace all occurrences of functions' names in strings by a reference to __func__, to improve robustness. Problem found with checkpatch. Signed-off-by: NEisha Chen-yen-su <chenyensu0@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Eisha Chen-yen-su 提交于
Remove a "tracing" call as it is not needed anymore because there is an in-kernel function for that. Signed-off-by: NEisha Chen-yen-su <chenyensu0@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Yisheng Xie 提交于
We will go on initial idev if failed to create debug_root, and it does not matter to check the return value of this debugfs call, just remove it. Signed-off-by: NYisheng Xie <xieyisheng1@huawei.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Yisheng Xie 提交于
There's no need to check the return value of debug_file for it is just a debugfs and we will go on the following process if we failed to create debug_file. So just remove it. Signed-off-by: NYisheng Xie <xieyisheng1@huawei.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 20 2月, 2018 10 次提交
-
-
由 Greg Kroah-Hartman 提交于
Merge tag 'iio-for-4.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First round of new devices, features and cleanups for IIO in the 4.17 cycle. Outside of IIO * Strongly typed 64bit int_sqrt function needed by the mlx90632 New device support * adc081s - New driver supporting adc081s, adc101s and adc121s TI ADCs. * ad5272 - New driver supproting the ad5272 and ad5274 ADI digital potentiometers with DT bindings. * axp20x_adc - support the AXP813 ADC - includes rework patches to prepare for this. * mlx90632 - New driver with dt bindings for this IR temperature sensor. Features * axp20x_adc - Add DT bindings and probing. * dht11 - The sensor has a wider range than advertised in the datasheet - support it. * st_lsm6dsx - Add hardware timestamp su9pport. Cleanups * ABI docs - Update email contact for Matt Ranostay * SPDX changes - Matt Ranostay has moved his drivers over to SPDX. Currently we are making this an author choice in IIO. * ad7192 - Disable burnout current on misconfiguration. No actually effect as they simply won't work otherwise. * ad7476 - Drop a license definition that was replicating information in SPDX tag. * ade7758 - Expand buf_lock to cover both buffer and state protection allowing unintented uses of mlock in the core to be removed. * ade7759 - Align parameters to opening parenthesis. * at91_adc - Depend on sysfs instead of selecting it - for try wide consistency. * ccs811 - trivial naming type for a define. * ep93xx - Drop a redundant return as a result checking platform_get_resource. * hts221 - Regmap conversion which simplifies the driver somewhat. - Clean up some restricted endian cast warnings. - Drop a trailing whitespace from a comment - Drop an unnecessary get_unaligned by changing to the right 16bit data type. * ms5611 - Fix coding style in the probe function (whitespace) * st_accel - Use strlcpy instead of strncpy to avoid potentially truncating a string.
-
由 Liam Mark 提交于
Fix the dup_sg_table function to initialize the dma_address of the new sg list entries instead of the source dma_address entries. Since ION duplicates the sg_list this issue does not appear to result in an actual bug. Signed-off-by: NLiam Mark <lmark@codeaurora.org> Acked-by: NLaura Abbott <labbott@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dafna Hirschfeld 提交于
Replace a call to kmalloc and a call to copy_from_user with a call to memdup_user to simplify the code. Issue found with coccicheck. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Eisha Chen-yen-su 提交于
Split a subtraction across 2 lines in order to make these lines no longer than 80 columns. Problem found with checkpatch. Signed-off-by: NEisha Chen-yen-su <chenyensu0@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Eisha Chen-yen-su 提交于
Split some function calls on several lines in order to make these lines no longer than 80 columns. Problem found with checkpatch. Signed-off-by: NEisha Chen-yen-su <chenyensu0@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ajay Singh 提交于
Fix "Unnecessary parentheses around 'hif_set_mc->cnt'" issue found by checkpatch.pl script. Signed-off-by: NAjay Singh <ajay.kathat@microchip.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ajay Singh 提交于
Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: NAjay Singh <ajay.kathat@microchip.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ajay Singh 提交于
Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: NAjay Singh <ajay.kathat@microchip.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ajay Singh 提交于
Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: NAjay Singh <ajay.kathat@microchip.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ajay Singh 提交于
Fix "Avoid camelCase" issues found by checkpatch.pl script. Signed-off-by: NAjay Singh <ajay.kathat@microchip.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-