- 06 Jun, 2013 21 commits
-
-
H Hartley Sweeten authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
This reverts commit 37d4093f. 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 authored
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 78c37d19, 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 authored
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 authored
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 authored
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 authored
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>
-
- 05 Jun, 2013 19 commits
-
-
Xenia Ragiadakou authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
'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>
-