The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Tim Jester-Pfadt <t.jp@gmx.de>
Cc: gregkh@linuxfoundation.org, Larry.Finger@lwfinger.net,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] Staging: rtl8188eu: Fixed coding style issues
Date: Thu, 02 Jan 2014 19:58:03 -0800	[thread overview]
Message-ID: <1388721483.2527.0.camel@joe-AO722> (raw)
In-Reply-To: <20140102232259.GA4112@archlinux>


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);




  parent reply	other threads:[~2014-01-03  3:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02 20:46 [PATCH v2] Staging: rtl8188eu: Fixed coding style issues Tim Jester-Pfadt
2014-01-02 21:37 ` Larry Finger
2014-01-02 23:22 ` [PATCH v3] " Tim Jester-Pfadt
2014-01-02 23:33   ` Larry Finger
2014-01-03  3:58   ` Joe Perches [this message]
2014-01-03  7:55   ` Dan Carpenter
2014-01-03 12:09     ` Tim Jester-Pfadt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388721483.2527.0.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=t.jp@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox