usb: typec: ucsi: ccg: add firmware flashing support
PATCH 2/4 usb: typec: ucsi: ccg: add firmware flashing support
Hi Ajay,
Quoted 28 lines · kbuild test robot
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)Quoted 1 line
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_ccg.c:690:16: sparse: restricted__le16degrades to integer
drivers/usb/typec/ucsi/ucsi_ccg.c:698:24: sparse: restricted__le16degrades to integerdrivers/usb/typec/ucsi/ucsi_ccg.c:735:26: sparse: restricted__le16degrades to integerdrivers/usb/typec/ucsi/ucsi_ccg.c:737:33: sparse: restricted__le16degrades to integerdrivers/usb/typec/ucsi/ucsi_ccg.c:777:37: sparse: restricted__le16degrades to integervim +690
drivers/usb/typec/ucsi/ucsi_ccg.c
Quoted 11 lines
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 */Quoted 1 line
690 if (
app->build!= (('n' << 8) | 'v')) {
How about a macro for these?
#define CCG_VERSION_BUILD (__le16)(...)
Quoted 6 lines
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.
Quoted 8 lines
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,