K. Y. Srinivasan [Fri, 22 Apr 2011 21:55:10 +0000 (14:55 -0700)]
Staging: hv: Get rid of blkvsc_do_read_capacity16()
Get rid of blkvsc_do_read_capacity16() and instead use the common function
for retrieving capacity.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:55:09 +0000 (14:55 -0700)]
Staging: hv: Get rid of blkvsc_do_read_capacity()
Now that we have a common function for some of the operations on the device,
use that and get rid of the function blkvsc_do_read_capacity().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:55:08 +0000 (14:55 -0700)]
Staging: hv: Introduce a common function for issuing commands to the device
There are multiple functions to either get info about the device
(INQUIRY, CAPACITY etc) or to FLUSH the device cache. The majority of the
code for these functions is identical. Introduce a common function for
doing all these operations.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:55:07 +0000 (14:55 -0700)]
Staging: hv: Simplify the code for blkvsc_getgeo()
We are making up the geometry anyway, keep it simple.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:55:06 +0000 (14:55 -0700)]
Staging: hv: Enable blkvsc_ioctl()
We can support HDIO_GET_IDENTITY ioctl, enable blkvsc_ioctl().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:39 +0000 (14:13 -0700)]
Staging: hv: Get rid of some dead code in blkvsc_drv.c
Get rid of some dead code in blkvsc_drv.c.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:38 +0000 (14:13 -0700)]
Staging: hv: Move module parameter to earlier in the file
Move module parameter to be earlier in the file.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:37 +0000 (14:13 -0700)]
Staging: hv: Move some definitions/declarations to be earlier in the file
Move some definitions/declarations to be earlier in the file.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:36 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration for blkvsc_request()
Get rid of the forward declaration for blkvsc_request() by moving the code
around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:35 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration for blkvsc_do_pending_reqs()
Get rid of the forward declaration for blkvsc_do_pending_reqs() by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:34 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration for blkvsc_do_request()
Get rid of the forward declaration for blkvsc_do_request() by moving the
code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:33 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration for blkvsc_do_inquiry()
Get rid of the forward declaration for blkvsc_do_inquiry() by moving the code
around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:32 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_revalidate_disk()
Get rid of the forward declaration of blkvsc_revalidate_disk() by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:31 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_do_read_capacity16()
Get rid of the forward declaration of blkvsc_do_read_capacity16() by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:30 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration for blkvsc_do_read_capacity()
Get rid of the forward declaration for blkvsc_do_read_capacity() by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:29 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration for blkvsc_release()
Get rid of the forward declaration for blkvsc_release() by moving the code
around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:28 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_shutdown()
Get rid of the forward declaration of blkvsc_shutdown() by moving the
code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:27 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_remove()
Get rid of the forward declaration of blkvsc_remove() by moving the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:26 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_cancel_pending_reqs()
Get rid of the forward declaration of blkvsc_cancel_pending_reqs() by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:25 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_do_flush()
Get rid of the forward declaration of blkvsc_do_flush() by moving the code
around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:24 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_cmd_completion()
Get rid of the forward declaration of blkvsc_cmd_completion() by moving the
code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:23 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_ioctl()
Get rid of the forward declaration of blkvsc_ioctl() by moving the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 22 Apr 2011 21:13:22 +0000 (14:13 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_init_rw()
Get rid of the forward declaration of blkvsc_init_rw() by moving the
code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Thu, 21 Apr 2011 19:30:47 +0000 (12:30 -0700)]
staging: hv: convert function name NetVscDisconnectFromVsp to lower case
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Thu, 21 Apr 2011 19:30:46 +0000 (12:30 -0700)]
staging: hv: clean up unused forward declarations
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Thu, 21 Apr 2011 19:30:45 +0000 (12:30 -0700)]
staging: hv: move netvsc_device_add() to clean up forward declaration
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Thu, 21 Apr 2011 19:30:44 +0000 (12:30 -0700)]
staging: hv: move netvsc_destroy_send_buf() to clean up forward declaration
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Thu, 21 Apr 2011 19:30:43 +0000 (12:30 -0700)]
staging: hv: move netvsc_destroy_recv_buf() to clean up forward declaration
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Thu, 21 Apr 2011 19:30:42 +0000 (12:30 -0700)]
staging: hv: move netvsc_send_recv_completion() to clean up forward declaration
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Thu, 21 Apr 2011 19:30:41 +0000 (12:30 -0700)]
staging: hv: move netvsc_receive_completion() to clean up forward declaration
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Thu, 21 Apr 2011 19:30:40 +0000 (12:30 -0700)]
staging: hv: move netvsc_initialize() to clean up forward declaration
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tomas Winkler [Wed, 6 Apr 2011 14:37:35 +0000 (17:37 +0300)]
staging/easycap: easycap_probe: drop unuzed variables
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tomas Winkler [Wed, 6 Apr 2011 14:37:34 +0000 (17:37 +0300)]
staging/easycap: easycap_probe: take out duplicated code from ifdef - else
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tomas Winkler [Wed, 6 Apr 2011 14:37:33 +0000 (17:37 +0300)]
staging/easycap: easycap_probe : rename usb variables to common names
1. rename usb variables to more common names
struct usb_device *pusb_device -> usbdev
struct usb_host_interface *pusb_host_interface -> alt
struct usb_endpoint_descriptor *pepd ->
struct usb_interface_descriptor *pusb_interface_descriptor -> interface;
2. use usb_altnum_to_altsetting to access alternative settings
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Hennerich [Wed, 6 Apr 2011 09:42:49 +0000 (11:42 +0200)]
IIO: GYRO: IIO driver for Analog Devices Digital Output Gyroscope ADXRS450
From: Cliff Cai <cliff.cai@analog.com>
Add new IIO driver for Analog Devices digital output gyroscope ADXRS450
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Hennerich [Wed, 6 Apr 2011 09:42:48 +0000 (11:42 +0200)]
IIO: Documentation: Add ABI documentatio for gyro quadrature correction
From: Cliff Cai <cliff.cai@analog.com>
Add ABI documentation for gyro quadrature correction.
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Hennerich [Wed, 6 Apr 2011 09:42:47 +0000 (11:42 +0200)]
IIO: GYRO: Add MACRO for gyro quadrature correction
From: Cliff Cai <cliff.cai@analog.com>
Add gyro_z_quadrature_correction_raw define.
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Wed, 6 Apr 2011 14:48:53 +0000 (16:48 +0200)]
staging/comedi: remove German in-file changelog
My script that finds typos always wants to do s/Funktion/Function/.
Instead of adding some whilelist logic to my script just delete the
changelog that is useless in general and still more in this case as most
kernel developers don't understand it.
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Wed, 6 Apr 2011 12:31:40 +0000 (13:31 +0100)]
Staging: iio: oaktrail AK8975 support via IIO
Actually this is generic 'I have no GPIO' support for the AK8975, instead
we have to go bus polling.
Huang Liang produced an initial patch which worked by removing the support
for GPIO pins. This patch instead makes GPIO support optional and Huang then
fixed some bugs in it.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 5 Apr 2011 19:11:58 +0000 (21:11 +0200)]
staging: brcm80211: removed static ASSERTs
Code cleanup. ASSERTs that check static (compile time) conditions
have been removed.
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Larry Finger [Sat, 2 Apr 2011 20:49:33 +0000 (15:49 -0500)]
staging: brcm80211: Remove symbol CONFIG_BRCM80211
Since the staging driver brcm80211 was renamed to brcmsmac, CONFIG_BRCM80211
is not really needed. In addition, a two-entry list hardly needs a separate
config menu.
The only awkward place in the revised code is the double addition of the
brcm80211 Makefile.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Javier M. Mellid [Sat, 2 Apr 2011 01:02:12 +0000 (03:02 +0200)]
staging: rtl8712: fixed coding style issues
Fixed some style and format issues with code.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Javier M. Mellid [Sat, 2 Apr 2011 01:01:49 +0000 (03:01 +0200)]
staging: rtl8712: fixed coding style issues
Fixed some style and format issues with headers.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Fri, 1 Apr 2011 10:07:10 +0000 (12:07 +0200)]
staging: brcm80211: ASSERT cleanup in phy
Code cleanup. Driver contains too many ASSERTs. Removed all ASSERTs
in the PHY that did not directly relate to a value being read from
hardware.
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Fri, 1 Apr 2011 14:23:44 +0000 (16:23 +0200)]
drivers/staging/cx25821/cx25821-video.c: introduce missing kfree
Error handling code following a kmalloc should free the allocated data.
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...x...+> }
(
x->f1 = E
|
(x->f1 == NULL || ...)
|
f(...,x->f1,...)
)
...>
(
return \(0\|<+...x...+>\|ptr\);
|
return@p2 ...;
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Fri, 1 Apr 2011 14:23:45 +0000 (16:23 +0200)]
drivers/staging/intel_sst/intel_sst_app_interface.c: introduce missing kfree
Stream_bufs is initialized at the beginning of the function, and then the
#ifdef code declares a new variable with the same name and initializes
that. If the if in the ifdef is taken, the then branch returns, implying
that the first stream_bufs is never used and is leaked. The first
initialization is thus moved down after the ifdef.
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...x...+> }
(
x->f1 = E
|
(x->f1 == NULL || ...)
|
f(...,x->f1,...)
)
...>
(
return \(0\|<+...x...+>\|ptr\);
|
return@p2 ...;
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Fri, 1 Apr 2011 14:23:42 +0000 (16:23 +0200)]
drivers/staging/brcm80211/brcmfmac/wl_iw.c: introduce missing kfree
Error handling code following a kmalloc should free the allocated data.
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...x...+> }
(
x->f1 = E
|
(x->f1 == NULL || ...)
|
f(...,x->f1,...)
)
...>
(
return \(0\|<+...x...+>\|ptr\);
|
return@p2 ...;
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 31 Mar 2011 13:56:13 +0000 (15:56 +0200)]
staging: brcm80211: separate hndpmu functionality for brcmsmac driver
The hndpmu source file has functions for brcmfmac and brcmsmac driver
but it turns out that on function level there is no reuse so for
the brcmsmac its set of functions now reside in wlc_pmu.c.
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Wed, 30 Mar 2011 10:16:00 +0000 (12:16 +0200)]
staging: brcm80211: removed ASSERTs in LCN phy code
Code cleanup. Driver contains far too many ASSERTs. Bringing driver
more in line with Greg KH's guidelines.
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Wed, 30 Mar 2011 09:21:01 +0000 (11:21 +0200)]
staging: brcm80211: removed duplicate WMM code
By calling wlc_wme_setparams() from wlc_edcf_setparams(), duplicate
code in wlc_edcf_setparams() could be removed.
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Wed, 30 Mar 2011 09:21:00 +0000 (11:21 +0200)]
staging: brcm80211: made overlapping WMM functions more similar
Code cleanup. Functions wlc_edcf_setparams() and
wlc_wme_setparams() duplicate code amongst each other. This commit
attempts to make life easier for the reviewer, by introducing non
functional changes that bring wlc_edcf_setparams() more in line
with wlc_wme_setparams(). As a result the subsequent commit can be
reviewed more easily.
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Wed, 30 Mar 2011 09:20:59 +0000 (11:20 +0200)]
staging: brcm80211: cleanup of WMM related functions
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cho, Yu-Chen [Fri, 1 Apr 2011 06:38:43 +0000 (14:38 +0800)]
staging/keucr: transport usb use pr_<level>
transport.c usb.c use pr_<level> for messages
Signed-off-by: Cho, Yu-Chen <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cho, Yu-Chen [Fri, 1 Apr 2011 06:38:42 +0000 (14:38 +0800)]
staging/keucr: smilmain use pr_<level> for messages
smilmain.c use pr_<level> for messages
Signed-off-by: Cho, Yu-Chen <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cho, Yu-Chen [Fri, 1 Apr 2011 06:38:41 +0000 (14:38 +0800)]
staging/keucr: scsiglue use pr_<level> for messages
scsiglue.c use pr_<level> for messages
Signed-off-by: Cho, Yu-Chen <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cho, Yu-Chen [Fri, 1 Apr 2011 06:38:40 +0000 (14:38 +0800)]
staging/keucr: msscsi use pr_<level> for messages
msscsi.c use pr_<level> for messages
Signed-off-by: Cho, Yu-Chen <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Karthigan Srinivasan [Thu, 31 Mar 2011 20:00:17 +0000 (15:00 -0500)]
Staging: winbond: wb35tx.c: Fixed coding style
issue.
Fixed coding style issue.
Signed-off-by: Karthigan Srinivasan <karthigan.srinivasan2@gmail.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tomas Winkler [Wed, 30 Mar 2011 10:15:30 +0000 (12:15 +0200)]
staging/easycap: revamp reset function
fix indentation and drop success statements printouts
that just causes code be less readable
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Belisko [Mon, 28 Mar 2011 11:10:27 +0000 (13:10 +0200)]
staging:ft1000: Remove dead code in ft1000_hw.c
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Nicolas Kaiser [Sun, 27 Mar 2011 15:48:53 +0000 (17:48 +0200)]
staging: crystalhd: remove unused typedef bc_bool_t
Remove unused typedef bc_bool_t.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sat, 26 Mar 2011 17:18:14 +0000 (20:18 +0300)]
Staging: rtl8712: redundant null check before kfree()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sat, 26 Mar 2011 17:18:13 +0000 (20:18 +0300)]
Staging: rts_pstor: redundant null check before kfree()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sun, 27 Mar 2011 00:06:43 +0000 (04:06 +0400)]
Staging: rts_pstor: s/rtsx_alloc_dma_buf/kmalloc/
Replace rtsx_alloc_dma_buf() with kfree() back,
chip parameter is not used; remove casts.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sat, 26 Mar 2011 17:18:11 +0000 (20:18 +0300)]
Staging: rts_pstor: s/rtsx_free_dma_buf/kfree/
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sat, 26 Mar 2011 17:18:10 +0000 (20:18 +0300)]
Staging: sbe-2t3e3: redundant null check before kfree()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sat, 26 Mar 2011 17:18:09 +0000 (20:18 +0300)]
Staging: sbe-2t3e3: remove T3E3_USE_CONTIGMALLOC
This code looks useless, t3e3_contigmemory_size is neither declared
nor used anywhere else, as well as T3E3_USE_CONTIGMALLOC.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michał Mirosław [Tue, 19 Apr 2011 10:43:20 +0000 (12:43 +0200)]
Staging: convert hv network driver to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Olaf Hering [Sat, 16 Apr 2011 16:50:42 +0000 (18:50 +0200)]
hv: make vmbus_loglevel writeable
make /sys/module/hv_vmbus/parameters/vmbus_loglevel writeable by root.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Olaf Hering [Sat, 16 Apr 2011 16:50:41 +0000 (18:50 +0200)]
hv: pass integer to tasklet_init()
tasklet_init() takes an integer, so use one right away.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Olaf Hering [Sat, 16 Apr 2011 16:50:40 +0000 (18:50 +0200)]
hv: pass u32 to process_chn_event()
Change types in vmbus_on_event() to u32 since the input is u32 as well.
Pass u32 to process_chn_event() instead of casting arg to void* and back.
Update printk to reflect type change.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Olaf Hering [Sat, 16 Apr 2011 16:50:39 +0000 (18:50 +0200)]
hv: Reduce indention in vmbus_on_event
Reduce indention in vmbus_on_event() by converting two
if (var) to if (!var)
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 6 Apr 2011 23:05:01 +0000 (16:05 -0700)]
Staging: hv: Get rid of blkvsc_check_events()
We don't support removable media in Hyper-V block driver.
Get rid of blkvsc_check_events() as it is efectively "dead code".
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 6 Apr 2011 21:35:02 +0000 (14:35 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_getgeo()
Get rid of the forward declaration of blkvsc_getgeo() by moving the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 6 Apr 2011 21:35:01 +0000 (14:35 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_open()
Get rid of the forward declaration of blkvsc_open() by moving the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 6 Apr 2011 21:35:00 +0000 (14:35 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_check_events()
Get rid of the forward declaration of blkvsc_check_events()
by moving the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 6 Apr 2011 21:34:59 +0000 (14:34 -0700)]
Staging: hv: Get rid of the forward declaration of blkvsc_submit_request()
Get rid of the forward declaration of blkvsc_submit_request() by moving the
code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 6 Apr 2011 18:25:39 +0000 (11:25 -0700)]
Staging: hv: Zero out the request structure on allocation
As part of the cleanup of the I/O request structure, allocate them zeroed
out. This fixes a bug that was introduced in the patch-set titled:
Staging: hv: Cleanup-storage-drivers-phase-II.
A corrected version of this patch-set was sent out earlier, however
the earlier (buggy) version of this patch-set was already applied.
This patch fixes the problem.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 6 Apr 2011 18:25:38 +0000 (11:25 -0700)]
Staging: hv: Properly capture the error state
Properly capture the error state after the completion of I/O. This fixes a bug
that was introduced in the patch-set titled:
Staging: hv: Cleanup-storage-drivers-phase-II.
A corrected version of this patch-set was sent out earlier, however
the earlier (buggy) version of this patch-set was already applied.
This patch fixes the problem.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Tue, 19 Apr 2011 13:37:49 +0000 (06:37 -0700)]
Staging: merge 2.6.39-rc4 into staging-next
This handles the removal of the samsung-laptop driver and other
minor merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Tue, 19 Apr 2011 04:26:00 +0000 (21:26 -0700)]
Linux 2.6.39-rc4
Linus Torvalds [Mon, 18 Apr 2011 22:44:29 +0000 (15:44 -0700)]
Merge branch 'for-39-rc4' of git://codeaurora.org/quic/kernel/davidb/linux-msm
* 'for-39-rc4' of git://codeaurora.org/quic/kernel/davidb/linux-msm:
msm: timer: fix missing return value
msm: Remove extraneous ffa device check
Linus Torvalds [Mon, 18 Apr 2011 20:29:03 +0000 (13:29 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: xen-kbdfront - fix mouse getting stuck after save/restore
Input: estimate number of events per packet
Input: evdev - indicate buffer overrun with SYN_DROPPED
Input: document event types and codes and their intended use
Input: add KEY_IMAGES specifically for AL Image Browser
Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe()
Input: h3600_ts - fix error handling at connect
Input: twl4030_keypad - avoid potential NULL-pointer dereference
Linus Torvalds [Mon, 18 Apr 2011 20:21:18 +0000 (13:21 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: add blk_run_queue_async
block: blk_delay_queue() should use kblockd workqueue
md: fix up raid1/raid10 unplugging.
md: incorporate new plugging into raid5.
md: provide generic support for handling unplug callbacks.
md - remove old plugging code.
md/dm - remove remains of plug_fn callback.
md: use new plugging interface for RAID IO.
block: drop queue lock before calling __blk_run_queue() for kblockd punt
Revert "block: add callback function for unplug notification"
block: Enhance new plugging support to support general callbacks
Linus Torvalds [Mon, 18 Apr 2011 19:24:24 +0000 (12:24 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/powermac: Build fix with SMP and CPU hotplug
powerpc/perf_event: Skip updating kernel counters if register value shrinks
powerpc: Don't write protect kernel text with CONFIG_DYNAMIC_FTRACE enabled
powerpc: Fix oops if scan_dispatch_log is called too early
powerpc/pseries: Use a kmem cache for DTL buffers
powerpc/kexec: Fix regression causing compile failure on UP
powerpc/85xx: disable Suspend support if SMP enabled
powerpc/e500mc: Remove CPU_FTR_MAYBE_CAN_NAP/CPU_FTR_MAYBE_CAN_DOZE
powerpc/book3e: Fix CPU feature handling on 64-bit e5500
powerpc: Check device status before adding serial device
powerpc/85xx: Don't add disabled PCIe devices
Linus Torvalds [Mon, 18 Apr 2011 19:24:05 +0000 (12:24 -0700)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (24 commits)
Btrfs: fix free space cache leak
Btrfs: avoid taking the chunk_mutex in do_chunk_alloc
Btrfs end_bio_extent_readpage should look for locked bits
Btrfs: don't force chunk allocation in find_free_extent
Btrfs: Check validity before setting an acl
Btrfs: Fix incorrect inode nlink in btrfs_link()
Btrfs: Check if btrfs_next_leaf() returns error in btrfs_real_readdir()
Btrfs: Check if btrfs_next_leaf() returns error in btrfs_listxattr()
Btrfs: make uncache_state unconditional
btrfs: using cached extent_state in set/unlock combinations
Btrfs: avoid taking the trans_mutex in btrfs_end_transaction
Btrfs: fix subvolume mount by name problem when default mount subvolume is set
fix user annotation in ioctl.c
Btrfs: check for duplicate iov_base's when doing dio reads
btrfs: properly handle overlapping areas in memmove_extent_buffer
Btrfs: fix memory leaks in btrfs_new_inode()
Btrfs: check for duplicate iov_base's when doing dio reads
Btrfs: reuse the extent_map we found when calling btrfs_get_extent
Btrfs: do not use async submit for small DIO io's
Btrfs: don't split dio bios if we don't have to
...
Linus Torvalds [Mon, 18 Apr 2011 17:36:54 +0000 (10:36 -0700)]
proc: do proper range check on readdir offset
Rather than pass in some random truncated offset to the pid-related
functions, check that the offset is in range up-front.
This is just cleanup, the previous commit fixed the real problem.
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 18 Apr 2011 17:35:30 +0000 (10:35 -0700)]
next_pidmap: fix overflow condition
next_pidmap() just quietly accepted whatever 'last' pid that was passed
in, which is not all that safe when one of the users is /proc.
Admittedly the proc code should do some sanity checking on the range
(and that will be the next commit), but that doesn't mean that the
helper functions should just do that pidmap pointer arithmetic without
checking the range of its arguments.
So clamp 'last' to PID_MAX_LIMIT. The fact that we then do "last+1"
doesn't really matter, the for-loop does check against the end of the
pidmap array properly (it's only the actual pointer arithmetic overflow
case we need to worry about, and going one bit beyond isn't going to
overflow).
[ Use PID_MAX_LIMIT rather than pid_max as per Eric Biederman ]
Reported-by: Tavis Ormandy <taviso@cmpxchg8b.com>
Analyzed-by: Robert Święcki <robert@swiecki.net>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Igor Mammedov [Mon, 18 Apr 2011 17:17:17 +0000 (10:17 -0700)]
Input: xen-kbdfront - fix mouse getting stuck after save/restore
Mouse gets "stuck" after restore of PV guest but buttons are in working
condition.
If driver has been configured for ABS coordinates at start it will get
XENKBD_TYPE_POS events and then suddenly after restore it'll start getting
XENKBD_TYPE_MOTION events, that will be dropped later and they won't get
into user-space.
Regression was introduced by hunk 5 and 6 of
5ea5254aa0ad269cfbd2875c973ef25ab5b5e9db
("Input: xen-kbdfront - advertise either absolute or relative
coordinates").
Driver on restore should ask xen for request-abs-pointer again if it is
available. So restore parts that did it before 5ea5254.
Acked-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
[v1: Expanded the commit description]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Jeff Brown [Mon, 18 Apr 2011 17:08:02 +0000 (10:08 -0700)]
Input: estimate number of events per packet
Calculate a default based on the number of ABS axes, REL axes,
and MT slots for the device during input device registration.
Signed-off-by: Jeff Brown <jeffbrown@android.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Chris Mason [Mon, 18 Apr 2011 12:55:34 +0000 (08:55 -0400)]
Btrfs: fix free space cache leak
The free space caching code was recently reworked to
cache all the pages it needed instead of using find_get_page everywhere.
One loop was missed though, so it ended up leaking pages. This fixes
it to use our page array instead of find_get_page.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Christoph Hellwig [Mon, 18 Apr 2011 09:41:33 +0000 (11:41 +0200)]
block: add blk_run_queue_async
Instead of overloading __blk_run_queue to force an offload to kblockd
add a new blk_run_queue_async helper to do it explicitly. I've kept
the blk_queue_stopped check for now, but I suspect it's not needed
as the check we do when the workqueue items runs should be enough.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Jens Axboe [Mon, 18 Apr 2011 09:36:39 +0000 (11:36 +0200)]
block: blk_delay_queue() should use kblockd workqueue
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
NeilBrown [Mon, 18 Apr 2011 08:25:43 +0000 (18:25 +1000)]
md: fix up raid1/raid10 unplugging.
We just need to make sure that an unplug event wakes up the md
thread, which is exactly what mddev_check_plugged does.
Also remove some plug-related code that is no longer needed.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Mon, 18 Apr 2011 08:25:43 +0000 (18:25 +1000)]
md: incorporate new plugging into raid5.
In raid5 plugging is used for 2 things:
1/ collecting writes that require a bitmap update
2/ collecting writes in the hope that we can create full
stripes - or at least more-full.
We now release these different sets of stripes when plug_cnt
is zero.
Also in make_request, we call mddev_check_plug to hopefully increase
plug_cnt, and wake up the thread at the end if plugging wasn't
achieved for some reason.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Mon, 18 Apr 2011 08:25:42 +0000 (18:25 +1000)]
md: provide generic support for handling unplug callbacks.
When an md device adds a request to a queue, it can call
mddev_check_plugged.
If this succeeds then we know that the md thread will be woken up
shortly, and ->plug_cnt will be non-zero until then, so some
processing can be delayed.
If it fails, then no unplug callback is expected and the make_request
function needs to do whatever is required to make the request happen.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Mon, 18 Apr 2011 08:25:42 +0000 (18:25 +1000)]
md - remove old plugging code.
md has some plugging infrastructure for RAID5 to use because the
normal plugging infrastructure required a 'request_queue', and when
called from dm, RAID5 doesn't have one of those available.
This relied on the ->unplug_fn callback which doesn't exist any more.
So remove all of that code, both in md and raid5. Subsequent patches
with restore the plugging functionality.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Mon, 18 Apr 2011 08:25:41 +0000 (18:25 +1000)]
md/dm - remove remains of plug_fn callback.
Now that unplugging is done differently, the unplug_fn callback is
never called, so it can be completely discarded.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Mon, 18 Apr 2011 08:25:41 +0000 (18:25 +1000)]
md: use new plugging interface for RAID IO.
md/raid submits a lot of IO from the various raid threads.
So adding start/finish plug calls to those so that some
plugging happens.
Signed-off-by: NeilBrown <neilb@suse.de>
Jens Axboe [Mon, 18 Apr 2011 07:59:55 +0000 (09:59 +0200)]
block: drop queue lock before calling __blk_run_queue() for kblockd punt
If we know we are going to punt to kblockd, we can drop the queue
lock before calling into __blk_run_queue() since it only does a
safe bit test and a workqueue call. Since kblockd needs to grab
this very lock as one of the first things it does, it's a good
optimization to drop the lock before waking kblockd.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Jens Axboe [Mon, 18 Apr 2011 07:54:05 +0000 (09:54 +0200)]
Revert "block: add callback function for unplug notification"
MD can't use this since it really requires us to be able to
keep more than a single piece of state for the unplug. Commit
048c9374 added the required support for MD, so get rid of this
now unused code.
This reverts commit
f75664570d8b75469cc468f23c2b27220984983b.
Conflicts:
block/blk-core.c
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>