Граф коммитов

495858 Коммитов

Автор SHA1 Сообщение Дата
Panir.Nyan 05719ac7d5 staging: speakup: Split the comment to fit the length
Split the comment to fit the length.

Signed-off-by: Panir Nyan <Panir.Nyan@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:14:16 -08:00
Masanari Iida 0175b9bf4b staging: wlan-ng: Fix comment in prism2sta.c
This patch fix a spelling typo and modify a comment.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:10:48 -08:00
Masanari Iida 1a6dfce737 staging: wlan-ng: Fix typo in comments and printk
This patch fix spelling typo in comments and print.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:10:48 -08:00
Eduardo Barretto 81980c16e2 Staging: wlan-ng: hfa384x_usb: fixed an 'else' statement coding style issue
Removed useless 'else' statement that followed an 'if' statement that
had a return 1 and moved all the content from the 'else' to outside of
the switch case, this way if any case is sufficient it returns '1',
otherwise it will return 0.

Signed-off-by: Eduardo Barretto <edusbarretto@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:10:48 -08:00
Daeseok Youn aa9895da3e staging: dgap: use gotos for handling error in dgap_remap()
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:10:48 -08:00
Robert Kmiec 7f703fae17 staging: rts5208/ms.c: Code style fix (space before comma)
This commit fixes the following errors reported by checkpatch.pl -f:
./rts5208/ms.c:1294: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1345: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1622: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1991: ERROR: space prohibited before that ',' (ctx:WxW)

This patch also adds missing spaces before and after '+' sign in two places.

This file has some other style issues and they will be fixed with latter
patches.

Signed-off-by: Robert Kmiec <robert.r.kmiec@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:07:20 -08:00
Soren Brinkmann 19f15a3000 staging: clocking-wizard: Handle invalid clk in notifier
Even though it should never happen, handle the case that the clock
notifier is called with an unexpected clock handle. This avoids the
compiler warning:
   drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c: In function 'clk_wzrd_clk_notifier':
>> drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c:99:6: warning: 'max' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (ndata->new_rate > max)
         ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:06:20 -08:00
Athira Lekshmi b6461b53e7 Clocking-wizard: Fixed missing blank line warning
Added a new line after declaration to remove the warning
'Missing a blank line after declarations'

Signed-off-by: Athira Lekshmi <andnlnbn18@gmail.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:06:20 -08:00
Devendra Naga 60c47c62f0 cptm1217: check if interrupts are masked at probe
the function cp_tm1217_mask_interrupt can return failure.
added the check and the failure path.

Cc: Ramesh Agarwal <ramesh.agarwal@intel.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:05:02 -08:00
Arno Tiemersma d6b87b0a64 staging: lustre: Add blank lines after declarations
Fixes this checkpatch warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Arno Tiemersma <arno.tiemersma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:02:27 -08:00
Balavasu 5e0db1a3a8 staging: lustre: lnet: lnet: trailing statements should be on next line
This patch fixes the checkpatch.pl issue
Error: trailing statements should be on next line

Signed-off-by: Balavasu <kp.balavasu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:02:27 -08:00
Luca Ceresoli 88ee4bde2d staging/lustre: remove unused function
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Peng Tao <bergwolf@gmail.com>
Cc: HPDD-discuss@lists.01.org
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:01:34 -08:00
Igor Ishchenko 747327975c staging: lustre: lnet: Removed spaces before increments and decrements
Fixed a coding style issue

Signed-off-by: Igor Ishchenko <igor.ishchenko@coderivium.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:00:36 -08:00
Andreas Ruprecht 1f3fd50391 staging: lustre: fid: Remove space before braces for defined() check
checkpatch complains about three places where a space is prohibited
before the braces for an "#if defined()" check. This patch removes
the spaces.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:58:30 -08:00
Dan Carpenter ef4356bf0c staging: lustre: potential underflow in mdc_iocontrol()
Smatch complains that "data->ioc_plen2" is a user controlled value and,
since we cast to signed int, the limit check can underflow.  It's not
very serious because probably the copy_to_user() would return -EFAULT
on every arch that matters instead of creating an info leak.  Also I
haven't followed it through to see if the value is really user
controlled.

