From: Oliver Neukum <oneukum@suse.com>
To: Sergei Shtylyov <sergei.shtylyov@gmail.com>,
Mingxuan Xiang <mx_xiang@hust.edu.cn>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: hust-os-kernel-patches@googlegroups.com,
Dongliang Mu <dzm91@hust.edu.cn>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq()
Date: Thu, 23 Mar 2023 11:54:24 +0100 [thread overview]
Message-ID: <73fd29ce-3072-dfce-ebf0-3e197230fa94@suse.com> (raw)
In-Reply-To: <129aec21-4997-6b8d-5bd2-8e013f575208@gmail.com>
On 23.03.23 11:29, Sergei Shtylyov wrote:
> On 3/23/23 12:53 PM, Mingxuan Xiang wrote:
>
>> platform_get_irq() no longer returns 0, so there is no
>> need to check whether the return value is 0.
>>
>> Signed-off-by: Mingxuan Xiang <mx_xiang@hust.edu.cn>
>> ---
>> v1->v2: remove redundant goto
>> drivers/usb/dwc3/host.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
>> index f6f13e7f1ba1..ca1e8294e835 100644
>> --- a/drivers/usb/dwc3/host.c
>> +++ b/drivers/usb/dwc3/host.c
>> @@ -54,12 +54,8 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)
>> irq = platform_get_irq(dwc3_pdev, 0);
>> if (irq > 0) {
>> dwc3_host_fill_xhci_irq_res(dwc, irq, NULL);
>> - goto out;
>> }
>
> Now drop {} please. :-)
Well, no, please drop the whole patch.
If platform_get_irq() returns -EPROBE_DEFER you now give that
as a return value.
This tiny bit of optimization is not worth changing semantics.
Regards
Oliver
next prev parent reply other threads:[~2023-03-23 10:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 9:53 Mingxuan Xiang
2023-03-23 10:29 ` Sergei Shtylyov
2023-03-23 10:54 ` Oliver Neukum [this message]
2023-03-23 11:13 ` Dan Carpenter
2023-03-23 13:48 ` Oliver Neukum
2023-03-23 14:06 ` Dan Carpenter
2023-03-23 15:38 ` Oliver Neukum
2023-03-23 10:52 ` Dan Carpenter
2023-03-23 11:00 ` Dan Carpenter
2023-03-23 11:12 ` Dan Carpenter
2023-03-23 15:40 ` Greg Kroah-Hartman
2023-03-24 1:46 ` Dongliang Mu
2023-03-24 5:17 ` Dan Carpenter
2023-03-24 5:19 ` Dongliang Mu
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=73fd29ce-3072-dfce-ebf0-3e197230fa94@suse.com \
--to=oneukum@suse.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=dzm91@hust.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=hust-os-kernel-patches@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mx_xiang@hust.edu.cn \
--cc=sergei.shtylyov@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 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®