lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <73fd29ce-3072-dfce-ebf0-3e197230fa94@suse.com>
Date:   Thu, 23 Mar 2023 11:54:24 +0100
From:   Oliver Neukum <oneukum@...e.com>
To:     Sergei Shtylyov <sergei.shtylyov@...il.com>,
        Mingxuan Xiang <mx_xiang@...t.edu.cn>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     hust-os-kernel-patches@...glegroups.com,
        Dongliang Mu <dzm91@...t.edu.cn>, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] usb: dwc3: host: remove dead code in
 dwc3_host_get_irq()



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@...t.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