But definitely it would be safer to cast to unsigned so let's do that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:58:30 -08:00
Serguey Parkhomovsky d372a4cdfa staging: lustre: libcfs: fix sparse warnings about static declaration
Fixes the following sparse warnings:

drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c:198:1: warning:
 symbol 'libcfs_arch_init' was not declared. Should it be static?
drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c:204:1: warning:
 symbol 'libcfs_arch_cleanup' was not declared. Should it be static?

Signed-off-by: Serguey Parkhomovsky <sergueyparkhomovsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:55:40 -08:00
Balavasu f96d1d7ee6 staging: lustre: lnet: lnet: do not initialise statics to 0 or NULL
This patch fixes the checkpatch.pl issue
Error: do not initialise statics to 0 or NULL

Signed-off-by: Balavasu <kp.balavasu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:55:40 -08:00
Jeremiah Mahler 48cbf26505 staging: lustre: selftest: fix _recycle_buffer context imbalance
Fix the sparse warning about a context imbalance in the
srpc_service_recycle_buffer function by telling sparse that it
should expect the lock to be held on entry and held on exit.

  drivers/staging/lustre/lnet/selftest/rpc.c:725:20: warning: context imbalance in 'srpc_service_recycle_buffer' - unexpected unlock

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:52:58 -08:00
Jeremiah Mahler dbfeb73092 staging: lustre: selftest: fix _post_buffer context imbalance
Fix the sparse warning about a context imbalance in the
srpc_service_post_buffer function by telling sparse that it
should expect the lock to be held on entry and held on exit.

  drivers/staging/lustre/lnet/selftest/rpc.c:508:17: warning: context imbalance in 'srpc_service_post_buffer' - unexpected unlock

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:52:58 -08:00
Jeremiah Mahler 8a136d117d staging: lustre: selftest: fix sfw_deactivate_session context imbalance
Fix the sparse warning about a context imbalance in the
sfw_deactivate_session function by telling sparse that it
should expect the lock to be held on entry and held on exit.

  drivers/staging/lustre/lnet/selftest/framework.c:210:9: warning: context imbalance in 'sfw_deactivate_session' - unexpected unlock

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:52:58 -08:00
Jeremiah Mahler 62366bf14c staging: lustre: selftest: fix "not declared" by declaring static
Fix several "symbol '...' was not declared" sparse warnings
for variables which are only used locally by declaring them static.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:52:58 -08:00
Jeremiah Mahler 8f67fe2cd1 staging: lustre: selftest: fix "not declared" by declaring in header
Fix several "symbol '...' was not declared" sparse warnings which
are caused by global variables by declaring them in the header file.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:52:58 -08:00
Sören Brinkmann fd17846d8d staging: lustre: libcfs/nidstrings: Avoid forward declarations
Avoid forward declaratoins by moving functions to a location before they
are referenced.

Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:51:12 -08:00
Sören Brinkmann 2e6e0a4646 staging: lustre: libcfs/nidstrings: Declare internal symbols static
This fixes sparse warnings:
  staging/lustre/lustre/libcfs/nidstrings.c:200:11: warning: symbol 'libcfs_nnetstrfns' was not declared. Should it be static?
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:203:1: warning: symbol 'libcfs_lo_str2addr' was not declared. Should it be static?
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:210:1: warning: symbol 'libcfs_ip_addr2str' was not declared. Should it be static?
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:227:1: warning: symbol 'libcfs_ip_str2addr' was not declared. Should it be static?
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:248:1: warning: symbol 'libcfs_decnum_addr2str' was not declared. Should it be static?
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:254:1: warning: symbol 'libcfs_hexnum_addr2str' was not declared. Should it be static?
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:260:1: warning: symbol 'libcfs_num_str2addr' was not declared. Should it be static?
  staging/lustre/lustre/libcfs/nidstrings.c:279:18: warning: symbol 'libcfs_lnd2netstrfns' was not declared. Should it be static?
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:292:18: warning: symbol 'libcfs_namenum2netstrfns' was not declared. Should it be static?
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:307:18: warning: symbol 'libcfs_name2netstrfns' was not declared. Should it be static?

