Commit graph

188 commits

Author SHA1 Message Date
Wayne Porter 6d2117f1a5 staging: rts5208: xd.c: Remove multiple assignments
Checkpatch found multiple assignments on one line so move
them to their own lines.

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:05 +02:00
Wayne Porter 40eeb86243 staging: rts5208: xd.c: Fix CamelCase
Covert CamelCase as checkpatch suggests

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:04 +02:00
Wayne Porter daaca111db staging: rts5208: xd.c: Clean up comparison to NULL
Checkpatch recommended changes

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:04 +02:00
Wayne Porter 14c42c79fe staging: rts5208: xd.c: Remove unnecessary parentheses
Issues found with checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:03 +02:00
Wayne Porter d554972076 staging: rts5208: Logical continuation fixes
Checkpatch detected multiple instances of logical continuation warnings

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:03 +02:00
Wayne Porter dd67ec8111 staging: rts5208: Alignment fix
Coding style checks found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:02 +02:00
Wayne Porter b32e807d26 staging: rts5208: xd.h: Alignment fix
Change alignment to match open parenthesis

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:01 +02:00
Wayne Porter 259334ed30 Staging: rts5208: Fix indentation warnings
Fix code indentation warnings detected by checkpatch.pl

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:14:03 +02:00
Namrata A Shettar 6c5d28f523 staging: rts5208: Replace explicit NULL comparison
Replace explicit NULL comparison to resolve checkpatch issues.

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:14:03 +02:00
Namrata A Shettar 6d81bf2550 staging: rts5208: Add space around binary operators
Add space around binary operators to resolve checkpatch issue.

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:14:03 +02:00
Sergio Paracuellos e453eecbe6 staging: rts5208: fix style warnings in xd.c
This patch fixes the following checkpatch.pl warning in xd.c:
WARNING: else is not generally useful after a break or return

It also makes code more uniform with the new changes

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:40:30 +02:00
Sergio Paracuellos e040b62683 staging: rts5208: fix style warnings in sd.c
This patch fixes the following checkpatch.pl warning in sd.c:
WARNING: else is not generally useful after a break or return

It also makes code more uniform with the new changes

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:40:30 +02:00
Sergio Paracuellos 9afccdfe48 staging: rts5208: fix line style warnings in spi.c
This patch fixes the following checkpatch.pl warning in spi.c:
 WARNING: line over 80 characters

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:40:30 +02:00
Sergio Paracuellos aeb92aef03 staging: rts5208: remove not used typedef in rtsx_sys.h
This patch fixes the following checkpatch.pl warning in rtsx_sys.h:
WARNING: do not add new typedefs

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:40:30 +02:00
Sergio Paracuellos 55e94ccb43 staging: rts5208: fix comment blocks style in rtsx.h
This patch fixes the following checkpatch.pl warning in rtsx.h:
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:40:30 +02:00
Sergio Paracuellos e89ac165a5 staging: rts5208: fix comment blocks style in rtsx_chip.h
This patch fixes the following checkpatch.pl warning in rtsx_chip.h:
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:40:30 +02:00
Sergio Paracuellos 20807e6ec4 staging: rts5208: avoid symbolic permissions in rtsx.c
This patch fixes the following checkpatch.pl warning in rtsx.c:
WARNING: Symbolic permissions are not preferred.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:40:30 +02:00
Sergio Paracuellos 8e7e0a9692 staging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_t
This patch fixes the following checkpatch.pl warning in rtsx.h:
WARNING: do not add new typedefs

It also remove DELAY_PARA_T because code is not using it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:40:30 +02:00
Rehas Sachdeva 7c7f236145 staging: rts5208: Remove space after cast
Removes unnecessary space after a cast. Issue found by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 14:03:04 +02:00
Rehas Sachdeva eceef9a3f4 staging: rts5208: Use BIT(x) macro
Replaces left shift operation (1 << x) by BIT(x). Issue found by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 14:03:04 +02:00
Rehas Sachdeva 0328217969 staging: rts5208: Put constant on right side of comparison
Replaces position of constant from left to right side of a comparison.
Additionally, modifies logical continuations to be on the previous line and
fixes alignment to match open parenthesis. Issues found by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 14:03:04 +02:00
Rehas Sachdeva bd778ef093 staging: rts5208: Fix indentation
Fixes indentation by removing unnecessary TAB. Issue found by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 14:03:04 +02:00
Rehas Sachdeva 50024433d4 staging: rts5208: Add spaces around operators
Adds spaces on either side of arithmetic and relational operators like
'-', '<' and '*'. Issue found by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 14:03:00 +02:00
Rehas Sachdeva c86bdd474a staging: rts5208: Remove unnecessary parentheses
Removes unnecessary parentheses from an expression of the form &(x).
Issue found by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 14:02:59 +02:00
Sandhya Bankar 5173abfc05 Staging: rts5208: Add space around operator.
Add space around operator. This patch was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 13:57:19 +02:00
Sandhya Bankar 8bee668de5 Staging: rts5208: rtsx: Use x instead of x != NULL.
Use x instead of x != NULL. This patch was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 13:57:19 +02:00
Sandhya Bankar f432bc8141 Staging: rts5208: ms: Use x instead of x != NULL.
Use x instead of x != NULL. This patch was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 13:57:19 +02:00
Cathal Mullaney e29cebe901 Staging: rts5208: rtsx_card.c: Fixed brace style issues
Fixed several minor brace coding style issues.

Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 13:57:19 +02:00
Namrata A Shettar 2296f5215f staging: rts5208: rtsx_chip: Add space around binary operators
Add space around binary operators to resolve checkpatch issue.

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-17 23:36:52 +02:00
Sergio Paracuellos 132aba090d staging: rts5208: make some vars to lower case to keep the style consistent
This patch fixes the checkpatch.pl warning:

WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16 10:22:35 +02:00
MingChia Chung 228fc25904 staging: rts5208: Add two blank lines in comments.
This patch fixes a minor checkpatch warnings:

"WARNING: Block comments use a trailing */ on a separate line"

Signed-off-by: Ming-Chia Chung <Quexint@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01 17:44:01 +02:00
Louie Lu 10adcce696 staging: rts5208: Change data type to unsigned int.
This patch fixes a minor checkpatch warning:

"WARNING: Prefer 'unsigned int' to bare use of 'unsigned'"

Signed-off-by: Louie Lu <louie.lu@hopebaytech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Quentin Lambert 0b25e9fa01 staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICV
mg_get_local_EKB and mg_get_ICV used to return with an error code before
releasing all resources. This patch add a jump to the appropriate label
ensuring that the resources are properly released before returning.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Quentin Lambert 541e4d2d1d staging: rts5208/ms.c: change the label name to respect the coding style
This patch changes label names using camel case to snake case as well as giving
a new name representing what will be done after the label.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Jonas Rickert d5b7d2b02c Staging: rts5208: fix double blank line coding style issues
This is a patch for double blank lines and a missing blank line reported
by checkpatch.pl

Signed-off-by: Jonas Rickert <jrickertkc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Manav Batra e0ab2c8ef5 staging: rts5208: alignment to match open paranthesis
Fixes CHECK: Alignment should match open parenthesis

Signed-off-by: Manav Batra <batmanav10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29 17:58:02 -07:00
Nicholas Sim 649b55b426 staging: rts5208: ensure braces on all arms of if stmt
Added braces on if arm of if statement where else arm already needs
braces as suggested for clarity in Documentation/CodingStyle (several)

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29 17:58:02 -07:00
Bhumika Goyal 143b3bf6d3 Staging: rts5208: rtsx_card.c: Remove unused function
The functions double_depth, check_card_fail, check_card_ejected are not
used anywhere in the kernel. So, remove their prototype and definition.
Grepped to find occurences.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:45:23 -07:00
Bhumika Goyal 3cb61bdf14 Staging: rts5208: Remove unused functions
The functions rtsx_disable_card_int, rtsx_undo_delink,
rtsx_check_link_ready are not used anywhere in the kernel. So,remove
their definition and prototype.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:45:23 -07:00
Dilek Uzulmez de40f2ab97 Staging: rts5208: Add space around '+'
Add space around operator '+'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '+' (ctx:VxV)

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Amitoj Kaur Chawla 80f10bcc7f staging: rts5208: Replace pci_enable_device with pcim_enable_device
Devm_ functions allocate memory that is automatically freed when
a driver detaches.

