2022-12-20 22:38:56

by Patel, Utkarsh H

[permalink] [raw]
Subject: [PATCH] thunderbolt: Do not report errors if on-board retimers are found

tb_retimer_scan() returns error even when on-board retimers are found.

Fixes: 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when retimers are scanned")

Signed-off-by: Utkarsh Patel <[email protected]>
---
drivers/thunderbolt/retimer.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c
index 81252e31014a..6ebe7a2886ec 100644
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -471,10 +471,9 @@ int tb_retimer_scan(struct tb_port *port, bool add)
break;
}

- if (!last_idx) {
- ret = 0;
+ ret = 0;
+ if (!last_idx)
goto out;
- }

/* Add on-board retimers if they do not exist already */
for (i = 1; i <= last_idx; i++) {
--
2.25.1


2022-12-21 07:33:41

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] thunderbolt: Do not report errors if on-board retimers are found

On Tue, Dec 20, 2022 at 02:30:06PM -0800, Utkarsh Patel wrote:
> tb_retimer_scan() returns error even when on-board retimers are found.
>
> Fixes: 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when retimers are scanned")
>
> Signed-off-by: Utkarsh Patel <[email protected]>

Please do not put a blank line between the "Fixes" tag and your
signed-off-by.

And is this also needed in stable kernels? If so, add the proper tag
please.

thanks,

greg k-h

2022-12-22 06:36:42

by Patel, Utkarsh H

[permalink] [raw]
Subject: RE: [PATCH] thunderbolt: Do not report errors if on-board retimers are found

Hi Greg,

Thank you for the review and feedback.

> -----Original Message-----
> From: Greg KH <[email protected]>
> Sent: Tuesday, December 20, 2022 10:50 PM
> To: Patel, Utkarsh H <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; Mani, Rajmohan <[email protected]>
> Subject: Re: [PATCH] thunderbolt: Do not report errors if on-board retimers
> are found
>
> On Tue, Dec 20, 2022 at 02:30:06PM -0800, Utkarsh Patel wrote:
> > tb_retimer_scan() returns error even when on-board retimers are found.
> >
> > Fixes: 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when
> > retimers are scanned")
> >
> > Signed-off-by: Utkarsh Patel <[email protected]>
>
> Please do not put a blank line between the "Fixes" tag and your signed-off-
> by.

Ack. I will correct it in v2.

>
> And is this also needed in stable kernels? If so, add the proper tag please.

Ack.

Sincerely,
Utkarsh Patel.