* [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq()
@ 2023-03-23 9:53 Mingxuan Xiang
2023-03-23 10:29 ` Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Mingxuan Xiang @ 2023-03-23 9:53 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman
Cc: hust-os-kernel-patches, Dongliang Mu, Mingxuan Xiang, linux-usb,
linux-kernel
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;
}
- if (!irq)
- irq = -EINVAL;
-
out:
return irq;
}
--
2.39.2
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 9:53 [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Mingxuan Xiang @ 2023-03-23 10:29 ` Sergei Shtylyov 2023-03-23 10:54 ` Oliver Neukum 2023-03-23 10:52 ` Dan Carpenter 2023-03-23 15:40 ` Greg Kroah-Hartman 2 siblings, 1 reply; 14+ messages in thread From: Sergei Shtylyov @ 2023-03-23 10:29 UTC (permalink / raw) To: Mingxuan Xiang, Thinh Nguyen, Greg Kroah-Hartman Cc: hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel 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. :-) > > - if (!irq) > - irq = -EINVAL; > - > out: > return irq; > } MBR, Sergey ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 10:29 ` Sergei Shtylyov @ 2023-03-23 10:54 ` Oliver Neukum 2023-03-23 11:13 ` Dan Carpenter 0 siblings, 1 reply; 14+ messages in thread From: Oliver Neukum @ 2023-03-23 10:54 UTC (permalink / raw) To: Sergei Shtylyov, Mingxuan Xiang, Thinh Nguyen, Greg Kroah-Hartman Cc: hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel 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 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 10:54 ` Oliver Neukum @ 2023-03-23 11:13 ` Dan Carpenter 2023-03-23 13:48 ` Oliver Neukum 0 siblings, 1 reply; 14+ messages in thread From: Dan Carpenter @ 2023-03-23 11:13 UTC (permalink / raw) To: Oliver Neukum Cc: Sergei Shtylyov, Mingxuan Xiang, Thinh Nguyen, Greg Kroah-Hartman, hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel On Thu, Mar 23, 2023 at 11:54:24AM +0100, 'Oliver Neukum' via HUST OS Kernel Contribution wrote: > > > 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. The v2 patch doesn't change the semantics. Mine did though... regards, dan carpenter ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 11:13 ` Dan Carpenter @ 2023-03-23 13:48 ` Oliver Neukum 2023-03-23 14:06 ` Dan Carpenter 0 siblings, 1 reply; 14+ messages in thread From: Oliver Neukum @ 2023-03-23 13:48 UTC (permalink / raw) To: Dan Carpenter, Oliver Neukum Cc: Sergei Shtylyov, Mingxuan Xiang, Thinh Nguyen, Greg Kroah-Hartman, hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel On 23.03.23 12:13, Dan Carpenter wrote: >>>> 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. > > The v2 patch doesn't change the semantics. Mine did though... Now I may be dense, but let's look at the current code: irq = platform_get_irq(dwc3_pdev, 0); assuming irq = -EPROBE_DEFER if (irq > 0) { not taken dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); goto out; } if (!irq) irq != 0 irq = -EINVAL; out: return irq; returning -EINVAL Patched version: irq = platform_get_irq(dwc3_pdev, 0); assuming irq = -EPROBE_DEFER if (irq > 0) { dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); } out: return irq; returning -EPROBE_DEFER Your version: irq = platform_get_irq(dwc3_pdev, 0); assuming irq = -EPROBE_DEFER if (irq > 0) { not taken dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); + return irq; } + return -ENODEV; Yet another error return. Now, I admit I am by now sufficiently confused to know which version is correct, but they are all three different in what they return. Regards Oliver ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 13:48 ` Oliver Neukum @ 2023-03-23 14:06 ` Dan Carpenter 2023-03-23 15:38 ` Oliver Neukum 0 siblings, 1 reply; 14+ messages in thread From: Dan Carpenter @ 2023-03-23 14:06 UTC (permalink / raw) To: Oliver Neukum Cc: Sergei Shtylyov, Mingxuan Xiang, Thinh Nguyen, Greg Kroah-Hartman, hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel On Thu, Mar 23, 2023 at 02:48:56PM +0100, Oliver Neukum wrote: > On 23.03.23 12:13, Dan Carpenter wrote: > > > > > > 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. > > > > The v2 patch doesn't change the semantics. Mine did though... > > Now I may be dense, but let's look at the current code: > > irq = platform_get_irq(dwc3_pdev, 0); > > assuming irq = -EPROBE_DEFER > > if (irq > 0) { > > not taken > dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); > goto out; > } > > if (!irq) > > irq != 0 You've reversed this if statement in your head. It says that if platform_get_irq() returns zero, then return -EINVAL. The problem that Mingxuan is trying to address is that checking for zero is dead code and sometimes represents a bug when people check for zero instead of negatives. > irq = -EINVAL; > > out: > return irq; > > returning -EINVAL We do *want* it to return -EPROBE_DEFER as the current code does. regards, dan carpenter ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 14:06 ` Dan Carpenter @ 2023-03-23 15:38 ` Oliver Neukum 0 siblings, 0 replies; 14+ messages in thread From: Oliver Neukum @ 2023-03-23 15:38 UTC (permalink / raw) To: Dan Carpenter, Oliver Neukum Cc: Sergei Shtylyov, Mingxuan Xiang, Thinh Nguyen, Greg Kroah-Hartman, hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel On 23.03.23 15:06, Dan Carpenter wrote: >> irq != 0 > > You've reversed this if statement in your head. It says that if > platform_get_irq() returns zero, then return -EINVAL. > Argh. You are right. Sorry Oliver ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 9:53 [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Mingxuan Xiang 2023-03-23 10:29 ` Sergei Shtylyov @ 2023-03-23 10:52 ` Dan Carpenter 2023-03-23 11:00 ` Dan Carpenter 2023-03-23 15:40 ` Greg Kroah-Hartman 2 siblings, 1 reply; 14+ messages in thread From: Dan Carpenter @ 2023-03-23 10:52 UTC (permalink / raw) To: Mingxuan Xiang, Sergey Shtylyov Cc: Thinh Nguyen, Greg Kroah-Hartman, hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel On Thu, Mar 23, 2023 at 05:53:10PM +0800, 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; > } This patch is against kernel standards because we do not use {} curly braces for single line indents. I prefered the v1 patch. It silenced the static checker warning and deleted the dead code without getting into unrelated cleanups. I do not like deleting the goto because now the last if statement is different and I regard "making the last thing different" as an anti-pattern. It's better to be consistent. I also prefer to keep the error path and the success path as separate as possible. This function is weird because we are trying a bunch of different functions until one succeeds. Normally it is the reverse. Everything is expected to succeed and we give up as soon as we encounter a failure. So normally I would expect that the failure path would be indented an extra tab and I tell everyone to do failure handling not success handling but this function is the reverse. I also do not like do nothing out labels. It is more readable to return directly. Some people think that using an out label will encourage discipline and force people to think about error handling. There is no evidence to support this. I see plenty of ommited clean up in functions which have out labels. On the other hand, there is a lot of evidence that do nothing out labels introduce Forgot To Set the Error Code bugs. People sometimes think that error codes are not important but returning success instead of failure almost always leads to a kernel crash and for verify_input() functions forgetting to set the error code has obvious security implications. So anyway, I would probably re-write this function in a different way, but it's not related to the dead code. Next time, if someone asks you to make unrelated cleanups don't get tricked into a huge discussion about style. Just say that it seems unrelated and that it should be in a separate patch. On the other hand, I don't really care... I guess send a v3 of this patch but delete the { } as well. I still prefer v1 but since I don't care then let's do whatever is expedient. regards, dan carpenter ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 10:52 ` Dan Carpenter @ 2023-03-23 11:00 ` Dan Carpenter 2023-03-23 11:12 ` Dan Carpenter 0 siblings, 1 reply; 14+ messages in thread From: Dan Carpenter @ 2023-03-23 11:00 UTC (permalink / raw) To: Mingxuan Xiang, Sergey Shtylyov Cc: Thinh Nguyen, Greg Kroah-Hartman, hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel Here is how I would write that function, but I can't justify sending it because it's just a matter of personal taste. diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index f6f13e7f1ba1..fcc831ac3236 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -36,32 +36,28 @@ static int dwc3_host_get_irq(struct dwc3 *dwc) irq = platform_get_irq_byname_optional(dwc3_pdev, "host"); if (irq > 0) { dwc3_host_fill_xhci_irq_res(dwc, irq, "host"); - goto out; + return irq; } if (irq == -EPROBE_DEFER) - goto out; + return -EPROBE_DEFER; irq = platform_get_irq_byname_optional(dwc3_pdev, "dwc_usb3"); if (irq > 0) { dwc3_host_fill_xhci_irq_res(dwc, irq, "dwc_usb3"); - goto out; + return irq; } if (irq == -EPROBE_DEFER) - goto out; + return -EPROBE_DEFER; irq = platform_get_irq(dwc3_pdev, 0); if (irq > 0) { dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); - goto out; + return irq; } - if (!irq) - irq = -EINVAL; - -out: - return irq; + return -ENODEV; } int dwc3_host_init(struct dwc3 *dwc) ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 11:00 ` Dan Carpenter @ 2023-03-23 11:12 ` Dan Carpenter 0 siblings, 0 replies; 14+ messages in thread From: Dan Carpenter @ 2023-03-23 11:12 UTC (permalink / raw) To: Mingxuan Xiang, Sergey Shtylyov Cc: Thinh Nguyen, Greg Kroah-Hartman, hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel On Thu, Mar 23, 2023 at 02:00:35PM +0300, Dan Carpenter wrote: > irq = platform_get_irq(dwc3_pdev, 0); > if (irq > 0) { > dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); > - goto out; > + return irq; > } > > - if (!irq) > - irq = -EINVAL; > - > -out: > - return irq; > + return -ENODEV; Oh wait. We actually need to propagate the error code here because of -EPROBE_DEFER so my patch introduces a bug. regards, dan carpenter ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 9:53 [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Mingxuan Xiang 2023-03-23 10:29 ` Sergei Shtylyov 2023-03-23 10:52 ` Dan Carpenter @ 2023-03-23 15:40 ` Greg Kroah-Hartman 2023-03-24 1:46 ` Dongliang Mu 2 siblings, 1 reply; 14+ messages in thread From: Greg Kroah-Hartman @ 2023-03-23 15:40 UTC (permalink / raw) To: Mingxuan Xiang Cc: Thinh Nguyen, hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel On Thu, Mar 23, 2023 at 05:53:10PM +0800, Mingxuan Xiang wrote: > platform_get_irq() no longer returns 0, so there is no > need to check whether the return value is 0. How did you find this issue? How was it tested? thanks, greg k-h ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-23 15:40 ` Greg Kroah-Hartman @ 2023-03-24 1:46 ` Dongliang Mu 2023-03-24 5:17 ` Dan Carpenter 0 siblings, 1 reply; 14+ messages in thread From: Dongliang Mu @ 2023-03-24 1:46 UTC (permalink / raw) To: Greg Kroah-Hartman, Mingxuan Xiang Cc: Thinh Nguyen, hust-os-kernel-patches, linux-usb, linux-kernel On 2023/3/23 23:40, Greg Kroah-Hartman wrote: > On Thu, Mar 23, 2023 at 05:53:10PM +0800, Mingxuan Xiang wrote: >> platform_get_irq() no longer returns 0, so there is no >> need to check whether the return value is 0. > How did you find this issue? > > How was it tested? Hi Greg, We found this issue by Smatch. Our team is trying fix some true bugs found by Smatch, with the help of Dan. Since this is a dead code removal, we only do compilation testing. > > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-24 1:46 ` Dongliang Mu @ 2023-03-24 5:17 ` Dan Carpenter 2023-03-24 5:19 ` Dongliang Mu 0 siblings, 1 reply; 14+ messages in thread From: Dan Carpenter @ 2023-03-24 5:17 UTC (permalink / raw) To: Dongliang Mu Cc: Greg Kroah-Hartman, Mingxuan Xiang, Thinh Nguyen, hust-os-kernel-patches, linux-usb, linux-kernel On Fri, Mar 24, 2023 at 09:46:40AM +0800, Dongliang Mu wrote: > > On 2023/3/23 23:40, Greg Kroah-Hartman wrote: > > On Thu, Mar 23, 2023 at 05:53:10PM +0800, Mingxuan Xiang wrote: > > > platform_get_irq() no longer returns 0, so there is no > > > need to check whether the return value is 0. > > How did you find this issue? > > > > How was it tested? > > Hi Greg, > > We found this issue by Smatch. Our team is trying fix some true bugs found > by Smatch, with the help of Dan. LOL. What did I do to get thrown under the bus like this? > > Since this is a dead code removal, we only do compilation testing. > Just v3 and mention in the commit message that the issue was found by Smatch and the warning message that Smatch prints. Put under the --- cut off line that it has only been compile tested. Also we needed to send a v3 anyway to remove the {} curly braces. regards, dan carpenter ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() 2023-03-24 5:17 ` Dan Carpenter @ 2023-03-24 5:19 ` Dongliang Mu 0 siblings, 0 replies; 14+ messages in thread From: Dongliang Mu @ 2023-03-24 5:19 UTC (permalink / raw) To: Dan Carpenter Cc: Dongliang Mu, Greg Kroah-Hartman, Mingxuan Xiang, Thinh Nguyen, hust-os-kernel-patches, linux-usb, linux-kernel On Fri, Mar 24, 2023 at 1:17 PM Dan Carpenter <error27@gmail.com> wrote: > > On Fri, Mar 24, 2023 at 09:46:40AM +0800, Dongliang Mu wrote: > > > > On 2023/3/23 23:40, Greg Kroah-Hartman wrote: > > > On Thu, Mar 23, 2023 at 05:53:10PM +0800, Mingxuan Xiang wrote: > > > > platform_get_irq() no longer returns 0, so there is no > > > > need to check whether the return value is 0. > > > How did you find this issue? > > > > > > How was it tested? > > > > Hi Greg, > > > > We found this issue by Smatch. Our team is trying fix some true bugs found > > by Smatch, with the help of Dan. > > LOL. What did I do to get thrown under the bus like this? Oh, my apologies :). We are a team. We together would like to fix kernel bugs and do some contribution. > > > > > Since this is a dead code removal, we only do compilation testing. > > > > Just v3 and mention in the commit message that the issue was found by > Smatch and the warning message that Smatch prints. Put under the --- > cut off line that it has only been compile tested. > > Also we needed to send a v3 anyway to remove the {} curly braces. Yes, I have asked Mingxuan to craft this v3 patch. > > regards, > dan carpenter > > -- > You received this message because you are subscribed to the Google Groups "HUST OS Kernel Contribution" group. > To unsubscribe from this group and stop receiving emails from it, send an email to hust-os-kernel-patches+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/hust-os-kernel-patches/adcd6c67-cedf-4831-9a9d-53c3ee2ebb88%40kili.mountain. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-03-24 5:22 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-03-23 9:53 [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Mingxuan Xiang 2023-03-23 10:29 ` Sergei Shtylyov 2023-03-23 10:54 ` Oliver Neukum 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
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®