From: Deepak R Varma <drv@mailo.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: outreachy@lists.linux.dev,
Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: r8188eu: remove unwanted variable implementation
Date: Wed, 2 Nov 2022 13:32:30 +0530 [thread overview]
Message-ID: <Y2IkFqxujKnZ/9MQ@ubunlion> (raw)
In-Reply-To: <Y2IccKxNDyd/MEqY@kroah.com>
On Wed, Nov 02, 2022 at 08:29:52AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 02, 2022 at 01:48:18AM +0530, Deepak R Varma wrote:
> > Local variables intended as the function return value are
> > initialized but their value does not change during function
> > execution. The initial value assigned to the variable is simply
> > returned to the caller. This makes the variable declaration
> > unnecessary and the initial value can be directly returned.
> >
> > Following table lists the initial commits when the variables were first
> > introduced but have not been used since inception:
> >
> > Variable Function File Inception Commit
> > ret rtw_sta_flush r8188eu/core/rtw_ap.c [1]
> > ret amsdu_to_msdu r8188eu/core/rtw_recv.c [2]
> > ret rtw_p2p_set r8188eu/os_dep/ioctl_linux.c [3]
> >
> > [1] 'commit 9a7fe54ddc3a ("staging: r8188eu: Add source files for new driver - part 1")'
> > [2] 'commit 1cc18a22b96b ("staging: r8188eu: Add files for new driver - part 5")'
> > [3] 'commit a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16")'
> >
> > However, local variable pull of the function update_txdesc from file
> > r8188eu/hal/rtl8188eu_xmit.c was in use prior to introduction of
> > commit ID [4] 7bdedfef085bb65. The clean-up associated with this
> > commit left the variable pull redundant.
> >
> > [4] 'commit 7bdedfef085b ("staging: r8188eu: Remove mp, a.k.a. manufacturing process, code")'
> >
> > The patch is produced using the following coccicheck options:
> > COCCI=./scripts/coccinelle/misc/returnvar.cocci
> > M=driver/staging/r8188eu/
> > MODE=patch
> >
> > Signed-off-by: Deepak R Varma <drv@mailo.com>
> > ---
> >
> > Changes in v2:
> > 1. Include reason for why the variable declarations are not useful. Suggested
> > by Julia Lawall <julia.lawall@inria.fr>
>
> Does not apply to my tree at all :(
>
> Please rebase and resubmit.
Hello Greg,
Looks like there was another patch effort in parallel to correct this coccicheck
complaint. I am checking if all the observations from my patch are resolved. If
not, I will rebase and send in revised patch.
Thank you.
./drv
>
> thanks,
>
> greg k-h
>
>
next prev parent reply other threads:[~2022-11-02 8:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 20:18 [PATCH v2] staging: r8188eu: remove unwanted variable implementation Deepak R Varma
2022-11-02 7:29 ` Greg Kroah-Hartman
2022-11-02 8:02 ` Deepak R Varma [this message]
2022-11-02 10:52 ` Deepak R Varma
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=Y2IkFqxujKnZ/9MQ@ubunlion \
--to=drv@mailo.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
/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