Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] Staging: rtl8188eu: Fixed coding style issues

0 views
Skip to first unread message

Tim Jester-Pfadt

unread,
Jan 2, 2014, 12:10:04 PM1/2/14
to
Fixed indentation coding style issues on rtw_io.c

Signed-off-by: Tim Jester-Pfadt <t....@gmx.de>
---
drivers/staging/rtl8188eu/core/rtw_io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_io.c b/drivers/staging/rtl8188eu/core/rtw_io.c
index 10c9c65..69b408e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_io.c
+++ b/drivers/staging/rtl8188eu/core/rtw_io.c
@@ -205,7 +205,7 @@ void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)

_func_enter_;
if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
- RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
+ RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
adapter->bDriverStopped, adapter->bSurpriseRemoved));
return;
@@ -239,7 +239,7 @@ void _rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
_func_enter_;

if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
- RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
+ RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
adapter->bDriverStopped, adapter->bSurpriseRemoved));
return;
--
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Larry Finger

unread,
Jan 2, 2014, 1:00:02 PM1/2/14
to
Did you run checkpatch.pl on this patch? You fixed the indents on the RT_TRACE
statements, but the alignment of the continuing statements is wrong. That part
was correct before.

Larry

Tim Jester-Pfadt

unread,
Jan 2, 2014, 3:50:01 PM1/2/14
to
Fixed indentation coding style issues on rtw_io.c

Signed-off-by: Tim Jester-Pfadt <t....@gmx.de>
---
drivers/staging/rtl8188eu/core/rtw_io.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_io.c b/drivers/staging/rtl8188eu/core/rtw_io.c
index 10c9c65..6be6c50 100644
--- a/drivers/staging/rtl8188eu/core/rtw_io.c
+++ b/drivers/staging/rtl8188eu/core/rtw_io.c
@@ -205,9 +205,9 @@ void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)

_func_enter_;
if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
- RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
- ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
- adapter->bDriverStopped, adapter->bSurpriseRemoved));
+ RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
+ ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
+ adapter->bDriverStopped, adapter->bSurpriseRemoved));
return;
}
_read_mem = pintfhdl->io_ops._read_mem;
@@ -239,9 +239,9 @@ void _rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
_func_enter_;

if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
- RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
- ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
- adapter->bDriverStopped, adapter->bSurpriseRemoved));
+ RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
+ ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
+ adapter->bDriverStopped, adapter->bSurpriseRemoved));
return;
}

--
1.8.5.2

Larry Finger

unread,
Jan 2, 2014, 4:40:02 PM1/2/14
to
On 01/02/2014 02:46 PM, Tim Jester-Pfadt wrote:
> Fixed indentation coding style issues on rtw_io.c
>
> Signed-off-by: Tim Jester-Pfadt <t....@gmx.de>
> ---
> drivers/staging/rtl8188eu/core/rtw_io.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_io.c b/drivers/staging/rtl8188eu/core/rtw_io.c
> index 10c9c65..6be6c50 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_io.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_io.c
> @@ -205,9 +205,9 @@ void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
>
> _func_enter_;
> if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
> - RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
> - ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
> - adapter->bDriverStopped, adapter->bSurpriseRemoved));
> + RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
> + ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
> + adapter->bDriverStopped, adapter->bSurpriseRemoved));

The latest version of checkpatch.pl lists the following:

CHECK: Alignment should match open parenthesis
#87: FILE: drivers/staging/rtl8188eu/core/rtw_io.c:207:
+ RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
+ ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",

The continuing lines should be indented one more space.

Larry

Tim Jester-Pfadt

unread,
Jan 2, 2014, 6:30:02 PM1/2/14
to
Fixed indentation coding style issues on rtw_io.c

Signed-off-by: Tim Jester-Pfadt <t....@gmx.de>
---
drivers/staging/rtl8188eu/core/rtw_io.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_io.c b/drivers/staging/rtl8188eu/core/rtw_io.c
index 10c9c65..f1b8dfe 100644

Larry Finger

unread,
Jan 2, 2014, 6:40:01 PM1/2/14
to
Acked-by: Larry Finger <Larry....@lwfinger.net>

Thanks,

Larry

Joe Perches

unread,
Jan 2, 2014, 11:00:01 PM1/2/14
to

On Fri, 2014-01-03 at 00:22 +0100, Tim Jester-Pfadt wrote:
> Fixed indentation coding style issues on rtw_io.c
[]
> diff --git a/drivers/staging/rtl8188eu/core/rtw_io.c b/drivers/staging/rtl8188eu/core/rtw_io.c
[]
> @@ -205,9 +205,9 @@ void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
>
> _func_enter_;
> if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
> - RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
> - ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
> - adapter->bDriverStopped, adapter->bSurpriseRemoved));
> + RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
> + ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
> + adapter->bDriverStopped, adapter->bSurpriseRemoved));

Be nice to remove the unnecessary parentheses on all of these too

RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
"rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
adapter->bDriverStopped, adapter->bSurpriseRemoved);

etc...

A few other things too:

o The _func_enter_ uses are unnecessary and could/should
be removed. There's a standard function tracing capability.
o The RT_TRACE uses that embed a function name could/should use
%s:, __func__
o The RT_TRACE macro doesn't add a terminating newline and these
uses should have them.

RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
"%s:bDriverStopped(%d) OR bSurpriseRemoved(%d)\n",
__func__, adapter->bDriverStopped, adapter->bSurpriseRemoved);

Dan Carpenter

unread,
Jan 3, 2014, 3:00:02 AM1/3/14
to
On Fri, Jan 03, 2014 at 12:22:59AM +0100, Tim Jester-Pfadt wrote:
> Fixed indentation coding style issues on rtw_io.c
>
> Signed-off-by: Tim Jester-Pfadt <t....@gmx.de>
> ---
Next time, if you do a v2 patch please put a note here under the ---
line what changed between the previous one and this one.

2: changed blah blah blah.

> drivers/staging/rtl8188eu/core/rtw_io.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)


regards,
dan carpenter

Tim Jester-Pfadt

unread,
Jan 3, 2014, 7:10:01 AM1/3/14
to
Thank you for your feedback.
I'm still figuring stuff out. Submitting patches to the kernel has
been my new year's resolution.

Regards,

Tim

2014/1/3 Dan Carpenter <dan.ca...@oracle.com>:
0 new messages