* [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq
@ 2023-03-23 5:39 lihuya
2023-03-24 18:28 ` Thinh Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: lihuya @ 2023-03-23 5:39 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman
Cc: dzm91, hust-os-kernel-patches, lihuya, linux-usb, linux-kernel
platform_get_irq() only return non-zero irq number on success, or
negative error number on failure.
There is no need to check the return value of platform_get_irq()
to determine the return value of dwc3_otg_get_irq(), removing
them to solve this problem.
Signed-off-by: lihuya <lihuya@hust.edu.cn>
---
drivers/usb/dwc3/drd.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index 039bf241769a..c2e09700212d 100644
--- a/drivers/usb/dwc3/drd.c
+++ b/drivers/usb/dwc3/drd.c
@@ -154,11 +154,6 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc)
goto out;
irq = platform_get_irq(dwc3_pdev, 0);
- if (irq > 0)
- goto out;
-
- if (!irq)
- irq = -EINVAL;
out:
return irq;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq
2023-03-23 5:39 [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq lihuya
@ 2023-03-24 18:28 ` Thinh Nguyen
2023-04-24 8:45 ` 梁宇航
0 siblings, 1 reply; 4+ messages in thread
From: Thinh Nguyen @ 2023-03-24 18:28 UTC (permalink / raw)
To: lihuya
Cc: Thinh Nguyen, Greg Kroah-Hartman, dzm91@hust.edu.cn,
hust-os-kernel-patches@googlegroups.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
On Thu, Mar 23, 2023, lihuya wrote:
> platform_get_irq() only return non-zero irq number on success, or
> negative error number on failure.
>
> There is no need to check the return value of platform_get_irq()
> to determine the return value of dwc3_otg_get_irq(), removing
> them to solve this problem.
>
> Signed-off-by: lihuya <lihuya@hust.edu.cn>
> ---
> drivers/usb/dwc3/drd.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
> index 039bf241769a..c2e09700212d 100644
> --- a/drivers/usb/dwc3/drd.c
> +++ b/drivers/usb/dwc3/drd.c
> @@ -154,11 +154,6 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc)
> goto out;
>
> irq = platform_get_irq(dwc3_pdev, 0);
> - if (irq > 0)
> - goto out;
> -
> - if (!irq)
> - irq = -EINVAL;
>
> out:
> return irq;
> --
> 2.34.1
>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq
2023-03-24 18:28 ` Thinh Nguyen
@ 2023-04-24 8:45 ` 梁宇航
2023-04-24 10:36 ` greg kroah-hartman
0 siblings, 1 reply; 4+ messages in thread
From: 梁宇航 @ 2023-04-24 8:45 UTC (permalink / raw)
To: thinh nguyen
Cc: greg kroah-hartman, dzm91@hust.edu.cn, hust-os-kernel-patches,
linux-usb, linux-kernel
> -----Original Messages-----
> From: "Thinh Nguyen" <Thinh.Nguyen@synopsys.com>
> Sent Time: 2023-03-25 02:28:56 (Saturday)
> To: lihuya <lihuya@hust.edu.cn>
> Cc: "Thinh Nguyen" <Thinh.Nguyen@synopsys.com>, "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, "dzm91@hust.edu.cn" <dzm91@hust.edu.cn>, "hust-os-kernel-patches@googlegroups.com" <hust-os-kernel-patches@googlegroups.com>, "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq
>
> On Thu, Mar 23, 2023, lihuya wrote:
> > platform_get_irq() only return non-zero irq number on success, or
> > negative error number on failure.
> >
> > There is no need to check the return value of platform_get_irq()
> > to determine the return value of dwc3_otg_get_irq(), removing
> > them to solve this problem.
> >
> > Signed-off-by: lihuya <lihuya@hust.edu.cn>
> > ---
> > drivers/usb/dwc3/drd.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
> > index 039bf241769a..c2e09700212d 100644
> > --- a/drivers/usb/dwc3/drd.c
> > +++ b/drivers/usb/dwc3/drd.c
> > @@ -154,11 +154,6 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc)
> > goto out;
> >
> > irq = platform_get_irq(dwc3_pdev, 0);
> > - if (irq > 0)
> > - goto out;
> > -
> > - if (!irq)
> > - irq = -EINVAL;
> >
> > out:
> > return irq;
> > --
> > 2.34.1
> >
>
> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
>
> Thanks,
> Thinh
Hi Thinh,
I'm checking in about my patch submission for usb dwc3 that was
"ack'ed" on 3/25, but hasn't been merged into the subtree yet.
Could you please provide me with an update on its status and let
me know if there are any issues or concerns that need to be addressed?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq
2023-04-24 8:45 ` 梁宇航
@ 2023-04-24 10:36 ` greg kroah-hartman
0 siblings, 0 replies; 4+ messages in thread
From: greg kroah-hartman @ 2023-04-24 10:36 UTC (permalink / raw)
To: 梁宇航
Cc: thinh nguyen, dzm91@hust.edu.cn, hust-os-kernel-patches,
linux-usb, linux-kernel
On Mon, Apr 24, 2023 at 04:45:14PM +0800, 梁宇航 wrote:
> > -----Original Messages-----
> > From: "Thinh Nguyen" <Thinh.Nguyen@synopsys.com>
> > Sent Time: 2023-03-25 02:28:56 (Saturday)
> > To: lihuya <lihuya@hust.edu.cn>
> > Cc: "Thinh Nguyen" <Thinh.Nguyen@synopsys.com>, "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, "dzm91@hust.edu.cn" <dzm91@hust.edu.cn>, "hust-os-kernel-patches@googlegroups.com" <hust-os-kernel-patches@googlegroups.com>, "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
> > Subject: Re: [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq
> >
> > On Thu, Mar 23, 2023, lihuya wrote:
> > > platform_get_irq() only return non-zero irq number on success, or
> > > negative error number on failure.
> > >
> > > There is no need to check the return value of platform_get_irq()
> > > to determine the return value of dwc3_otg_get_irq(), removing
> > > them to solve this problem.
> > >
> > > Signed-off-by: lihuya <lihuya@hust.edu.cn>
> > > ---
> > > drivers/usb/dwc3/drd.c | 5 -----
> > > 1 file changed, 5 deletions(-)
> > >
> > > diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
> > > index 039bf241769a..c2e09700212d 100644
> > > --- a/drivers/usb/dwc3/drd.c
> > > +++ b/drivers/usb/dwc3/drd.c
> > > @@ -154,11 +154,6 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc)
> > > goto out;
> > >
> > > irq = platform_get_irq(dwc3_pdev, 0);
> > > - if (irq > 0)
> > > - goto out;
> > > -
> > > - if (!irq)
> > > - irq = -EINVAL;
> > >
> > > out:
> > > return irq;
> > > --
> > > 2.34.1
> > >
> >
> > Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> >
> > Thanks,
> > Thinh
>
> Hi Thinh,
>
> I'm checking in about my patch submission for usb dwc3 that was
> "ack'ed" on 3/25, but hasn't been merged into the subtree yet.
> Could you please provide me with an update on its status and let
> me know if there are any issues or concerns that need to be addressed?
It's not in my queue anywhere, so it needs to be resent if anyone wants
this applied.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-24 10:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 5:39 [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq lihuya
2023-03-24 18:28 ` Thinh Nguyen
2023-04-24 8:45 ` 梁宇航
2023-04-24 10:36 ` greg kroah-hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox