All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Mihaela Muraru <mihaela.muraru21@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] Staging: wilc1000: Replace the name of a  variable
Date: Mon, 17 Oct 2016 08:59:02 +0200	[thread overview]
Message-ID: <20161017065902.GA24896@kroah.com> (raw)
In-Reply-To: <20161017063027.GA6200@domino-MS-16Y1>

On Mon, Oct 17, 2016 at 09:30:27AM +0300, Mihaela Muraru wrote:
> This patch replace the name '*Error' variable with 'err'.

This says what you are doing, but I don't understand why you want to
replace a variable name like this.

Also you have an odd extra space in your subject line :(

> 
> Found and solve with Coccinelle:
> @r1@
> type s;
> identifier sn =~ "Error";
> identifier f;
> type p;
> expression c;
> @@
> 
> f(...) {
> 
> <...
> (
> -p sn = c;
> +p err = c;
> |
> -sn
> +err
> )
> ...>
> }
> 
> Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
> ---
>  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 138 +++++++++++-----------
>  1 file changed, 69 insertions(+), 69 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> index 483a6b6..8c47558 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> @@ -603,7 +603,7 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
>  {
>  	struct wilc_priv *priv;
>  	u32 i;
> -	s32 s32Error = 0;
> +	s32 err = 0;

Also, shouldn't this just be 'int'?

thanks,

greg k-h


  reply	other threads:[~2016-10-17  6:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17  6:30 [PATCH] Staging: wilc1000: Replace the name of a variable Mihaela Muraru
2016-10-17  6:59 ` Greg Kroah-Hartman [this message]
     [not found]   ` <CANRJjP1tM-D53CpC2NjXa1-ho=P1XJ6kO43rV3VHcpcwnKXf3Q@mail.gmail.com>
2016-10-17  7:48     ` Muraru Mihaela
2016-10-17  9:04       ` [Outreachy kernel] " Julia Lawall

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=20161017065902.GA24896@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=mihaela.muraru21@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.