public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Patch] Staging: winbond: Made local functions static
Date: Thu, 30 May 2013 12:13:05 +0000	[thread overview]
Message-ID: <20130530121305.GH23932@mwanda> (raw)
In-Reply-To: <51A6E81C.2000303@gmail.com>

On Thu, May 30, 2013 at 11:18:12AM +0530, Harsh Kumar wrote:
> Few functions are used only in one file. They are not included in any 
> other .h or .c files (I used grep to check). They seem to be local functions.
> So, I have made them static.
> I have also inlined one function as it is a one line function.
> 
> Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com>
> 
> ---
>  drivers/staging/winbond/reg.c |   25 ++++++++++++++-----------
>  1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff -uprN a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
> --- a/drivers/staging/winbond/reg.c	2013-05-28 00:52:20.000000000 +0530
> +++ b/drivers/staging/winbond/reg.c	2013-05-30 10:28:48.038634461 +0530
> @@ -920,20 +920,20 @@ void Uxx_power_on_procedure(struct hw_da
>  	Wb35Reg_WriteSync(pHwData, 0x03f8, 0x7ff);
>  }
>  
> -void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp , char number)
> +static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp, 
> +					char number)
>  {
>  	u8	i;
> -

Please leave the blank line here between the declarations and the
code.  This is firmly established kernel standard, but it's probably
complicated to add it to checkpatch.pl...

Btw, this code uses u8 and char where int would be more appropriate.

regards,
dan carpenter


  parent reply	other threads:[~2013-05-30 12:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30  5:48 [Patch] Staging: winbond: Made local functions static Harsh Kumar
2013-05-30  9:20 ` walter harms
2013-05-30  9:40 ` Pavel Machek
2013-05-30 12:13 ` Dan Carpenter [this message]
2013-05-30 12:18 ` Dan Carpenter
2013-05-30 13:08 ` Dan Carpenter
2013-05-30 13:33 ` Harsh Kumar
2013-05-30 13:58 ` Dan Carpenter

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=20130530121305.GH23932@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /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