From: Greg KH <gregkh@linuxfoundation.org>
To: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: fieldbus: anybuss: Remove variable
Date: Thu, 23 May 2019 09:22:46 +0200 [thread overview]
Message-ID: <20190523072246.GD24998@kroah.com> (raw)
In-Reply-To: <20190523070531.13510-1-nishka.dasgupta@yahoo.com>
On Thu, May 23, 2019 at 12:35:26PM +0530, Nishka Dasgupta wrote:
> Variable client, assigned to priv->client, is used only once in a
> function argument; hence, it can be removed and the function argument
> replaced with priv->client directly.
> Issue found with Coccinelle.
>
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
> ---
> drivers/staging/fieldbus/anybuss/hms-profinet.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/fieldbus/anybuss/hms-profinet.c b/drivers/staging/fieldbus/anybuss/hms-profinet.c
> index 5446843e35f4..a7f85912fa92 100644
> --- a/drivers/staging/fieldbus/anybuss/hms-profinet.c
> +++ b/drivers/staging/fieldbus/anybuss/hms-profinet.c
> @@ -124,9 +124,7 @@ static int __profi_enable(struct profi_priv *priv)
>
> static int __profi_disable(struct profi_priv *priv)
> {
> - struct anybuss_client *client = priv->client;
> -
> - anybuss_set_power(client, false);
> + anybuss_set_power(priv->client, false);
Same comments are relevant here as the last patch you sent.
thanks,
greg k-h
next parent reply other threads:[~2019-05-23 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190523070531.13510-1-nishka.dasgupta@yahoo.com>
2019-05-23 7:22 ` Greg KH [this message]
[not found] ` <4a3d571f-5987-6735-be56-7976457d0797@yahoo.com>
2019-05-23 8:43 ` [PATCH] staging: fieldbus: anybuss: Remove variable Greg KH
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=20190523072246.GD24998@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nishka.dasgupta@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox