RE: [PATCH 2/4] usb: typec: ucsi: ccg: add firmware flashing support

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

 



Hi Heikki,

> -----Original Message-----
> From: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
> Sent: Thursday, April 11, 2019 12:40 AM
> To: Ajay Gupta <ajayg@xxxxxxxxxx>
> Cc: kbuild test robot <lkp@xxxxxxxxx>; kbuild-all@xxxxxx; Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx>; linux-usb@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 2/4] usb: typec: ucsi: ccg: add firmware flashing support
> 
> Hi Ajay,
> 
> On Thu, Apr 11, 2019 at 12:31:45AM +0800, kbuild test robot wrote:
> > Hi Heikki,
> >
> > I love your patch! Perhaps something to improve:
> >
> > [auto build test WARNING on usb/usb-testing] [also build test WARNING
> > on v5.1-rc4 next-20190410] [if your patch is applied to the wrong git
> > tree, please drop us a note to help improve the system]
> >
> > url:    https://github.com/0day-ci/linux/commits/Heikki-Krogerus/usb-typec-
> ucsi-Remaining-changes-for-v5-2/20190410-221455
> > base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-
> testing
> > reproduce:
> >         # apt-get install sparse
> >         make ARCH=x86_64 allmodconfig
> >         make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
> >
> >
> > sparse warnings: (new ones prefixed by >>)
> >
> >    drivers/usb/typec/ucsi/ucsi_ccg.c:212:24: sparse: expression using
> sizeof(void)
> >    drivers/usb/typec/ucsi/ucsi_ccg.c:212:24: sparse: expression using
> > sizeof(void)
> > >> drivers/usb/typec/ucsi/ucsi_ccg.c:690:16: sparse: restricted __le16
> > >> degrades to integer
> >    drivers/usb/typec/ucsi/ucsi_ccg.c:698:24: sparse: restricted __le16 degrades
> to integer
> >    drivers/usb/typec/ucsi/ucsi_ccg.c:735:26: sparse: restricted __le16 degrades
> to integer
> >    drivers/usb/typec/ucsi/ucsi_ccg.c:737:33: sparse: restricted __le16 degrades
> to integer
> >    drivers/usb/typec/ucsi/ucsi_ccg.c:777:37: sparse: restricted __le16
> > degrades to integer
> >
> > vim +690 drivers/usb/typec/ucsi/ucsi_ccg.c
> >
> >    680
> >    681	static bool ccg_check_vendor_version(struct ucsi_ccg *uc,
> >    682					     struct version_format *app,
> >    683					     struct fw_config_table *fw_cfg)
> >    684	{
> >    685		struct device *dev = uc->dev;
> >    686
> >    687		/* Check if the fw build is for supported vendors.
> >    688		 * Add all supported vendors here.
> >    689		 */
> >  > 690		if (app->build != (('n' << 8) | 'v')) {
> 
> How about a macro for these?
> 
>         #define CCG_VERSION_BUILD       (__le16)(...)
Sure, I have fixed them and posted version-6 of patches at
https://marc.info/?l=linux-usb&m=155501300619846&w=2 

Please help review.

Thanks
> nvpublic
> 
> >    691			dev_info(dev, "current fw is not from supported
> vendor\n");
> >    692			return false;
> >    693		}
> >    694
> >    695		/* Check if the new fw build is for supported vendors
> >    696		 * Add all supported vendors here.
> >    697		 */
> >    698		if (fw_cfg->app.build != (('n' << 8) | 'v')) {
> >    699			dev_info(dev, "new fw is not from supported
> vendor\n");
> >    700			return false;
> >    701		}
> >    702		return true;
> >    703	}
> >    704
> 
> 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