Replace pci_enable_device with pcim_enable_device. Remove unnecessary
pci_disable_device and pci_release_regions from probe and remove
functions in rts5208 driver since pcim_enable_device contains a call
to pcim_release which contains calls to both pci_disable_device and
pci_release_regions.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Bhaktipriya Shridhar e6e1d57e08 staging: rts5208: Change form of NULL comparisons
Change null comparisons of the form x == NULL to !x.
This was done using Coccinelle.

@@
expression e;
@@
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Bhaktipriya Shridhar b242d05fa3 staging: rts5208: Remove NULL test before vfree
vfree frees the virtually continuous memory area starting at addr.
If addr is NULL, no operation is performed. So NULL test is not needed
before vfree.

This was done using Coccinelle:

@@
expression x;
@@
-if (x != NULL)
    vfree(x);

@@
expression x;
@@

-if (x != NULL) {
vfree(x);
x = NULL;
-}

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Eva Rachel Retuya 7586170c84 staging: rts5208: simplify NULL tests
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for
consistency. Coccinelle semantic patch used:

@@
identifier func;
expression x;
statement Z;
@@

x = func(...);

if (
(
+	!
	x
-	== NULL
|
+	!
-	NULL ==
	x
)
   ) Z

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Bhumika Goyal eff8bf8243 Staging: rts5208: Use min instead of ternary operator
This patch replaces ternary operator with macro min as it shorter and
thus increases code readability. Macro min returns the minimum of the
two compared values.
Made a semantic patch for changes:

@@
type T;
T x;
T y;
@@
(
- x < y ? x : y
+ min(x,y)
|
- x > y ? x : y
+ max(x,y)
)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Janani Ravichandran 51a4731133 staging: rts5208: rtsx_transport.c: Drop void pointer cast
Void pointers need not be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void *e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x) [...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Janani Ravichandran 86790d33da staging: rts5208: rtsx.c: Drop unneeded void pointer cast
Void pointers need not be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void *e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x) [...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Amitoj Kaur Chawla b7a22f8d0a staging: rts5208: Remove unnecessary pci_set_drvdata()
Unnecessary pci_set_drvdata() has been removed since the driver
core clears the driver data to NULL after device release or on
probe failure. There is no need to manually clear the device
driver data to NULL.

The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@@
struct pci_dev *pci;
@@
- pci_set_drvdata(pci, NULL);
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Dilek Uzulmez d1af6476e6 Staging: rts5208: Remove unnecessary parentheses
Problem found using checkpatch.pl
CHECK: Unnecessary parentheses around chip->ms_card

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Bhaktipriya Shridhar 040fa2217c staging: rts5208: Prefer using BIT macro
Replace all instances of bit shifting on 1 with the BIT(x) macro.
This was done using Coccinelle.

@@ int c; @@
- (1 << c)
+ BIT(c)

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Bhaktipriya Shridhar fdb78b64a7 staging: rts5208: Removed unnecessary return variable
This patch removes unnecessary return variables in switch statements.
This was done with Coccinelle:

@@ local idexpression ret; expression e1,e2; identifier label;
@@
switch ( ... ) {
case label : ...
- ret = e1;
- break;
+ return e1;
... default: ...
- ret = e2;
+ return e2;
... }
... when != ret
- return ret;
@@ type T; identifier x; @@
- T x;
... when != x

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Shaun Ren 50dcad2a2c Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL
This patch changes all comparsions to NULL with !..., as reported by
checkpatch.pl.

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:35:42 -08:00
Shaun Ren 69e3bc543c Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses
This patch removes all unnecessary parentheses found by checkpatch.pl.

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:35:42 -08:00
Shaun Ren c1a018eee3 Staging: rts5208: rtsx_transport.c: Fix label naming convention
This patch fixes the following naming convention issue in rtsx_transport.c,
as reported by checkpatch.pl:

CHECK: Avoid CamelCase: <Handle_Errors>

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:35:42 -08:00
Shaun Ren 4961c44e4b Staging: rts5208: rtsx_transport.c: Remove extra newlines
This patch fixes the following issues in rtsx_transport.c as reported by
checkpatch.pl:

CHECK: Blank lines aren't necessary after an open brace '{'
CHECK: Please don't use multiple blank lines

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:35:42 -08:00
Shaun Ren 010c7d2ffb Staging: rts5208: rtsx_transport.c: Add spaces around -
This patch fixes the following styling issue in rtsx_transport.c
as reported by checkpatch.pl:

CHECK: spaces preferred around that '-' (ctx:VxV)

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:35:42 -08:00
Shaun Ren 53374ad203 Staging: rts5208: rtsx_transport.c: Remove spaces after casts
This patch removes all spaces after casts in rtsx_transport.c, as reported
by checkpatch.pl:

CHECK: No space is necessary after a cast

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:35:42 -08:00
Shaun Ren d1303c1a9a Staging: rts5208: rtsx_transport.c: Align to open parenthesis
This patch fixes the alignment issue reported by checkpatch.pl:

CHECK: Alignment should match open parenthesis

Add a unsigned char *sgbuffer in rtsx_stor_access_xfer_buffer to make the
following memcpy logic easier to read.

Add a struct scatterlist *sg in the use_sg branch of
rtsx_transfer_data_partial to make the parameters of the
rtsx_transfer_sglist_adma_partial call fit in 80 character lines after
aligning them to the open parenthesis.

Refactor memcpy logic in rtsx_stor_access_xfer_buf to make it more legible.

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:35:42 -08:00
Shaun Ren 64cfe606e5 Staging: rts5208: rtsx_transport.c: Cleanup comments
This patch fixes all multiline comments to conform to the coding style,
which states that multiline comments should start with "/*" and end
with "*/" on a separate line.

Also cleans up some comments to make them more clear and/or reflect what
the code is doing.

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:35:42 -08:00
Janani Ravichandran 3b15cfbbee staging: rts5208: Place constants on the right side of comparisons
Constants should be placed on the right hand side of comparisons. This
issue was identified by checkpatch.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:44:06 -08:00
Haneen Mohammed b3232842db Staging: rts5208: remove unnecessary parantheses
This patch removes unnecessary parantheses around rtsx->pci->dev.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-09 17:43:09 -08:00
Haneen Mohammed 9a66d05d82 Staging: rts5208: fix check for dma mapping error
use dma_mapping_error() instead of comparing the returned address with
zero after dma_map_single().

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-09 17:43:09 -08:00
Anjali Menon 17e1705b0e staging: rts5208: Removed blank lines
Removed multiple blank lines to avoid the check detected
by checkpatch.pl.

CHECK: Please don't use multiple blank lines

Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 20:03:50 -08:00
Lars-Peter Clausen 350bef8134 staging: rts5208: Remove unnecessary synchronize_irq() before free_irq()
Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.

Patch was generated using the following semantic patch:
// <smpl>
@@
expression irq;
@@
-synchronize_irq(irq);
 free_irq(irq, ...);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 20:03:50 -08:00
Ronit Halder 27f88f3f1a Staging: rts5208: use dmam_alloc_coherent
This patch replaces dma_alloc_coherent with the corresponding
managed interface.

Signed-off-by: Ronit Halder <ronit.crj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:17:26 -07:00
Punit Vara 60d6a21b1e Staging: rts5208: Coding style warnings fix for block comments
This is patch to rtsx_chip.c that fixes up following warning
reported by checkpatch.pl :

-Block comments use * on subsequent lines

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-21 09:56:50 -07:00
Yash Shah 66e6d70df2 Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl
Fixed code indentation warning as detected by checkpatch.pl.

Signed-off-by: Yash Shah <yshah1@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 17:54:04 -07:00
Leung Timothy Chi King 364b91be26 Staging: rts5208: Fix checkpatch warning: else is not generally useful
The following checkpatch warning was fixed:

WARNING: else is not generally useful after a break or return

Signed-off-by: Leung Timothy Chi King <contact@timothyleung.co>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:18:56 -07:00
Linus Torvalds 23908db413 Staging driver patches for 4.2-rc1
Here's the big, really big, staging tree patches for 4.2-rc1.
 
 Loads of stuff in here, almost all just coding style fixes / churn, and
 a few new drivers as well, one of which I just disabled from the build a
 few minutes ago due to way too many build warnings.
 
 Other than the one "disable this driver" patch, all of these have been
 in linux-next for quite a while with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlWNpc0ACgkQMUfUDdst+ym8EgCg0pL1Qcf9Se3jAc96fLt+itpv
 Rd0AoI9uJcq8Qm7d+IXnz3ojLnN9xvN3
 =xt0u
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the big, really big, staging tree patches for 4.2-rc1.

  Loads of stuff in here, almost all just coding style fixes / churn,
  and a few new drivers as well, one of which I just disabled from the
  build a few minutes ago due to way too many build warnings.

  Other than the one "disable this driver" patch, all of these have been
  in linux-next for quite a while with no reported issues"

* tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1163 commits)
  staging: wilc1000: disable driver due to build warnings
  Staging: rts5208: fix CHANGE_LINK_STATE value
  Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesis
  Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines
  Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operators
  Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabs
  Staging: sm750fb: ddk750_swi2c.h: Shorten lines to under 80 characters
  Staging: sm750fb: ddk750_swi2c.h: Replace spaces with tabs
  Staging: sm750fb: modedb.h: Shorten lines to under 80 characters
  Staging: sm750fb: modedb.h: Replace spaces with tabs
  staging: comedi: addi_apci_3120: rename 'this_board' variables
  staging: comedi: addi_apci_1516: rename 'this_board' variables
  staging: comedi: ni_atmio: cleanup ni_getboardtype()
  staging: comedi: vmk80xx: sanity check context used to get the boardinfo
  staging: comedi: vmk80xx: rename 'boardinfo' variables
  staging: comedi: dt3000: rename 'this_board' variables
  staging: comedi: adv_pci_dio: rename 'this_board' variables
  staging: comedi: cb_pcidas64: rename 'thisboard' variables
  staging: comedi: cb_pcidas: rename 'thisboard' variables
  staging: comedi: me4000: rename 'thisboard' variables
  ...
2015-06-26 15:46:08 -07:00
Fabio Falzoi 6c6f95a935 Staging: rts5208: fix CHANGE_LINK_STATE value
Fix CHANGE_LINK_STATE value when card_exist is true.

Fixes: a9b693cd77 ("Staging: rts5208: helper function to manage delink states")
Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-19 10:05:30 -07:00
Fabio Falzoi a9b693cd77 Staging: rts5208: helper function to manage delink states
Use a helper function to manage delink states

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:23:16 -07:00
Fabio Falzoi 00aa7161fc Staging: rts5208: helper function to manage 1lun and 2lun modes
Use a helper function to manage lun modes when SUPPORT_OCP is defined

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:23:16 -07:00
Fabio Falzoi 76d833a8d9 Staging: rts5208: helper function to manage idle
Use a helper function to manage idle state

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:23:15 -07:00
Fabio Falzoi 884a27e36e Staging: rts5208: helper function to manage aspm
Use a helper function to manage aspm mode

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:23:15 -07:00
Fabio Falzoi 319499380c Staging: rts5208: helper function to manage ss
Use a helper function to manage ss_counter

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:23:15 -07:00
Fabio Falzoi 507635763d Staging: rts5208: helper function to manage power off
Use a helper function to check if power off is needed.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:23:15 -07:00
Fabio Falzoi cb547643c3 Staging: rts5208: helper function to manage sd erase status
Use a helper function to manage SD erase status when SUPPORT_SD_LOCK is
defined

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:23:14 -07:00
Nizam Haider 98f196afef Staging: rts5208: xd: Fixed checkpatch warning
Fixed a warning, else is not generally useful after a break or return.

Signed-off-by: Nizam Haider <nizamhaider786@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:12:16 -07:00
Yijing Wang 6ed977428a staging: rts5208: Use common pci_get_bus_and_slot() instead of private one
We already have a inline pci_get_bus_and_slot() in include/linux/pci.h,
Use it instead of local one.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:38:56 -07:00
Hannes Reinecke b84b1d522f scsi: Do not set cmd_per_lun to 1 in the host template
'0' is now used as the default cmd_per_lun value,
so there's no need to explicitly set it to '1' in the
host template.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-05-31 18:06:28 -07:00
Nicholas Mc Guire 3f8ded9d9c staging: rts5208: pass timeout as HZ independent value
schedule_timeout takes a timeout in jiffies but the code currently is
passing in a constant POLLING_INTERVAL which makes this timeout HZ
dependent, so pass it through msecs_to_jiffies() to fix this up.

patch was compile tested for x86_64_defconfig + CONFIG_STAGING=y,
CONFIG_RTS5208=m

Patch is against 4.0-rc5 (localversion-next is -next-20150527)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 11:40:14 +09:00
Akinobu Mita 8ee0df0d06 staging: rts5208: fix transfer length 0 for 6-byte r/w commands
For 6-byte r/w commands, transfer length 0 means 256 blocks of data,
not 0 block.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Micky Ching <micky_ching@realsil.com.cn>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 11:40:14 +09:00
Ksenija Stanojevic d5a7d45fb5 Staging: rts5208: Replace timeval with timespec64
struct timeval tv is used to get current time.
32-bit systems using 'struct timeval' will break in the year 2038, so
we have to replace that code with more appropriate types.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:16 +02:00
Joe Perches 8ee775f92c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros
Macros with hidden flow control are bad form as the code path
taken can be unexpected for the reader.

Expand these in-place and remove the macros.

Done with coccinelle script:

@@
expression chip;
expression arg1;
expression arg2;
expression arg3;
@@

-	RTSX_WRITE_REG(chip, arg1, arg2, arg3);
+	retval = rtsx_write_register(chip, arg1, arg2, arg3);
+	if (retval) {
+		rtsx_trace(chip);
+		return retval;
+	}

@@
expression chip;
expression arg1;
expression arg2;
@@

-	RTSX_READ_REG(chip, arg1, arg2);
+	retval = rtsx_read_register(chip, arg1, arg2);
+	if (retval) {
+		rtsx_trace(chip);
+		return retval;
+	}

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:17:05 +01:00
Joe Perches 031366ea65 staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros
Remove these flow hiding macros.

Miscellanea:

o Add a macro and function to replace a large inline
o Simplify #includes
o Add trace.c and update Makefile
o Remove static inline filename function and use kbasename instead

This reduces object size quite a lot: ~350KB (x86-64 allyesconfig)

$ size drivers/staging/rts5208/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 248385	  36728	  77888	 363001	  589f9	drivers/staging/rts5208/built-in.o.new
 506691	  83352	 115896	 705939	  ac593	drivers/staging/rts5208/built-in.o.old

Done via coccinelle script and some typing.

@@
expression chip;
expression ret;
@@

-	TRACE_RET(chip, ret);
+	rtsx_trace(chip);
+	return ret;

@@
expression chip;
identifier label;
@@

-	TRACE_GOTO(chip, label);
+	rtsx_trace(chip);
+	goto label;

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:16:19 +01:00
Vatika Harlalka 127883b803 Staging: rts5208: Add new variable idx to shorten line length and increase readability
Add new variable idx to shorten line length of other statements
and increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:28:22 +01:00
Vatika Harlalka 7ef4ec4a65 Staging: rts5208: Introduce a new variable to shorten line length and increase readability
The variable block_no is introduced so as to shorten line length
in the long assignment statement and increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:28:22 +01:00
Vaishali Thakkar eb7403756f Staging: rts5208: Use module_pci_driver
Macro module_pci_driver is used for drivers whose init
and exit paths does only register and unregister to pci
API. So, here remove some boilerplate code by using
module_pci_driver. Also, change driver to rtsx_driver,
to avoid implicitly redefining driver_init.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:17:31 +01:00
Quentin Lambert 11201769d1 staging: rts5208: Convert variable from int to bool and propagate the change to function parameters
This patch convert local variables declared as int into booleans.
It also propagates the conversion when these variables were used
as function parameters.

Coccinelle was used to generate this patch.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:25:01 -08:00
Quentin Lambert de904bf0e4 staging: rts5208: Convert non-returned local variable to boolean when relevant
This patch was produced using Coccinelle. A simplified version of the
semantic patch is:

@r exists@
identifier f;
local idexpression u8 x;
identifier xname;
@@

f(...) {
...when any
(
  x@xname = 1;
|
  x@xname = 0;
)
...when any
}

@bad exists@
identifier r.f;
local idexpression u8 r.x
expression e1 != {0, 1}, e2;
@@

f(...) {
...when any
(
  x = e1;
|
  x + e2
)
...when any
}

@depends on !bad@
identifier r.f;
local idexpression u8 r.x;
identifier r.xname;
@@

f(...) {
...
++ bool xname;
- int xname;
<...
(
  x =
- 1
+ true
|
  x =
- -1
+ false
)
...>

}

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:25:00 -08:00
Haneen Mohammed 651cd163ba Staging: rts5208: clean dev_err logging
This patch removes  __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:

@a@
expression E, R;
expression  msg;
@@

dev_err(E, msg, __func__, R);

@script:python b@
e << a.msg;
y;
@@

if(e.find("%s: ") == True):
	m = e.replace("%s: ", "", 1);
	coccinelle.y = m;
elif(e.find("%s ") == True):
	m = e.replace("%s ", "", 1);
	coccinelle.y = m;
elif(e.find("%s:") == True):
	m = e.replace("%s:", "", 1);
	coccinelle.y = m;
else:
	m = e.replace("%s", "",1);
	coccinelle.y = m;

@c@
expression a.E, a.msg, a.R;
identifier  b.y;
@@

- dev_err(E, msg, __func__, R);
+ dev_err(E, y, R);

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:55:36 -08:00
Aya Mahfouz 5a80ee6f88 staging: rts5208: remove extra parentheses around left bit shift operation
Removes extra parentheses around bitwise left shift operations.
The case handled is when resultant value is assigned to a variable.
The issue was detected and resolved using the following
coccinelle script:

@@
expression e, e1;
constant c;
@@

e =
-(e1
+e1
<<
-c);
+c;

@@
identifier i;
constant c;
type t;
expression e;
@@

t i =
-(e
+e
<<
-c);
+c;

@@
expression e, e1;
identifier f;
constant c;
@@

e1 = f(...,
-(e
+e
<<
-c)
+c
,...);

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:24:23 -08:00
Haneen Mohammed 24f455236d Staging: rts5208: Remove braces around single if-statement
This patch removes unneeded braces around a single if-statement.
This problem was found using checkpatch.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 13:01:14 -08:00
Nicholas Mc Guire 9df56d9bde staging: rts5208: use msecs_to_jiffies for timeouts
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 <der.herr@hofr.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 19:59:19 +08:00
Robert Kmiec 7f703fae17 staging: rts5208/ms.c: Code style fix (space before comma)
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 <robert.r.kmiec@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:07:20 -08:00
Tapasweni Pathak aa54b60d63 staging: rts5208: Remove useless cast on void pointer
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 <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:06:03 -07:00
Behan Webster 33de8f24a7 staging, rts5208, LLVMLinux: Change extern inline to static inline
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 <behanw@converseincode.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:28:17 -07:00
Fabio Falzoi 506fe17dae Staging: rts5208: helper function to enable interrupts during reset
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 <fabio.falzoi84@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpente@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:28:51 +08:00
Fabio Falzoi 5d069c8886 Staging: rts5208: helper function to manage aspm during reset
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 <fabio.falzoi84@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpente@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:28:51 +08:00
Surya Seetharaman 87a979318f Staging: rts5028: rtsx_transport.c: fixed a brace coding style issue.
Removed unwanted braces using checkpatch.pl tool.

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 15:58:18 +08:00