Linux USB
 help / color / mirror / Atom feed
* [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct
@ 2021-03-11 12:47 Elias Rudberg
  2021-03-11 13:04 ` Heikki Krogerus
  2021-03-12 12:50 ` Guido Günther
  0 siblings, 2 replies; 5+ messages in thread
From: Elias Rudberg @ 2021-03-11 12:47 UTC (permalink / raw)
  To: heikki.krogerus, gregkh; +Cc: linux-usb, Elias Rudberg

Remove the unused "u32 vdo[3]" part in the tps6598x_rx_identity_reg
struct. This helps avoid "failed to register partner" errors which
happen when tps6598x_read_partner_identity() fails because the
amount of data read is 12 bytes smaller than the struct size.
Note that vdo[3] is already in usb_pd_identity and hence
shouldn't be added to tps6598x_rx_identity_reg as well.

Fixes: f6c56ca91b92 ("usb: typec: Add the Product Type VDOs to struct usb_pd_identity")

Signed-off-by: Elias Rudberg <mail@eliasrudberg.se>
---
 drivers/usb/typec/tps6598x.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
index 6e6ef6317523..29bd1c5a283c 100644
--- a/drivers/usb/typec/tps6598x.c
+++ b/drivers/usb/typec/tps6598x.c
@@ -64,7 +64,6 @@ enum {
 struct tps6598x_rx_identity_reg {
 	u8 status;
 	struct usb_pd_identity identity;
-	u32 vdo[3];
 } __packed;
 
 /* Standard Task return codes */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct
  2021-03-11 12:47 [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct Elias Rudberg
@ 2021-03-11 13:04 ` Heikki Krogerus
  2021-03-11 13:15   ` Greg KH
  2021-03-12 12:50 ` Guido Günther
  1 sibling, 1 reply; 5+ messages in thread
From: Heikki Krogerus @ 2021-03-11 13:04 UTC (permalink / raw)
  To: Elias Rudberg; +Cc: gregkh, linux-usb

Hi,

On Thu, Mar 11, 2021 at 01:47:10PM +0100, Elias Rudberg wrote:
> Remove the unused "u32 vdo[3]" part in the tps6598x_rx_identity_reg
> struct. This helps avoid "failed to register partner" errors which
> happen when tps6598x_read_partner_identity() fails because the
> amount of data read is 12 bytes smaller than the struct size.
> Note that vdo[3] is already in usb_pd_identity and hence
> shouldn't be added to tps6598x_rx_identity_reg as well.
> 
> Fixes: f6c56ca91b92 ("usb: typec: Add the Product Type VDOs to struct usb_pd_identity")
> 
> Signed-off-by: Elias Rudberg <mail@eliasrudberg.se>

This needs to go to the stable kernels as well. Please resend with the
appropriate "Cc: stable@vger.kernel.org" tag. Please also include my
reviewed-by tag:

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tps6598x.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
> index 6e6ef6317523..29bd1c5a283c 100644
> --- a/drivers/usb/typec/tps6598x.c
> +++ b/drivers/usb/typec/tps6598x.c
> @@ -64,7 +64,6 @@ enum {
>  struct tps6598x_rx_identity_reg {
>  	u8 status;
>  	struct usb_pd_identity identity;
> -	u32 vdo[3];
>  } __packed;
>  
>  /* Standard Task return codes */
> -- 
> 2.25.1

thanks,

-- 
heikki

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct
  2021-03-11 13:04 ` Heikki Krogerus
@ 2021-03-11 13:15   ` Greg KH
  2021-03-11 13:34     ` Heikki Krogerus
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-03-11 13:15 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: Elias Rudberg, linux-usb

On Thu, Mar 11, 2021 at 03:04:09PM +0200, Heikki Krogerus wrote:
> Hi,
> 
> On Thu, Mar 11, 2021 at 01:47:10PM +0100, Elias Rudberg wrote:
> > Remove the unused "u32 vdo[3]" part in the tps6598x_rx_identity_reg
> > struct. This helps avoid "failed to register partner" errors which
> > happen when tps6598x_read_partner_identity() fails because the
> > amount of data read is 12 bytes smaller than the struct size.
> > Note that vdo[3] is already in usb_pd_identity and hence
> > shouldn't be added to tps6598x_rx_identity_reg as well.
> > 
> > Fixes: f6c56ca91b92 ("usb: typec: Add the Product Type VDOs to struct usb_pd_identity")
> > 
> > Signed-off-by: Elias Rudberg <mail@eliasrudberg.se>
> 
> This needs to go to the stable kernels as well. Please resend with the
> appropriate "Cc: stable@vger.kernel.org" tag. Please also include my
> reviewed-by tag:
> 
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

I can add the cc: stable when committting this, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct
  2021-03-11 13:15   ` Greg KH
@ 2021-03-11 13:34     ` Heikki Krogerus
  0 siblings, 0 replies; 5+ messages in thread
From: Heikki Krogerus @ 2021-03-11 13:34 UTC (permalink / raw)
  To: Greg KH; +Cc: Elias Rudberg, linux-usb

On Thu, Mar 11, 2021 at 02:15:10PM +0100, Greg KH wrote:
> On Thu, Mar 11, 2021 at 03:04:09PM +0200, Heikki Krogerus wrote:
> > Hi,
> > 
> > On Thu, Mar 11, 2021 at 01:47:10PM +0100, Elias Rudberg wrote:
> > > Remove the unused "u32 vdo[3]" part in the tps6598x_rx_identity_reg
> > > struct. This helps avoid "failed to register partner" errors which
> > > happen when tps6598x_read_partner_identity() fails because the
> > > amount of data read is 12 bytes smaller than the struct size.
> > > Note that vdo[3] is already in usb_pd_identity and hence
> > > shouldn't be added to tps6598x_rx_identity_reg as well.
> > > 
> > > Fixes: f6c56ca91b92 ("usb: typec: Add the Product Type VDOs to struct usb_pd_identity")
> > > 
> > > Signed-off-by: Elias Rudberg <mail@eliasrudberg.se>
> > 
> > This needs to go to the stable kernels as well. Please resend with the
> > appropriate "Cc: stable@vger.kernel.org" tag. Please also include my
> > reviewed-by tag:
> > 
> > Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> 
> I can add the cc: stable when committting this, thanks.

Thanks Greg.

-- 
heikki

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct
  2021-03-11 12:47 [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct Elias Rudberg
  2021-03-11 13:04 ` Heikki Krogerus
@ 2021-03-12 12:50 ` Guido Günther
  1 sibling, 0 replies; 5+ messages in thread
From: Guido Günther @ 2021-03-12 12:50 UTC (permalink / raw)
  To: Elias Rudberg; +Cc: heikki.krogerus, gregkh, linux-usb

Hi,
On Thu, Mar 11, 2021 at 01:47:10PM +0100, Elias Rudberg wrote:
> Remove the unused "u32 vdo[3]" part in the tps6598x_rx_identity_reg
> struct. This helps avoid "failed to register partner" errors which
> happen when tps6598x_read_partner_identity() fails because the
> amount of data read is 12 bytes smaller than the struct size.
> Note that vdo[3] is already in usb_pd_identity and hence
> shouldn't be added to tps6598x_rx_identity_reg as well.
> 
> Fixes: f6c56ca91b92 ("usb: typec: Add the Product Type VDOs to struct usb_pd_identity")
> 
> Signed-off-by: Elias Rudberg <mail@eliasrudberg.se>
> ---
>  drivers/usb/typec/tps6598x.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
> index 6e6ef6317523..29bd1c5a283c 100644
> --- a/drivers/usb/typec/tps6598x.c
> +++ b/drivers/usb/typec/tps6598x.c
> @@ -64,7 +64,6 @@ enum {
>  struct tps6598x_rx_identity_reg {
>  	u8 status;
>  	struct usb_pd_identity identity;
> -	u32 vdo[3];
>  } __packed;
>  
>  /* Standard Task return codes */

Reviewed-by: Guido Günther <agx@sigxcpu.org>

Cheers,
 -- Guido

> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-12 12:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-11 12:47 [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct Elias Rudberg
2021-03-11 13:04 ` Heikki Krogerus
2021-03-11 13:15   ` Greg KH
2021-03-11 13:34     ` Heikki Krogerus
2021-03-12 12:50 ` Guido Günther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox