- 17 Jan, 2015 40 commits
-
-
Jeremiah Mahler authored
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: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
samuel kihahu authored
Align switch and case to be at the same indent. Signed-off-by: Samuel Kihahu <skihahu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dan Carpenter authored
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rickard Strandqvist authored
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: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rickard Strandqvist authored
Removed an unnecessary NULL check. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Spencer Baugh authored
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: Spencer Baugh <sbaugh@andrew.cmu.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rickard Strandqvist authored
Removed an unnecessary NULL check. I have checked the only place this function is called from. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chris Rorvick authored
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: Chris Rorvick <chris@rorvick.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chris Rorvick authored
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: Chris Rorvick <chris@rorvick.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jia He authored
make sparse happy since these two fuchtion are only used in module.c. tested by successful compilation. Signed-off-by: Jia 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Matthew Tyler authored
- Replace body-less for-loop with while loop - Use '\0' for null character instead of 0 Signed-off-by: Matthew Tyler <matt.tyler@flashics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Matthew Tyler authored
Signed-off-by: Matthew Tyler <matt.tyler@flashics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Al Viro authored
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dean Ancajas authored
Fixed a brace coding style issue for functions. Signed-off-by: Dean Michael Ancajas <dbancajas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fred Chou authored
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: Fred Chou <fred.chou.nd@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tristan Lelong authored
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: Tristan Lelong <tristan@lelong.xyz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tristan Lelong authored
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: Tristan Lelong <tristan@lelong.xyz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Brian Vandre authored
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: Brian Vandre <bvandre@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Austin Kerbow authored
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: Austin Kerbow <amkerbow@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rickard Strandqvist authored
Avoid allocate memory if we will exit the function. Was found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dean Michael Ancajas authored
Fixed a coding style issue for braces. Signed-off-by: Dean Michael Ancajas <dbancajas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rickard Strandqvist authored
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: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Insop Song <Insop.Song@gainspeed.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gustavo A. R. Silva authored
Fixed a typo in nvec.c file Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Murilo Opsfelder Araujo authored
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: Murilo Opsfelder Araujo <mopsfelder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
tolga ceylan authored
Misspelled comment corrected Signed-off-by: tolga ceylan <tolga.ceylan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gustavo A. R. Silva authored
Fixed a typo in olpc_dcon_xo_1.c file. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mathieu Poirier authored
WARNING: Single statement macros should not use a do {} while (0) loop Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mathieu Poirier authored
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alexey Khoroshilov authored
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: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gustavo A. R. Silva authored
Fixed a typo in octeon-hcd.c file Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gustavo A. R. Silva authored
Fixed a typo in ethernet.c file. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jamie Lawler authored
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: Jamie Lawler <jamie.lawler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ning Zhou authored
This is a patch to fix "WARNING: line over 80 characters" found by checkpatch.pl in gdm_lte.c. Signed-off-by: Ning Zhou <zhou.ning.gd@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Robert Nachlinger authored
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: Robert Nachlinger <robert.nachlinger@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Emrys Bayliss authored
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: Emrys Bayliss <emrys@paradise.net.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Emrys Bayliss authored
This patch makes the formatting of the comments in mac.h more consistent. * Where a heading takes up three comment lines it is reduced to one. * A newline always separates column headings Signed-off-by: Emrys Bayliss <emrys@paradise.net.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Emrys Bayliss authored
This patch fixes the following checkpatch.pl errors in mac.h: WARNING: line over 80 characters Signed-off-by: Emrys Bayliss <emrys@paradise.net.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Emrys Bayliss authored
This patch fixes some c99 errors in mac.h: ERROR: do not use C99 // comments All instances where the c99 comment occurs after a statement. Signed-off-by: Emrys Bayliss <emrys@paradise.net.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Emrys Bayliss authored
This patch makes the formatting of the comments in mac.h more consistent. * Where a comment follows a statement, it is separated by a single space. Signed-off-by: Emrys Bayliss <emrys@paradise.net.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Emrys Bayliss authored
This patch fixes some of the following checkpatch.pl errors in mac.h: ERROR: do not use C99 // comments This patch truncates statements which are followed by empty c99 comments. Signed-off-by: Emrys Bayliss <emrys@paradise.net.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-