- 18 1月, 2015 40 次提交
-
-
由 Jeremiah Mahler 提交于
Remove all custom MIN/MAX and min_t operations since they are no longer needed. Signed-off-by: NJeremiah Mahler <jmmahler@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jeremiah Mahler 提交于
Switch from MIN to min_t and remove the previous cast of the second argument to int. Signed-off-by: NJeremiah Mahler <jmmahler@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jeremiah Mahler 提交于
Switch from MIN to min and fix the new type warning. The warning is produced because a comparison between iov_len, which is a __kernel_size_t, is made to kiov_len, which is an unsigned int (include/linux/lnet/types.h). Fix the warning by casting kiov_len to __kernel_size_t. Signed-off-by: NJeremiah Mahler <jmmahler@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jeremiah Mahler 提交于
Switch from MIN/MAX to min_t/max_t with a size_t type. The size_t type was chosen because one operand is a size_t and all the others are immediate integer values. Signed-off-by: NJeremiah Mahler <jmmahler@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jeremiah Mahler 提交于
Switch from MIN to the built in min_t with the int type. Signed-off-by: NJeremiah Mahler <jmmahler@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jeremiah Mahler 提交于
Custom MIN/MAX operations are being used which are not as robust as the built in min/max operations which will warn about potentially problematic type comparisons. For the simple cases, where no type warning is produced, simply replace MIN/MAX with min/max. Signed-off-by: NJeremiah Mahler <jmmahler@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 samuel kihahu 提交于
Align switch and case to be at the same indent. Signed-off-by: NSamuel Kihahu <skihahu@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
1) The places which called copy_from_user() were returning the number of bytes not copied instead of -EFAULT. 2) The user could trigger a memory leak if the condition "(hdr.ioc_len != data->ioc_len)" was true. Instead of adding a new call to OBD_FREE_LARGE(), I created a free_buf label and changed everything to use that label. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rickard Strandqvist 提交于
Tidied up some code in a case statement after a discussion. This was partly found using a static code analysis program called cppcheck. Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rickard Strandqvist 提交于
Removed an unnecessary NULL check. Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Spencer Baugh 提交于
ptlrpc_internal.h contains the prototypes for sptlrpc_gc_init() and sptlrpc_gc_fini(), which are defined in sec_gc.c. This removes the following sparse warnings: drivers/staging/lustre/lustre/ptlrpc/sec_gc.c:217:5: warning: symbol 'sptlrpc_gc_init' was not declared. Should it be static? drivers/staging/lustre/lustre/ptlrpc/sec_gc.c:241:6: warning: symbol 'sptlrpc_gc_fini' was not declared. Should it be static? Signed-off-by: NSpencer Baugh <sbaugh@andrew.cmu.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rickard Strandqvist 提交于
Removed an unnecessary NULL check. I have checked the only place this function is called from. Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chris Rorvick 提交于
The `mult' parameter is negated if the user data begins with a '-' so that the final value has the appropriate sign. But `mult' is only used if the user data does not include a "units" suffix. In this case, `mult' is overridden with the numeric scale conveyed by the units suffix, but retains the sign of the original value. Having `mult' serving double-duty works but is confusing. Use a new local variable to store the sign of the user data instead. This also fixes a pitfall of passing 0 to `mult', expecting it to be ignored when a units suffix is specified, but having the effect of taking the absolute value of the user-provided data. Signed-off-by: NChris Rorvick <chris@rorvick.com> Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chris Rorvick 提交于
Units can be passed to lprocfs_write_frac_u64_helper() via a suffix (e.g., "...K", "...M", etc.) tacked onto the value. A comment states that "specified units override the multiplier," though the multiplier is overridden regardless. Update the conditional logic so that it only applies when units are specified. Signed-off-by: NChris Rorvick <chris@rorvick.com> Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jia He 提交于
make sparse happy since these two fuchtion are only used in module.c. tested by successful compilation. Signed-off-by: NJia He <hejianet@gmail.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Matthew Tyler 提交于
- Replace body-less for-loop with while loop - Use '\0' for null character instead of 0 Signed-off-by: NMatthew Tyler <matt.tyler@flashics.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Matthew Tyler 提交于
Signed-off-by: NMatthew Tyler <matt.tyler@flashics.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dean Ancajas 提交于
Fixed a brace coding style issue for functions. Signed-off-by: NDean Michael Ancajas <dbancajas@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Fred Chou 提交于
Fixed the below warning in sparse: drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:184:6: warning: symbol 'ptlrpc_lprocfs_register' was not declared. Should it be static? Signed-off-by: NFred Chou <fred.chou.nd@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tristan Lelong 提交于
This patch replace the value '80' used in several files in the lustre source code with a define LUSTRE_MDT_MAXNAMELEN. This value is used in 4 different structures as the maximum len for a service name. According to the comments, these names follow a convention which make it possible to use the same define for LCS, LSS, LCF, and LSF. Signed-off-by: NTristan Lelong <tristan@lelong.xyz> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tristan Lelong 提交于
This patch fix a sparse warning in lustre sources warning: incorrect type in argument 1 (different address spaces) expected void [noderef] <asn:1>*to got char *<noident> This is done by adding the missing __user attribute on userland pointers inside the LPROC_SEQ_FOPS like macros: - LPROC_SEQ_FOPS - LPROC_SEQ_FOPS_RW_TYPE - LPROC_SEQ_FOPS_WR_ONLY - LDLM_POOL_PROC_WRITER The patch also updates all the functions that are used by this macro: - lprocfs_wr_* - *_seq_write as well as some helpers used by the previously modified functions (otherwise fixing the sparse warning add some new ones): - lprocfs_write_frac_helper - lprocfs_write_helper - lprocfs_write_u64_helper The patch also fixes one __user pointer direct dereference by strncmp in function fld_proc_hash_seq_write. Signed-off-by: NTristan Lelong <tristan@lelong.xyz> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Brian Vandre 提交于
Fixes the sparse warning: "warning: symbol 'fld_type_proc_dir' was not declared. Should it be static?" Also removes initialization to NULL. Signed-off-by: NBrian Vandre <bvandre@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Austin Kerbow 提交于
Fix the following checkpatch.pl errors ERROR: else should follow close brace '}' + } + else { ERROR: else should follow close brace '}' + } + else { ERROR: else should follow close brace '}' + } + else { ERROR: else should follow close brace '}' + } + else { ERROR: else should follow close brace '}' + } + else { Signed-off-by: NAustin Kerbow <amkerbow@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rickard Strandqvist 提交于
Avoid allocate memory if we will exit the function. Was found by using a static code analysis program called cppcheck. Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dean Michael Ancajas 提交于
Fixed a coding style issue for braces. Signed-off-by: NDean Michael Ancajas <dbancajas@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rickard Strandqvist 提交于
Remove the function bitswap() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: NInsop Song <Insop.Song@gainspeed.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gustavo A. R. Silva 提交于
Fixed a typo in nvec.c file Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Murilo Opsfelder Araujo 提交于
This patch gets rid of the following sparse warning: drivers/staging/olpc_dcon/olpc_dcon.c:787:19: warning: symbol 'dcon_driver' was not declared. Should it be static? Signed-off-by: NMurilo Opsfelder Araujo <mopsfelder@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 tolga ceylan 提交于
Misspelled comment corrected Signed-off-by: Ntolga ceylan <tolga.ceylan@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gustavo A. R. Silva 提交于
Fixed a typo in olpc_dcon_xo_1.c file. Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mathieu Poirier 提交于
WARNING: Single statement macros should not use a do {} while (0) loop Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Acked-by: NJason Cooper <jason@lakedaemon.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mathieu Poirier 提交于
Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Acked-by: NJason Cooper <jason@lakedaemon.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alexey Khoroshilov 提交于
dgnc_start() ignores errors in class_create() and device_create() and it does not deallocate resources if dgnc_tty_preinit() fails. The patch implements proper error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gustavo A. R. Silva 提交于
Fixed a typo in octeon-hcd.c file Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gustavo A. R. Silva 提交于
Fixed a typo in ethernet.c file. Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jamie Lawler 提交于
There are 2 missing blank lines after variable declarations in octeon/ethernet-rx.c. They have been added per the coding style. Signed-off-by: NJamie Lawler <jamie.lawler@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ning Zhou 提交于
This is a patch to fix "WARNING: line over 80 characters" found by checkpatch.pl in gdm_lte.c. Signed-off-by: NNing Zhou <zhou.ning.gd@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Robert Nachlinger 提交于
This is a patch to the gdm_mux.c file that fixes a space before comma coding style issue found by the checkpatch.pl tool. Signed-off-by: NRobert Nachlinger <robert.nachlinger@googlemail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Emrys Bayliss 提交于
This patch fixes some of the following checkpatch.pl errors in mac.h ERROR: do not use C99 // comments This patch reformats all single line c99 style comments to the preferred style. Signed-off-by: NEmrys Bayliss <emrys@paradise.net.nz> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-