This is only an API consolidation and should make things more readable
Converting milliseconds to jiffies by val * HZ / 1000 is technically
not wrong but msecs_to_jiffies(val) is the cleaner solution and handles
corner cases correctly.
Signed-off-by: Nicholas Mc Guire <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit fixes the following errors reported by checkpatch.pl -f:
./rts5208/ms.c:1294: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1345: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1622: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1991: ERROR: space prohibited before that ',' (ctx:WxW)
This patch also adds missing spaces before and after '+' sign in two places.
This file has some other style issues and they will be fixed with latter
patches.
Signed-off-by: Robert Kmiec <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
void pointers do not need to be cast to other pointer types.
The semantic patch used to find this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Build tested it.
Signed-off-by: Tapasweni Pathak <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the opposite thing from older versions of gcc
(emits code for an externally linkable version of the inline function). "static
inline" does the intended behavior in both gcc and clang.
Signed-off-by: Behan Webster <[email protected]>
Suggested-by: Arnd Bergmann <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Define the helper function rtsx_enable_pcie_intr to shorten the
rtsx_reset_chip code and get rid of the LONG_LINE checkpatch warnings.
Signed-off-by: Fabio Falzoi <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Define the helper function rtsx_reset_aspm to shorten the
rtsx_reset_chip code and get rid of the LONG_LINE checkpatch warnings.
Signed-off-by: Fabio Falzoi <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Unnecessary parentheses around the right hand side of an assignment
is removed using the following semantic patch:
@@
identifier x,f;
constant C;
@@
(
-x = (f / C );
+x = f / C ;
|
-x = (f % C );
+x = f % C ;
)
Signed-off-by: Tina Johnson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If a variable has value 0, then there is no point in combining it with other things with |, as for any
x, 0 | x is just x. The following semantic patch finds this problem.
@@
expression x,e,e1;
statement S;
@@
if (x == 0) {
<... when != x = e1
when != while(...) S
when != for(...;...;...) S
(
* x |= e
|
* x | e
)
...>
}
Signed-off-by: Jiayi Ye <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Convert code in format of if (a) if(b) { [...] } to one line with a
simple ternary operation to avoid unnecesary increase of indentation
level.
Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Make a couple of lines shorter than the max limit by diving them and
also make sure to align them properly where possible.
Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Make all divided lines aligned to the opening paranthesis.
Basically makes all lines aligned to the opening paranthesis to make the
code more readable and it also gets rid of a lot of checkpatch.pl
"checks".
Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Convert labels from Camel Case to lower case, remove unnecessary
parantheses around operands of dereference operators and remove unneeded
empty lines before }.
Gets rid of a checkpatch.pl "check" that code should avoid Camel Case,
also the code had a bunch of &(a) where a is some variable so it gets
rid of them too. Finally, in a few places there were a empty line
before } so remove them.
Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Join together chained if's where possible to lower the indentation
level.
In a lot of places of this code the indentation level is already very
high.
As a result, this patch increases the code flow and readability.
Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes the checkpatch.pl warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Roxana Blaj <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes the checkpatch.pl warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Roxana Blaj <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes "void function return statements are not generally
useful"checkpatch.pl warning
Signed-off-by: Melike Yurtoglu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The following patch fixes the checkpatch.pl warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Esra Altintas <[email protected]>
Acked-by: Daniel Baluta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes checkpatch.pl warning in rtsx.c file.
WARNING: void function return statements are not generally useful
Signed-off-by: Tapasweni Pathak <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes the following checkpatch.pl warnings:
WARNING: Missing a blank line after declarations
Signed-off-by: Mahati Chamarthy <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes the warning:
WARNING: Missing a blank line after declarations
Signed-off-by: Roxana Blaj <[email protected]>
Acked-by: Daniel Baluta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The following checkpatch warning was fixed :
WARNING: Missing a blank line after declarations
Signed-off-by: Tina Johnson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes the warning:
WARNING: void function return statements are not generally useful
Signed-off-by: Roxana Blaj <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes the warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Roxana Blaj <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
CONFIG_RTS5208_DEBUG is no more needed, we rely on dynamic debug config options
instead.
Signed-off-by: Fabio Falzoi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use dev_dbg with %*ph format specifier and print_hex_dump_bytes to dump memory
instead of relying on custom macro.
Signed-off-by: Fabio Falzoi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Pull SCSI updates from James Bottomley:
"This patch set consists of the usual driver updates (ufs, storvsc,
pm8001 hpsa). It also has removal of the user space target driver
code (everyone is using LIO now), a partial PCI MSI-X update, more
multi-queue updates, conversion to 64 bit LUNs (so we could
theoretically cope with any LUN returned by a device) and placeholder
support for the ZBC device type (Shingle drives), plus an assortment
of minor updates and bug fixes"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (143 commits)
scsi: do not issue SCSI RSOC command to Promise Vtrak E610f
vmw_pvscsi: Use pci_enable_msix_exact() instead of pci_enable_msix()
pm8001: Fix invalid return when request_irq() failed
lpfc: Remove superfluous call to pci_disable_msix()
isci: Use pci_enable_msix_exact() instead of pci_enable_msix()
bfa: Use pci_enable_msix_exact() instead of pci_enable_msix()
bfa: Cleanup bfad_setup_intr() function
bfa: Do not call pci_enable_msix() after it failed once
fnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
scsi: use short driver name for per-driver cmd slab caches
scsi_debug: support scsi-mq, queues and locks
Drivers: add blist flags
scsi: ufs: fix endianness sparse warnings
scsi: ufs: make undeclared functions static
bnx2i: Update driver version to 2.7.10.1
pm8001: fix a memory leak in nvmd_resp
pm8001: fix update_flash
pm8001: fix a memory leak in flash_update
pm8001: Cleaning up uninitialized variables
pm8001: Fix to remove null pointer checks that could never happen
...
Remove all debug printks used just to mark when we enter a function.
Signed-off-by: Fabio Falzoi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The SCSI standard defines 64-bit values for LUNs, and large arrays
employing large or hierarchical LUN numbers become more and more
common.
So update the linux SCSI stack to use 64-bit LUN numbers.
Signed-off-by: Hannes Reinecke <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Ewan Milne <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
This patch enhances kernel style usage for the rts5208 driver.
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet
kernel coding style guidelines. This issue was reported by checkpatch.
Signed-off-by: Benoit Taine <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The patch fa590c222f: "staging: rts5208: add support for rts5208
and rts5288" from Nov 12, 2013, leads to the following static checker
warning:
drivers/staging/rts5208/rtsx_chip.c:107 rtsx_enable_bus_int()
warn: add curly braces?
This warning is produced because incorrect code indent.
Signed-off-by: Micky Ching <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix checkpatch.pl issues with line over 80 characters in rtsx_card.c
Signed-off-by: Gulsah Kose <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Return is not a method and doesn't need parentheses. Removed unnecaasary
parentheses.
Signed-off-by: Gulsah Kose <[email protected]>
Acked-by: Paul E. McKenney <[email protected]>
Signed-off-by: Peter P Waskiewicz Jr <[email protected]>
Fix checkpatch.pl issues with line over 80 characters in rtsx.c
Signed-off-by: Gulsah Kose <[email protected]>
Acked-by: Paul E. McKenney <[email protected]>
Signed-off-by: Peter P Waskiewicz Jr <[email protected]>
Fixes the following checkpatch warning:
WARNING: line over 80 characters.
Signed-off-by: Keerthimai Janarthanan <[email protected]>
Reviewed-by: Sarah Sharp <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There are still many rts5208/5288 card readers being used, but no
drivers are supported them in kernel now. This driver can make a
great convenience for people who use them.
Many other rts-series card reader are supported by mfd driver, but due
to much difference with others, rts5208/5288 can not add into mfd driver
pretty now, so we provide a separated driver here to support the device.
Signed-off-by: Micky Ching <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>