Some functions had static forward declarations followed by non-static
implementations. Those forward declarations are removed and the
implementations are declared static and moved into a location that
doesn't require forward declarations.

Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:51:12 -08:00
Jeremiah Mahler 90d2ced902 staging: lustre: remove custom MIN/MAX and min_t operations
Remove all custom MIN/MAX and min_t operations since they are
no longer needed.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:49:22 -08:00
Jeremiah Mahler 28b12e4168 staging: lustre: replace MIN with min_t, remove cast
Switch from MIN to min_t and remove the previous cast of the second
argument to int.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:49:22 -08:00
Jeremiah Mahler fce6ad229b staging: lustre: replace MIN with min, cast (__kernel_size_t)
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: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:49:22 -08:00
Jeremiah Mahler 387915ded5 staging: lustre: replace MIN/MAX with min_t/max_t
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: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:49:21 -08:00
Jeremiah Mahler 462ef1e0e7 staging: lustre: replace MIN with min_t
Switch from MIN to the built in min_t with the int type.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:49:21 -08:00
Jeremiah Mahler 0c5754178d staging: lustre: use min/max instead of MIN/MAX, simple cases
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>
2015-01-17 15:49:21 -08:00
samuel kihahu 3f3af378f5 staging: lustre: cleanup align switch and case
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>
2015-01-17 15:46:22 -08:00
Dan Carpenter 3b66ea4352 Staging: lustre: error handling tweaks in obd_ioctl_getdata()
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>
2015-01-17 15:46:22 -08:00
Rickard Strandqvist 466fc15cb0 staging: lustre: lustre: obdclass: lprocfs_status.c: Tidied up some code in a case statement
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>
2015-01-17 15:46:22 -08:00
Rickard Strandqvist e9a8606905 staging: lustre: lustre: obdclass: lprocfs_status.c: Removed an unnecessary NULL check
Removed an unnecessary NULL check.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:46:22 -08:00
Spencer Baugh 439d9eadf6 lustre: ptlrpc: add "ptlrpc_internal.h" to sec_gc.c
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>
2015-01-17 15:43:17 -08:00
Rickard Strandqvist cc1cf0e0e6 staging: lustre: lustre: mdc: mdc_lib.c: Removed an unnecessary NULL check
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>
2015-01-17 15:43:17 -08:00
Chris Rorvick f56cb9da50 drivers: staging: lustre: Track sign separately
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>
2015-01-17 15:42:34 -08:00
Chris Rorvick 965bd8b9f7 drivers: staging: lustre: Use mult if units not specified
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>
2015-01-17 15:42:34 -08:00
Jia He 054cd8374f staging: lustre: libcfs: fix sparse warnings about static declaration
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>
2015-01-17 15:41:23 -08:00
Matthew Tyler 3f9773a54a staging: lustre: Cleanup cfs_str2mask in libcfs_string.c
- 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>
2015-01-17 15:39:32 -08:00
Matthew Tyler 5156647235 staging: lustre: Fix minor style error in libcfs_string.c
Signed-off-by: Matthew Tyler <matt.tyler@flashics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:39:32 -08:00
Al Viro f351bad2b4 lustre: don't use iovec instead of kvec
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 15:36:11 -08:00
Dean Ancajas 4d4e1eef9a Staging: lustre: obd: Fix a coding style issue
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>
2015-01-17 15:30:59 -08:00
Fred Chou ff2bf19e8d staging:lustre:lustre:ptlrpc: fix sparse warnings in lproc_ptlrpc.c
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>
2015-01-17 15:30:59 -08:00
Tristan Lelong 3760489623 staging: lustre: replace static value with define
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>
2015-01-17 15:29:31 -08:00
Tristan Lelong e84962e3af staging: lustre: fix sparse warning on LPROC_SEQ_FOPS macros
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>
2015-01-17 15:26:22 -08:00
Brian Vandre 41f53d5739 staging: lustre: fld: fixed symbol was not declared
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>
2015-01-17 15:25:58 -08:00
Austin Kerbow fa2592cdc5 Staging: ft1000-pcmcia: fix else close brace style
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>
2015-01-17 15:22:31 -08:00
Rickard Strandqvist 64ed8f51f9 staging: ft1000: ft1000-usb: ft1000_hw.c: Fix a potential memory leak.
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>
2015-01-17 15:22:31 -08:00
Dean Michael Ancajas 0a5470f80c Staging: ft1000: ft1000-pcmcia: Fixed a coding style issue
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>
2015-01-17 15:20:52 -08:00