Jiang Liu [Thu, 6 Jun 2013 16:07:29 +0000 (00:07 +0800)]
zram: kill unused zram_get_num_devices()
Now there's no caller of zram_get_num_devices(), so kill it.
And change zram_devices to static because it's only used in zram_drv.c.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiang Liu [Thu, 6 Jun 2013 16:07:28 +0000 (00:07 +0800)]
zram: simplify and optimize dev_to_zram()
Simplify and optimize dev_to_zram() without walking the zram_devices
array.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiang Liu [Thu, 6 Jun 2013 16:07:27 +0000 (00:07 +0800)]
zram: protect sysfs handler from invalid memory access
Use zram->init_lock to protect access to zram->meta, otherwise it
may cause invalid memory access if zram->meta has been freed by
zram_reset_device().
This issue may be triggered by:
Thread 1:
while true; do cat mem_used_total; done
Thread 2:
while true; do echo 8M > disksize; echo 1 > reset; done
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiang Liu [Thu, 6 Jun 2013 16:07:26 +0000 (00:07 +0800)]
zram: avoid access beyond the zram device
Function valid_io_request() should verify the entire request are within
the zram device address range. Otherwise it may cause invalid memory
access when accessing/modifying zram->meta->table[index] because the
'index' is out of range. Then it may access non-exist memory, randomly
modify memory belong to other subsystems, which is hard to track down.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiang Liu [Thu, 6 Jun 2013 16:07:25 +0000 (00:07 +0800)]
zram: avoid double free in function zram_bvec_write()
When doing a patial write and the whole page is filled with zero,
zram_bvec_write() will free uncmem twice.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiang Liu [Thu, 6 Jun 2013 16:07:24 +0000 (00:07 +0800)]
zram: destroy all devices on error recovery path in zram_init()
On error recovery path of zram_init(), it leaks the zram device object
causing the failure. So change create_device() to free allocated
resources on error path.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiang Liu [Thu, 6 Jun 2013 16:07:23 +0000 (00:07 +0800)]
zram: use zram->lock to protect zram_free_page() in swap free notify path
zram_slot_free_notify() is free-running without any protection from
concurrent operations. So there are race conditions between
zram_bvec_read()/zram_bvec_write() and zram_slot_free_notify(),
and possible consequences include:
1) Trigger BUG_ON(!handle) on zram_bvec_write() side.
2) Access to freed pages on zram_bvec_read() side.
3) Break some fields (bad_compress, good_compress, pages_stored)
in zram->stats if the swap layer makes concurrently call to
zram_slot_free_notify().
So enhance zram_slot_free_notify() to acquire writer lock on zram->lock
before calling zram_free_page().
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiang Liu [Thu, 6 Jun 2013 16:07:22 +0000 (00:07 +0800)]
zram: avoid invalid memory access in zram_exit()
Memory for zram->disk object may have already been freed after returning
from destroy_device(zram), then it's unsafe for zram_reset_device(zram)
to access zram->disk again.
We can't solve this bug by flipping the order of destroy_device(zram)
and zram_reset_device(zram), that will cause deadlock issues to the
zram sysfs handler.
So fix it by holding an extra reference to zram->disk before calling
destroy_device(zram).
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 6 Jun 2013 00:49:55 +0000 (17:49 -0700)]
staging: comedi: pcl730: tidy up multi-line comment
Tidy up the multi-line comment at the beginning of the file to
follow the CodingStyle.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 6 Jun 2013 00:49:37 +0000 (17:49 -0700)]
staging: comedi: pcl730: rename the boardinfo table
Rename the boardinfo table so it has namespace associated with the
driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 6 Jun 2013 00:49:19 +0000 (17:49 -0700)]
staging: comedi: pcl730: tidy up pcl730_attach()
For aesthetic reasons, add some whitespace to the subdevice init
and reorder it a bit.
Remove the blank line printk at the end of the attach.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 6 Jun 2013 00:49:00 +0000 (17:49 -0700)]
staging: comedi: pcl730: tidy up pcl730_di_insn()
For aesthetic reasons, rename the function.
Use a local variable for the 'reg' offset that is stored in the
comedi_subdevice 'private' pointer to minimize the number of casts.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 6 Jun 2013 00:48:39 +0000 (17:48 -0700)]
staging: comedi: pcl730: tidy up pcl730_do_insn()
For aesthetic reasons, rename the function.
Use a local variable for the 'reg' offset that is stored in the
comedi_subdevice 'private' pointer to minimize the number of casts.
Also, add local variables for the 'mask' and 'bits'.
The outputs only need to be updated if the 'mask' indicates that the
'bits' are changing. Move the update code into the main 'if (mask)'
block.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 6 Jun 2013 00:48:17 +0000 (17:48 -0700)]
staging: comedi: pcl730: tidy up the boardinfo
Convert the boardinfo declaration to C99 format and move it near the
struct definition.
Since the *_SIZE defines are only used in the boardinfo, remove them
and just open code the values in the boardinfo.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:52:31 +0000 (15:52 -0700)]
staging: comedi: introduce comedi_range_is_{bi,uni}polar()
Introduce some helper functions to check if a given 'range' index
to a comedi_subdevice 'range_table' is a bipolar or unipolar range.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:39:16 +0000 (15:39 -0700)]
staging: comedi: pcmad: remove unnecessary includes
This driver does not use interrupts and the comedi core handles the
allocation of the io resource so these includes are not required.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:38:57 +0000 (15:38 -0700)]
staging: comedi: pcmad: fix analog input data on pcmad12
According to the PCM-A/D-12/16 Operations Manual:
NOTE: On the PCM-A/D-12 the lower nibble of the hex value will always be 0.
Fix the pcmad_ai_insn_read() function to properly handle this by shifting
the data after it has been read.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:38:37 +0000 (15:38 -0700)]
staging: comedi: pcmad: properly handle analog input encoding configuration
The comedi_config utility is used to attach to this board. One of the
configuration options passed by the user sets the analog input encoding
for straight binary or two's complement data. The hardware produces
straight binary data when jumpered for 5V unipolar inputs and two's
complement data when jumpered for +-10V bipolar inputs.
Use the configuration option to correctly set the comedi_subdevice
range_table.
We can then use a helper function to determine what the range is when
reading the analog inputs. This allows removing the 'twos_comp' variable
from the private data (which was actually never used).
Since the private data is now empty, remove it completely.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:38:14 +0000 (15:38 -0700)]
staging: comedi: pcmad: properly handle single/diff input configuration
The comedi_config utility is used to attach to this board. One of the
configuration options passed by the user sets the analog input reference
for single-ended or differential inputs.
Use the configuration option to correctly set the comedi_subdevice flags
as well as the number of channels.
Remove the 'differential' variable from the private data. Its not used
by the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:37:53 +0000 (15:37 -0700)]
staging: comedi: pcmad: change boardinfo 'n_ai_bits' to 'ai_maxdata'
This information is only used to set the subdevice 'maxdata'. Change
it so the calculation is not needed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:37:33 +0000 (15:37 -0700)]
staging: comedi: pcmad: tidy up pcmad_attach()
Remove the comment before the function, the options are documented at
the beginning of the file.
Remove the PCMAD_SIZE define. It's only used in the attach to specify
the io region size.
For aesthetic reasons, add some whitespace to the subdevice init and
reorder them a bit.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:37:06 +0000 (15:37 -0700)]
staging: comedi: pcmad: tidy up pcmad_ai_insn_read()
Use a local variable to read and munge the analog input data instead
of directly using the 'data' pointer passed to the function.
(*insn_read) functions either return an errno or the number of data
values read. Change the final return to insn->n to make this clearer.
Tidy up the function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:36:45 +0000 (15:36 -0700)]
staging: comedi: pcmad: remove need for boardinfo in pcmad_ai_insn_read()
The const boardinfo pointer is only used in this function to work out
the value needed to convert the data to its twos complement. Use the
comedi_subdevice 'maxdata' to do this conversion and remove the 'board'
pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:36:24 +0000 (15:36 -0700)]
staging: comedi: pcmad: return errno if AI conversion times out
Instead of returning invalid data, return -ETIME if the analog input
conversion times out.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:36:00 +0000 (15:36 -0700)]
staging: comedi: pcmad: move the boardinfo
For aesthetic reasons, move the boardinfo declaration so it follows
the definition.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Jun 2013 22:35:39 +0000 (15:35 -0700)]
staging: comedi: pcmad: tidy up multi-line comments
Tidy up the multi-line comments at the beginning of the file to
follow the CodingStyle.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Thu, 6 Jun 2013 13:40:51 +0000 (16:40 +0300)]
staging: rtl8192u: fix read_nic_* functions
read_nic_*() functions are defined in r8192U_core.c.
They call internally usb_control_msg() to read the
nic registers and return the value read.
Following a remark made by Dan Carpenter, if usb_control_msg()
fails, the value returned will be invalid.
To accommodate for this, this patch changes the functions
to take a pointer as argument to set the value read and
return 0 on success and the error status on failure, so
that callers of read_nic_*() can check the return status.
Some other fixes introduced in read_nic_*() functions are:
The expressions (1<<EPROM_*_SHIFT) used to address and set
the individual bits of the eeprom register were replaced
with EPROM_*_BIT bitmasks to make the code more intuitive.
EPROM_*_BIT bitmasks were defined in r8192U_hw.h and
EPROM_*_SHIFT were removed.
In netdev_err(), which is called in case of failure,
the hardcoded function name in the error log message was
replaced with __func__ to reduce line size.
Also, from the error log message, it was omitted the word
"Timeout" and it is just reported the error code since the
failure can not only be due to timeout expiration but also
due to a memory allocation failure. In case of timeout
expiration, usb_start_wait_urb() prints an appropriate log
message when debug is enabled.
Finally, some minor fixes to the coding style were applied in
lines affected by the above changes, including the removal
of ifdef DEBUG_RX (the debugging of reads and writes of the
nic registers shall be done with explicit check on their
return status which will be added in a follow on patch).
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Thu, 6 Jun 2013 07:30:49 +0000 (10:30 +0300)]
Staging: rtl8192u: fix a reversed test
Sean MacLennan fixed this in the rtl8192e driver and we should fix
it here as well.
It's pretty harmless. This information comes from the firmware, if
we were to hit this bug we would read beyond the end of the array
once or twice before returning and update our statistics with bogus
data.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Schilling [Thu, 6 Jun 2013 16:10:50 +0000 (18:10 +0200)]
keucr: fix some alignment- and whitespace-problems
resolves checkpatch errors and warnings regarding whitespace around
operators, line lengths and indentation.
Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laura Lawniczak [Thu, 6 Jun 2013 16:10:49 +0000 (18:10 +0200)]
keucr: moved function to other file
Function usb_stor_print_cmd was declared in init.c but only used
in transport.c. So it was reasonable to move it there and declare
it static
Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laura Lawniczak [Thu, 6 Jun 2013 16:10:48 +0000 (18:10 +0200)]
keucr: more readable and friendly error messages
Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laura Lawniczak [Thu, 6 Jun 2013 16:10:47 +0000 (18:10 +0200)]
keucr: migrate printk to dev_dbg/info/warn/err
as per suggestion of checkpatch.pl; this resolves warnings like "Prefer
netdev_info .. then dev_info .. to printk".
Changed signature of function usb_stor_print_cmd in init.c to enable
usage of dev_err
Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Schilling [Thu, 6 Jun 2013 16:10:46 +0000 (18:10 +0200)]
keucr: use more specific max_t(int, ..
as advised by checkpatch, changed generic max(..) to max_t(int, ..
Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Schilling [Thu, 6 Jun 2013 16:10:45 +0000 (18:10 +0200)]
keucr: remove some unneccesary typedefs
resolves checkpatch.pl warning "do not add new typedefs" and renames allcaps
structures.
Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Thu, 6 Jun 2013 15:04:07 +0000 (23:04 +0800)]
staging/lustre/libcfs: cleanup libcfs_kkuc_msg_put a bit
No need to cast count since it is already ssize_t. No need
to cast payload to const, but need __force instead to avoid
Sparse complaining.
Reported-and-Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Thu, 6 Jun 2013 15:04:06 +0000 (23:04 +0800)]
staging/lustre/mdc: fix procfs fops
mdc_kuc_fops is missing open/release handlers. I fixed it before but
somehow forgot to amend to the patch sent out. Sorry...
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Thu, 6 Jun 2013 14:59:14 +0000 (22:59 +0800)]
Revert "Revert "staging/lustre: drop CONFIG_BROKEN dependency""
This reverts commit
37d4093fd34775bbbf99bddb84a711bdb3ec6d5c.
I've verified that we now don't break build on X86_64 allmodconfig.
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Thu, 6 Jun 2013 14:59:13 +0000 (22:59 +0800)]
staging/lustre/libcfs: cleanup linux-crypto
We don't need to implement crc32 and crc32pclmul on our own.
The crc32-pclmul support was merged into the 3.8 kernel in commit
78c37d1, no need to keep a local copy in Lustre anymore.
The crc32 implementation is identical to crypto-crc32. So drop
Lustre's private implementation and select kernel crypto in Kconfig.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Thu, 6 Jun 2013 14:59:12 +0000 (22:59 +0800)]
staging/lustre: surround module_refcount with CONFIG_MODULE_UNLOAD
module_refcount() is not available when CONFIG_MODULE_UNLOAD is off.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Thu, 6 Jun 2013 14:59:11 +0000 (22:59 +0800)]
staging/lustre/libcfs: restore LINVRNT
It was mistakenly removed by coan. Add it back and also with a new
Kconfig option to enable it.
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Thu, 6 Jun 2013 14:59:10 +0000 (22:59 +0800)]
staging/lustre: remove lu_context_keys_dump and lu_debugging_setup
There are no callers of them. Besides, lu_context_keys_dump breaks
build when CONFIG_MODULES is not set.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Thu, 6 Jun 2013 14:59:09 +0000 (22:59 +0800)]
staging/lustre: call set_cpus_allowed_ptr instead of set_cpus_allowed
set_cpus_allowed is not available with CONFIG_CPUMASK_OFFSTACK on.
We should call set_cpus_allowed_ptr instead.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:32 +0000 (23:32 +0300)]
staging: rtl8192u: replace macro rx_hal_is_cck_rate() in r8192U_core.c
This patch replaces macro rx_hal_is_cck_rate() with
the static inline function rx_hal_is_cck_rate().
This replacement was suggested by Dan Carpenter and
has the following benefits:
- improves code readability
- guarantees type safety
- improves code efficiency by enforcing the evaluation of
the simple boolean expression (!pdrvinfo->RxHT) to be
done before the evaluation of the more complex one
(pdrvinfo->RxRate == DESC90_RATE1M ||
pdrvinfo->RxRate == DESC90_RATE2M ||
pdrvinfo->RxRate == DESC90_RATE5_5M ||
pdrvinfo->RxRate == DESC90_RATE11M)
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:31 +0000 (23:32 +0300)]
staging: rtl8192u: remove trailing whitespace in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: trailing whitespace
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:30 +0000 (23:32 +0300)]
staging: rtl8192u: remove space before '++' in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited before that '++'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:29 +0000 (23:32 +0300)]
staging: rtl8192u: remove space after reference '&' in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited after that '&'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:28 +0000 (23:32 +0300)]
staging: rtl8192u: add spaces around ?:&&|| in r8192U_core.c
This patch fixes the following checkpatch errors:
ERROR: spaces required around that '?'
ERROR: spaces required around that ':'
ERROR: spaces required around that '&&'
ERROR: spaces required around that '||'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:27 +0000 (23:32 +0300)]
staging: rtl8192u: fix return statements in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: return is not a function, parentheses are not required
Also, fixes the spaces in return statements to
improve code readability.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:26 +0000 (23:32 +0300)]
staging: rtl8192u: fix spaces in array indexing in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited before open square bracket '['
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Wed, 5 Jun 2013 10:06:46 +0000 (18:06 +0800)]
staging: octeon-usb: remove duplicated include from octeon-hcd.c
Remove duplicated include.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:06:40 +0000 (19:06 -0700)]
staging: comedi: pcmda12: tidy up multi-line comments
Tidy up the multi-line comments at the beginning of the file to
follow the CodingStyle.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:06:21 +0000 (19:06 -0700)]
staging: comedi: pcmda12: return 0 for successful attach
Return 0 instead of 1 to indicate a successful attach.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:06:02 +0000 (19:06 -0700)]
staging: comedi: pcmda12: remove 'IOSIZE' define
This define has a very generic name. Its only used in one place
so instead of renaming it just remove it and open code the value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:05:45 +0000 (19:05 -0700)]
staging: comedi: pcmda12: tidy up zero_chans()
Rename the function so it has namespace associated with the driver.
For aesthetic reasons, move the function closer to it's only caller.
Pass the comedi_subdevice pointer to the function so we can get the
number of channels to reset from it instead of using the 'CHANS'
define.
Remove the 'CHANS' define since it's a very generic name.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:05:27 +0000 (19:05 -0700)]
staging: comedi: pcmda12: remove {LSB,MSB}_PORT macros
These macros rely on a local variable having a specific name.
Remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:05:08 +0000 (19:05 -0700)]
staging: comedi: pcmda12: cleanup pcmda12_ao_insn_write()
Only the last value needs to be saved for readback.
Remove the LSB and MSB macros.
(*insn_write) functions should return an errno or the number of
samples actually read. Change the final return to insn->n to
make this clear.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:04:45 +0000 (19:04 -0700)]
staging: comedi: pcmda12: cleanup pcmda12_ao_insn_read()
Remove the boilerplate comment from the 'skel' driver.
To initiate the simultaneaous transfer, only one analog output
register needs to be read. Move the read out of the for() loop.
(*insn_read) functions should return an errno or the number of
samples actually read. Change the final return to insn->n to
make this clear.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:04:23 +0000 (19:04 -0700)]
staging: comedi: pcmda12: rename the analog output (*insn_{read, write}) functions
For aesthetic reasons. rename these functions so they have namespace
associated with the driver. Also remove the unnecessary '&' when setting
the callbacks.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:04:03 +0000 (19:04 -0700)]
staging: comedi: pcmda12: tidy up subdevice init
For aesthetic reasons. add some whitespace to the subdevice init
and reorder it a bit.
Remove the 's->private = NULL', it was kzalloc'ed by the core and
will already be NULL.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:03:47 +0000 (19:03 -0700)]
staging: comedi: pcmda12: tidy up comedi_lrange table
Tidy up the whitespace in the comedi_lrange table.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 02:03:29 +0000 (19:03 -0700)]
staging: comedi: pcmda12: remove 'BITS' define
'BITS' is a pretty generic name for a define. It's only used in
the board attach to set the subdevice 'maxdata' so instead of
renaming the define just open code the value and remove the define.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:04:33 +0000 (18:04 -0700)]
staging: comedi: pcmuio: fix the last > 80 char line warning
Fix the last checkpatch.pl warning in this file.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:04:13 +0000 (18:04 -0700)]
staging: comedi: pcmuio: remove the pcmuio_dio_insn_bits() debug noise
These dev_dbg() and printk() messages are just development noise.
Remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:03:50 +0000 (18:03 -0700)]
staging: comedi: pcmuio: fix > 80 char line warnings
Cleanup some comments to fix the checkpatch.pl warnings about lines
over 80 characters.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:03:31 +0000 (18:03 -0700)]
staging: comedi: pcmuio: remove some boilerplate comments
These comments are boilerplate from the 'skel' driver. Just remove
them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:03:12 +0000 (18:03 -0700)]
staging: comedi: pcmuio: tidy up the boardinfo
Remove the boilerplate comment about the boardinfo struct.
For aesthetic reasons, move the boardinfo declaration near the
struct definition.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:02:52 +0000 (18:02 -0700)]
staging: comedi: pcmuio: tidy up driver #define's
Add some whitespace to the #defines to make them more readable.
Tidy up the comments.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:02:34 +0000 (18:02 -0700)]
staging: comedi: pcmuio: remove 'CALC_N_SUBDEVS' macro
This macro is only used once in the driver, just remove it.
This also fixes a > 80 char line checkpatch.pl warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:02:07 +0000 (18:02 -0700)]
staging: comedi: pcmuio: tidy up the multi-line comments
Tidy up the multi-line comments at the beginning of the file to
follow the CodingStyle.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:01:37 +0000 (18:01 -0700)]
staging: comedi: pcmuio: refactor interrupt_pcmuio()
Refactor this function into two new functions in order to reduce the indent
levels and clean up the ugly line breaks that, unsuccessfully, try to keep
the lines < 80 chars.
The first function handles the irq for a specific asic.
The second function handles the irq for a specific subdevice that is
associated with the asic.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Jun 2013 01:01:17 +0000 (18:01 -0700)]
staging: comedi: pcmuio: remove 'subpriv' macro
The 'subpriv' macro relies on a local variable having a specific name.
Replace the macro with a local variable where used.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Chan [Tue, 4 Jun 2013 05:55:39 +0000 (22:55 -0700)]
staging: gdm72xx: fix typos in Kconfig
Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Chan [Tue, 4 Jun 2013 05:55:38 +0000 (22:55 -0700)]
staging: gdm72xx: WIMAX_GDM72XX should depend on either USB or MMC
The gdm72xx driver needs to have either the USB or SDIO implementation
enabled to provide useful functionalities, so the driver should depend
on either USB or MMC. This patch makes WIMAX_GDM72XX depend on either
USB or MMC.
Also, WIMAX_GDM72XX needs to be built as a module if its dependent
interface, either USB or MMC, is built as a module. This patch enforces
that in the WIMAX_GDM72XX_USB and WIMAX_GDM72XX_SDIO dependency.
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Schid [Wed, 5 Jun 2013 12:04:32 +0000 (14:04 +0200)]
staging/asus_oled fixed linebreak and printk issue
fixed a linebreak within an error message string coding style
issue reported by checkpatch.pl and dev_err format parameters
Signed-off-by: Matthias Schid <aircrach115@gmail.com>
Signed-off-by: Stefan Huber <steffhip@googlemail.com>
Signed-off-by: Simon Puels <simon.puels@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Schid [Wed, 5 Jun 2013 10:50:44 +0000 (12:50 +0200)]
staging/asus_oled fixed alignment in defines
replaced spaces in incorrect alignment in defines with tabs
Signed-off-by: Matthias Schid <aircrach115@gmail.com>
Signed-off-by: Stefan Huber <steffhip@googlemail.com>
Signed-off-by: Simon Puels <simon.puels@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Mon, 3 Jun 2013 21:16:21 +0000 (02:46 +0530)]
staging: octeon-usb: call device_unregister when platform_device_register_simple fails
device_register is called before platform_device_register_simple gets called.
unregister and reset the octeon_usb_registered variable
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Mon, 3 Jun 2013 21:16:20 +0000 (02:46 +0530)]
staging: octeon-usb: check return value of platform_device_register_simple
the return value is a pointer having an error set. we have to check for
IS_ERR and return PTR_ERR when appropriate
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Mon, 3 Jun 2013 21:16:19 +0000 (02:46 +0530)]
staging: octeon-usb: fix more checkpatch errors/warns
place the opening brace right after the if, else, else if, switch
statements.
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Mon, 3 Jun 2013 21:16:18 +0000 (02:46 +0530)]
staging: octeon-usb: more checkpatch fixes
place the opening brace right after the if,else, else if,switch
statements.
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Mon, 3 Jun 2013 21:16:17 +0000 (02:46 +0530)]
staging: octeon-usb: fix checkpatch error
this places the opening braces just after the if, else, elseif, switch
statements
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Mon, 3 Jun 2013 21:16:16 +0000 (02:46 +0530)]
staging: octeon-usb: place opening braces of structs, enums on top
this fixes coding style problem, placing of the braces just right after the
struct name, not below the struct name.
this reduces the errors reported by checkpatch script from
total: 1496 errors, 2133 warnings, 3344 lines checked
to
total: 1488 errors, 2132 warnings, 3336 lines checked
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 5 Jun 2013 22:21:47 +0000 (15:21 -0700)]
Revert "staging/lustre: drop CONFIG_BROKEN dependency"
This reverts commit
52f6317528c6877c8c5d4b2ab7a04430af99ed4a.
It's still broken, especially for a simple build on x86 with 'make
allmodconfig'
As no fixes seem forthcoming, just mark it broken.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 5 Jun 2013 13:13:40 +0000 (21:13 +0800)]
staging/lustre/lprocfs: interpret result of dt_statfs() correctly
I accidentally reversed the sense of the error check after the call to
dt_statfs() in lprocfs_dt_rd_{blksize,{files,kbytes}{free,avail}.
Unreverse the error checking.
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3300
Lustre-change: http://review.whamcloud.com/6385
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 3 Jun 2013 21:37:09 +0000 (14:37 -0700)]
staging: comedi: ni_daq_700: fix some trailing whitespace errors
checkpatch.pl reports 2 errors about trailing whitespace in this file.
Fix them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 3 Jun 2013 21:38:21 +0000 (14:38 -0700)]
staging: comedi: Kconfig: COMEDI_S526 is a PC/104 board not a PCI board
The Sensoray Model 526 board is a PC/104 style board not a PCI board.
Move it into the correct group in the Kconfig and Makefile.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:48 +0000 (23:58 +0300)]
staging: rtl8192u: fix identation in r8192U_core.c
This patch fixes identation and alignment in r8192U_core.c.
Also, removes spaces from idents when applicable.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:47 +0000 (23:58 +0300)]
staging: rtl8192u: remove unnecessary line continuations in r8192U_core.c
This patch fixes the following checkpatch warning:
WARNING: Avoid unnecessary line continuations
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:46 +0000 (23:58 +0300)]
staging: rtl8192u: fix function definitions' style in r8192U_core.c
This patch fixes the function definitions' style in order
to be uniform across the file and in compliance with the
linux kernel coding style.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:45 +0000 (23:58 +0300)]
staging: rtl8192u: fix braces in r8192U_core.c
This patch fixes the position of braces and removes
redundant braces, following the kernel coding style
conventions.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:44 +0000 (23:58 +0300)]
staging: rtl8192u: remove dead and commented-out code in r8192U_core.c
This cleanup patch removes commented-out code and
the functions rtl8192_dump_reg() and print_buffer()
which are not called anywhere in the driver.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 4 Jun 2013 23:03:22 +0000 (16:03 -0700)]
Revert "ozwpan: replace alloc_skb with dev_alloc_skb in ozpd.c"
This reverts commit
812eb995d4c0795ea1fb431146523cace2693f49.
I shouldn't have applied it, my fault...
Cc: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 4 Jun 2013 23:02:46 +0000 (16:02 -0700)]
Revert "ozwpan: replace alloc_skb with dev_alloc_skb in ozproto.c"
This reverts commit
c3147965384f1a5ace685dc34e78f9bb201f357d.
I shouldn't have applied it, my fault.
Cc: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 4 Jun 2013 23:02:03 +0000 (16:02 -0700)]
Revert "ozwpan: replace kfree_skb with dev_kfree_skb in ozpd.c"
This reverts commit
91c6c4bdb241cd27082cfa130675a2cd52cda5a4.
It wasn't supposed to be applied, my fault.
Cc: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 4 Jun 2013 23:01:33 +0000 (16:01 -0700)]
Revert "ozwpan: replace kfree_skb with dev_kfree_skb in ozproto.c"
This reverts commit
5109c8a0c17cea53975ebf6dbc5403c431fd809d.
I shouldn't have applied this, my fault...
Cc: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 4 Jun 2013 22:59:23 +0000 (15:59 -0700)]
staging: android: sync: fix up a sparse warning
Fix up a sparse warning about sync_dump that was reported.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Erik Gilling <konkers@android.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Sat, 1 Jun 2013 18:42:58 +0000 (21:42 +0300)]
staging: MIPS: add Octeon USB HCD support
Add support for Octeon USB HCD. Tested on EdgeRouter Lite with USB
mass storage.
The driver has been extracted from GPL sources of EdgeRouter Lite firmware
(based on Linux 2.6.32.13). Some minor fixes and cleanups have been done
to make it work with 3.10-rc3.
$ uname -a
Linux (none)
3.10.0-rc3-edge-00005-g86cb5bc #41 SMP PREEMPT Sat Jun 1 20:41:46 EEST 2013 mips64 GNU/Linux
$ modprobe octeon-usb
[ 37.971683] octeon_usb: module is from the staging directory, the quality is unknown, you have been warned.
[ 37.983649] OcteonUSB: Detected 1 ports
[ 37.999360] OcteonUSB OcteonUSB.0: Octeon Host Controller
[ 38.004847] OcteonUSB OcteonUSB.0: new USB bus registered, assigned bus number 1
[ 38.012332] OcteonUSB OcteonUSB.0: irq 122, io mem 0x00000000
[ 38.019970] hub 1-0:1.0: USB hub found
[ 38.023851] hub 1-0:1.0: 1 port detected
[ 38.028101] OcteonUSB: Registered HCD for port 0 on irq 122
[ 38.391443] usb 1-1: new high-speed USB device number 2 using OcteonUSB
[ 38.586922] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 38.597375] scsi0 : usb-storage 1-1:1.0
[ 39.604111] scsi 0:0:0:0: Direct-Access USB DISK 2.0 PMAP PQ: 0 ANSI: 4
[ 39.619113] sd 0:0:0:0: [sda]
7579008 512-byte logical blocks: (3.88 GB/3.61 GiB)
[ 39.630696] sd 0:0:0:0: [sda] Write Protect is off
[ 39.635945] sd 0:0:0:0: [sda] No Caching mode page present
[ 39.641464] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 39.651341] sd 0:0:0:0: [sda] No Caching mode page present
[ 39.656917] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 39.664296] sda: sda1 sda2
[ 39.675574] sd 0:0:0:0: [sda] No Caching mode page present
[ 39.681093] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 39.687223] sd 0:0:0:0: [sda] Attached SCSI removable disk
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sun, 2 Jun 2013 16:55:26 +0000 (22:25 +0530)]
staging: btmtk_usb: use GFP_KERNEL inplace of GFP_ATOMIC in _probe path
the _probe function doesn't run in interrupt context, so no need to use
the GFP_ATOMIC allocations, instead driver can request for GFP_KERNEL
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsh Kumar [Fri, 31 May 2013 15:30:42 +0000 (21:00 +0530)]
Staging: winbond: Check for unsuccessful allocation immediately
Check to see if allocation by kzalloc() or usb_alloc_urb() was unsuccessful
immediately after the allocation. Exit from the function can be right at that
point in case of allocation failure.
This avoids unnecessary use of usb_alloc_urb() & usb_free_urb() if kzalloc()
returns NULL.
Also, makes the code better structured & easier to understand.
Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yijing Wang [Thu, 30 May 2013 10:24:07 +0000 (18:24 +0800)]
staging: dwc2: remove redundant D0 power state set
Pci_enable_device() will set device power state to D0,
so it's no need to do it again in dwc2_driver_probe().
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Thu, 30 May 2013 08:00:34 +0000 (11:00 +0300)]
Staging: crystalhd: remove an unneeded NULL check
We already established earlier in the function that "temp" is
non-NULL. We also don't need to set to NULL because it's a stack
variable an we return immediately.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>