From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/8] drivers/staging: Remove useless return variables
Date: Fri, 23 May 2014 17:18:26 +0000 [thread overview]
Message-ID: <20140523171826.GA4268@kroah.com> (raw)
In-Reply-To: <1400582028-24990-3-git-send-email-peter.senna@gmail.com>
On Tue, May 20, 2014 at 12:33:43PM +0200, Peter Senna Tschudin wrote:
> This patch remove variables that are initialized with a constant,
> are never updated, and are only used as parameter of return.
> Return the constant instead of using a variable.
>
> Verified by compilation only.
>
> The coccinelle script that find and fixes this issue is:
> // <smpl>
> @@
> type T;
> constant C;
> identifier ret;
> @@
> - T ret = C;
> ... when != ret
> - return ret;
> + return C;
> // </smpl>
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
This patch no longer applies to my tree, can you refresh it and resend?
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/8] drivers/staging: Remove useless return variables
Date: Sat, 24 May 2014 02:18:26 +0900 [thread overview]
Message-ID: <20140523171826.GA4268@kroah.com> (raw)
In-Reply-To: <1400582028-24990-3-git-send-email-peter.senna@gmail.com>
On Tue, May 20, 2014 at 12:33:43PM +0200, Peter Senna Tschudin wrote:
> This patch remove variables that are initialized with a constant,
> are never updated, and are only used as parameter of return.
> Return the constant instead of using a variable.
>
> Verified by compilation only.
>
> The coccinelle script that find and fixes this issue is:
> // <smpl>
> @@
> type T;
> constant C;
> identifier ret;
> @@
> - T ret = C;
> ... when != ret
> - return ret;
> + return C;
> // </smpl>
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
This patch no longer applies to my tree, can you refresh it and resend?
thanks,
greg k-h
next prev parent reply other threads:[~2014-05-23 17:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 10:33 [PATCH 3/8] drivers/staging: Remove useless return variables Peter Senna Tschudin
2014-05-20 10:33 ` Peter Senna Tschudin
2014-05-20 11:16 ` walter harms
2014-05-20 11:16 ` walter harms
2014-05-23 17:18 ` Greg Kroah-Hartman [this message]
2014-05-23 17:18 ` Greg Kroah-Hartman
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=20140523171826.GA4268@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.senna@gmail.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.