- 15 Jul, 2015 32 commits
-
-
Tim Sell authored
Neglect to NULL rcvbuf pointer array could result in faults later This problem would exhibit itself as a fault when when attempting to stop any visornic device (i.e., in visornic_disable_with_timeout() or visornic_serverdown_complete()) that had never been started (i.e., for which init_rcv_bufs() had never been called). Because the array of rcvbuf was never cleared to NULLs, we would mistakenly attempt to call kfree_skb() on garbage memory. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tim Sell authored
Prevent faults in visornic_pause, visornic_resume(), and visornic_remove() Prior to this patch, any call to visornic_pause(), visornic_resume(), or visornic_remove() would fault, due to dev_set_drvdata() never having been called to stash our struct visornic_devdata * into the device's drvdata. I.e., all calls to dev_get_drvdata() were returning NULL, meaning a fault was soon to follow. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tim Sell authored
Correct visornic_pause() to indicate completion asynchronously rather than in-line Previously, visornic_pause() (called to stop the device due to IOVM service partition recovery) was calling the passed complete_func() in-line, rather than delaying the calling until after the device had actually been stopped. The behavior has been corrected so that the calling of the complete_func() is now delayed until after the stopping of the device has been completed in visornic_serverdown_complete(), which runs asynchronously via the workqueue visornic_serverdown_workqueue. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tim Sell authored
Prevent faults processing messages for devices that no driver has yet registered to handle. Previously, code of the form: drv = to_visor_driver(dev->device.driver); if (!drv) goto away; was not having the desired intent, because to_visor_driver() was essentially returning garbage if its argument was NULL. The only existing case of this is in initiate_chipset_device_pause_resume(), which is called during IOVM service partition recovery. We were thus faulting when IOVM service partition recovery was initiated on a bus that had at least one device for which no function driver had registered (visorbus_register_visor_driver). Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tim Sell authored
Fix problem that prevents us from responding to any device message after device_create. By neglecting to NULL out pending_msg_hdr after the device_create response, we were effectively preventing any subsequent messages to the device from working, because device_epilog() will correctly bail out early if it sees that pending_msg_hdr is still set non-NULL, as that is an indicator to mean that an unanswered message is still outstanding. This problem was discovered as part of testing IOVM service partition recovery, because device_epilog() was in fact bailing out when it was called from my_device_changestate(), which of course prevented us from transitioning the device to the paused state. However, the incorrect behavior would occur for ANY subsequent command directed at the device, not just for changestate. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anders Fridlund authored
This is a patch to the ddk750_dvi.h file that fixes up a brace error found by the checkpatch.pl tool Signed-off-by: Anders Fridlund <anders.fridlund@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Vinay Simha BN authored
kernel coding style fixes for below messages from scripts/checkpatch.pl ERROR: do not initialise globals to 0 or NULL Signed-off-by: Vinay Simha BN <simhavcs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Add spaces according to checkpatch.pl messages: "ERROR: spaces required around that '=' (ctx:VxV)" "ERROR: need consistent spacing around '-' (ctx:WxV)" "ERROR: spaces required around that '?' (ctx:VxE)" "ERROR: need consistent spacing around '&' (ctx:VxW)" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Fix according to checkpatch.pl message: "ERROR: open brace '{' following function declarations go on the next line" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Remove assignment from if condition according to checkpatch.pl message: "ERROR: do not use assignment in if condition" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Fix according to checkpatch.pl message: "ERROR: switch and case should be at the same indent" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Fix indentation according to checkpatch.pl message: "ERROR: space required after that close brace '}'" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Fix open braces according to checkpatch.pl message: "ERROR: that open brace { should be on the previous line" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Fix indentation of pointer operator '*' according to checkpatch.pl message: "ERROR: 'foo* bar' should be 'foo *bar' " Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Insert spaces before '(' according to checkpatch.pl message: "ERROR: space required before the open parenthesis" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Insert spaces according to checkpatch.pl message: "ERROR: space required before the open brace '{'" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Remove trailing whitespaces according to checkpatch.pl error message: "ERROR: trailing whitespace" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anatoly Stepanov authored
Replace spaces with tabs according to checkpatch.pl error message: "ERROR: code indent should use tabs where possible" Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hari Prasath Gujulan Elango authored
This patch removes the redundant __func__ from dynamic debug prints as the pr_xxx set of functions can be dynamically controlled to include function name.Also fix a typo in debug statement. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Santhosh Pai authored
This patch fixes the checkpatch.pl warning: WARNING: ENOSYS means 'invalid syscall nr' and nothing else try_module_get fails when the reference count of the module is not allowed to be incremented ,and hence -ENXIO is returned indicating no device or address. [IA - combined two of santhosh's changes to the error return value!] Signed-off-by: santhosh pai <santhosh.pai88@yahoo.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
If the "comedi" module has been loaded with the "comedi_num_legacy_minors" module parameter set to a non-zero value, some reserved comedi devices get created. These can be attached to a low-level comedi driver using the `COMEDI_DEVCONFIG` ioctl command, which checks for the `CAP_SYS_ADMIN` capability. Of course, the comedi device needs to be opened before the ioctl command can be sent. If the comedi device is unattached, `comedi_open()` currently requires the `CAP_NET_ADMIN` capability. It makes more sense to just require the `CAP_SYS_ADMIN` capability here, so change it. For the curious, commit a8f80e8f ("Networking: use CAP_NET_ADMIN when deciding to call request_module") changed this capability from `CAP_SYS_MODULE` to `CAP_NET_ADMIN`, even though it doesn't seem relevant here. The original `CAP_SYS_MODULE` capability was due to the function having some code to request a module using a "char-major-%i-%i" alias, but that was never compiled in and was removed by commit f30f2c2d ("staging: comedi: remove check for CONFIG_KMOD"). Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
The analog output range is not programmable, but the ranges for each of the two analog output channels are settable via jumpers. These jumper settings are not readable by the driver. The driver provides a range table containing all the possible internal ranges (+/-10V, +/-5V, 0-10V, 0-5V) to provide information to the user application (although any range selected by the application that differs from the jumper settings will not produce the expected voltage output). The range table does not cover all possible ranges of the analog output channels. The jumpers also allow an external reference voltage between 0 and 10V to be used as bipolar or unipolar output range. Add a couple more ranges to the end of the range table to define these two external ranges. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Geert Uytterhoeven authored
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Geliang Tang authored
This patch fixes the following sparse warning: drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes address space of expression Signed-off-by: Geliang Tang <geliangtang@163.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Luis de Bethencourt authored
Warnings found by checkpatch.pl WARNING: line over 80 characters /drivers/staging/comedi/drivers/das16m1.c:414 + if (devpriv->adc_count == 0 && hw_counter == devpriv->initial_hw_count) { /drivers/staging/comedi/drivers/das16m1.c:417 /drivers/staging/comedi/drivers/das16m1.c:418 /drivers/staging/comedi/drivers/das16m1.c:419 /drivers/staging/comedi/drivers/das16m1.c:420 /drivers/staging/comedi/drivers/das16m1.c:421 Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Luis de Bethencourt authored
Warning found by checkpatch.pl WARNING: please, no space before tabs /drivers/staging/comedi/drivers/das16m1.c:83 + 404-407 ^I8254$ Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Abdul Hussain authored
This patch simplify a trivial if-return sequence. Possibly combine with a preceding function call. Signed-off-by: Abdul Hussain <habdul@visteon.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Abdul Hussain authored
This patch simplify a trivial if-return sequence. Possibly combine with a preceding function call. Signed-off-by: Abdul Hussain <habdul@visteon.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Abdul Hussain authored
This patch simplify a trivial if-return sequence. Possibly combine with a preceding function call. Signed-off-by: Abdul Hussain <habdul@visteon.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Abdul Hussain authored
This patch simplify a trivial if-return sequence. Possibly combine with a preceding function call. Signed-off-by: Abdul Hussain <habdul@visteon.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Abdul Hussain authored
This patch simplify a trivial if-return sequence. Possibly combine with a preceding function call. Signed-off-by: Abdul Hussain <habdul@visteon.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Luis de Bethencourt authored
fixes checkpatch.pl WARNING: quoted string split across lines +MODULE_AUTHOR("David A. Schleef <ds@schleef.org>, " + "Frank Mori Hess <fmhess@users.sourceforge.net>"); Modules with multiple authors have a MODULE_AUTHOR line for each one. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 Jul, 2015 8 commits
-
-
Guillermo O. Freschi authored
Simple style fix. Signed-off-by: Guillermo O. Freschi <kedrot@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Kalinkin authored
Prevents false positive "missing empty line after a definition" checkpatch warning. Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Markus Elfring authored
The following functions test whether their argument is NULL and then return immediately. * kfree * ll_file_data_put * ptlrpc_connection_put Thus the test around such calls is not needed. This issue was detected by using the Coccinelle software. See also a previous update suggestion: "remove unneeded null test before free" by Julia Lawall https://lkml.org/lkml/2015/5/1/498 https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg878600.htmlSigned-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lukasz Janyst authored
This is a patch to the libcfs/module.c file fixing whitespace warnings found by checkpatch.pl. Signed-off-by: Lukasz Janyst <lj@buggybrain.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Oleg Drokin authored
Apparently kstrtouint could return not just -EINVAL, but also -ERANGE, so make sure we just check the return value for something negative. Noticed by Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Eremin authored
Remove portal_enter_debugger because it's not used any more. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Eremin authored
They are just fancy module parameters wrappers, so just the same functionality now would be accessible via /sys/module/libcfs/parameters/libcfs_console_{min,max}_delay Also install compatibility symlinks Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Oleg Drokin authored
It's just a fancy libcfs_debug_mb module parameter wrapper, so just add debug buffer size check and resizing and the same functionality now would be accessible via /sys/module/libcfs/parameters/libcfs_debug_mb Also add a symlink for backwards compatibility. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-