Re: [PATCH v5 04/15] USB: typec: Load TPS25750 patch bundle

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

 



Hi Abdel,

kernel test robot noticed the following build warnings:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus linus/master v6.6-rc1 next-20230915]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Abdel-Alkuor/dt-bindings-usb-tps6598x-Add-tps25750/20230917-233037
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link:    https://lore.kernel.org/r/20230917152639.21443-5-alkuor%40gmail.com
patch subject: [PATCH v5 04/15] USB: typec: Load TPS25750 patch bundle
config: i386-buildonly-randconfig-006-20230917 (https://download.01.org/0day-ci/archive/20230918/202309180124.ZkZ5E7oC-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230918/202309180124.ZkZ5E7oC-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309180124.ZkZ5E7oC-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/acpi.h:14,
                    from include/linux/i2c.h:13,
                    from drivers/usb/typec/tipd/core.c:9:
   drivers/usb/typec/tipd/core.c: In function 'tps25750_start_patch_burst_mode':
>> drivers/usb/typec/tipd/core.c:844:21: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'const unsigned int'} [-Wformat=]
     844 |   dev_err(tps->dev, "Failed to write patch %s of %lu bytes\n",
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:16: note: in definition of macro 'dev_printk_index_wrap'
     110 |   _p_func(dev, fmt, ##__VA_ARGS__);   \
         |                ^~~
   include/linux/dev_printk.h:144:49: note: in expansion of macro 'dev_fmt'
     144 |  dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                 ^~~~~~~
   drivers/usb/typec/tipd/core.c:844:3: note: in expansion of macro 'dev_err'
     844 |   dev_err(tps->dev, "Failed to write patch %s of %lu bytes\n",
         |   ^~~~~~~
   drivers/usb/typec/tipd/core.c:844:52: note: format string is defined here
     844 |   dev_err(tps->dev, "Failed to write patch %s of %lu bytes\n",
         |                                                  ~~^
         |                                                    |
         |                                                    long unsigned int
         |                                                  %u


vim +844 drivers/usb/typec/tipd/core.c

   801	
   802	static int tps25750_start_patch_burst_mode(struct tps6598x *tps)
   803	{
   804		int ret;
   805		const struct firmware *fw;
   806		const char *firmware_name;
   807		struct {
   808			u32 fw_size;
   809			u8 addr;
   810			u8 timeout;
   811		} __packed bpms_data;
   812	
   813		ret = device_property_read_string(tps->dev, "firmware-name",
   814						  &firmware_name);
   815		if (ret)
   816			return ret;
   817	
   818		ret = request_firmware(&fw, firmware_name, tps->dev);
   819		if (ret) {
   820			dev_err(tps->dev, "failed to retrieve \"%s\"\n", firmware_name);
   821			return ret;
   822		}
   823	
   824		if (fw->size == 0) {
   825			ret = -EINVAL;
   826			goto release_fw;
   827		}
   828	
   829		ret = device_property_read_u8(tps->dev, "ti,patch-address", &bpms_data.addr);
   830		if (ret) {
   831			dev_err(tps->dev, "failed to get patch address\n");
   832			return ret;
   833		}
   834	
   835		bpms_data.fw_size = fw->size;
   836		bpms_data.timeout = TPS_BUNDLE_TIMEOUT;
   837	
   838		ret = tps25750_exec_pbms(tps, (u8 *)&bpms_data, sizeof(bpms_data));
   839		if (ret)
   840			goto release_fw;
   841	
   842		ret = tps25750_write_firmware(tps, bpms_data.addr, fw->data, fw->size);
   843		if (ret) {
 > 844			dev_err(tps->dev, "Failed to write patch %s of %lu bytes\n",
   845				firmware_name, fw->size);
   846			goto release_fw;
   847		}
   848	
   849		/*
   850		 * A delay of 500us is required after the firmware is written
   851		 * based on pg.62 in tps6598x Host Interface Technical
   852		 * Reference Manual
   853		 * https://www.ti.com/lit/ug/slvuc05a/slvuc05a.pdf
   854		 */
   855		udelay(500);
   856	
   857	release_fw:
   858		release_firmware(fw);
   859	
   860		return ret;
   861	}
   862	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux