From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: "Alan Stern" <stern@rowland.harvard.edu>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] usb: gadget: net2272: remove redundant variable irqflags
Date: Thu, 7 Mar 2024 17:46:31 +0000 [thread overview]
Message-ID: <7aab696f-6a4f-410d-9769-17fda28f5c4d@gmail.com> (raw)
In-Reply-To: <2b318367-2428-44ba-b4d9-0a452fcb7858@rowland.harvard.edu>
On 07/03/2024 17:29, Alan Stern wrote:
> On Thu, Mar 07, 2024 at 05:51:59PM +0100, Uwe Kleine-König wrote:
>> On Thu, Mar 07, 2024 at 10:51:35AM +0000, Colin Ian King wrote:
>>> The variable irqflags is being initialized and being bit-or'd with
>>> values but it is never read afterwards. The variable is redundant
>>> and can be removed.
>>>
>>> Cleans up clang scan build warning:
>>> drivers/usb/gadget/udc/net2272.c:2610:15: warning: variable 'irqflags'
>>> set but not used [-Wunused-but-set-variable]
>>>
>>> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>>
>> this "problem" exists since the driver was introduced in commit
>> ceb80363b2ec ("USB: net2272: driver for PLX NET2272 USB device
>> controller"). Might be worth a Fixes: line.
>>
>> I wonder if the better fix would be:
>>
>> diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
>> index 12e76bb62c20..19bbc38f3d35 100644
>> --- a/drivers/usb/gadget/udc/net2272.c
>> +++ b/drivers/usb/gadget/udc/net2272.c
>> @@ -2650,7 +2650,7 @@ net2272_plat_probe(struct platform_device *pdev)
>> goto err_req;
>> }
>>
>> - ret = net2272_probe_fin(dev, IRQF_TRIGGER_LOW);
>> + ret = net2272_probe_fin(dev, irqflags);
>> if (ret)
>> goto err_io;
>
> I agree, that makes much more sense.
OK, I'll send a V2, but I can't test it, so I suspect that is a risk,
but it is clearly wrong as it stands.
Colin
>
> Alan Stern
prev parent reply other threads:[~2024-03-07 17:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 10:51 Colin Ian King
2024-03-07 16:51 ` Uwe Kleine-König
2024-03-07 17:29 ` Alan Stern
2024-03-07 17:46 ` Colin King (gmail) [this message]
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=7aab696f-6a4f-410d-9769-17fda28f5c4d@gmail.com \
--to=colin.i.king@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=u.kleine-koenig@pengutronix.de \
/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
all inboxes | Powered by JetHome®