RE: [PATCH] usb: typec: ucsi_ccg: workaround for NVIDIA test device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Heikki

> -----Original Message-----
> From: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
> Sent: Thursday, February 27, 2020 6:16 AM
> To: Ajay Gupta <ajaykuee@xxxxxxxxx>
> Cc: linux-usb@xxxxxxxxxxxxxxx; Ajay Gupta <ajayg@xxxxxxxxxx>
> Subject: Re: [PATCH] usb: typec: ucsi_ccg: workaround for NVIDIA test device
> 
> 
> On Thu, Feb 27, 2020 at 04:02:07PM +0200, Heikki Krogerus wrote:
> > This did not compile:
> >
> > drivers/usb/typec/ucsi/ucsi_ccg.c: In function ‘ucsi_ccg_read’:
> > drivers/usb/typec/ucsi/ucsi_ccg.c:505:22: error:
> ‘USB_TYPEC_NVIDIA_VLINK_DBG_VDO’ undeclared (first use in this function);
> did you mean ‘USB_TYPEC_NVIDIA_VLINK_SID’?
> >   505 |        alt[0].mid == USB_TYPEC_NVIDIA_VLINK_DBG_VDO) {
> >       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >       |                      USB_TYPEC_NVIDIA_VLINK_SID
> > drivers/usb/typec/ucsi/ucsi_ccg.c:505:22: note: each undeclared
> > identifier is reported only once for each function it appears in
> > drivers/usb/typec/ucsi/ucsi_ccg.c:506:18: error:
> ‘USB_TYPEC_NVIDIA_VLINK_DP_VDO’ undeclared (first use in this function);
> did you mean ‘USB_TYPEC_NVIDIA_VLINK_SID’?
> >   506 |     alt[0].mid = USB_TYPEC_NVIDIA_VLINK_DP_VDO |
> >       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >       |                  USB_TYPEC_NVIDIA_VLINK_SID
> 
> Sorry, I was working on top of the wrong branch. The patch does compile
> fine...
> 
> > All those nested conditions make the code a bit difficult to read for
> > me. You could handle the NVIDIA alt mode in its own function. I'm
> > attaching a diff that you should be able to apply on top of your patch
> > that should make the code a bit easier to read.
> 
> I attached a fixed version of the diff.
Thanks for review. I have updated the change and posted v2.

thanks
> nvpublic
> 
> thanks,
> 
> --
> heikki




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux