Re: [PATCH 1/2] misc: qualcomm: QRC driver for Robotic SDK MCU

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

 



Hi Canfeng,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 805d849d7c3cc1f38efefd48b2480d62b7b5dcb7]

url:    https://github.com/intel-lab-lkp/linux/commits/Canfeng-Zhuang/misc-qualcomm-QRC-driver-for-Robotic-SDK-MCU/20240304-005601
base:   805d849d7c3cc1f38efefd48b2480d62b7b5dcb7
patch link:    https://lore.kernel.org/r/20240304-qcom_qrc-v1-1-2a709f95fd61%40quicinc.com
patch subject: [PATCH 1/2] misc: qualcomm: QRC driver for Robotic SDK MCU
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240304/202403040745.kD48ZDkC-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240304/202403040745.kD48ZDkC-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/202403040745.kD48ZDkC-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/serdev.h:9,
                    from drivers/misc/qrc/qrc_uart.c:10:
   drivers/misc/qrc/qrc_uart.c: In function 'qrcuart_xmit':
>> drivers/misc/qrc/qrc_uart.c:203:35: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     203 |                 dev_err(dev->dev, "qrcuart transmit date overflow %ld\n", data_length);
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   drivers/misc/qrc/qrc_uart.c:203:17: note: in expansion of macro 'dev_err'
     203 |                 dev_err(dev->dev, "qrcuart transmit date overflow %ld\n", data_length);
         |                 ^~~~~~~
   drivers/misc/qrc/qrc_uart.c:203:69: note: format string is defined here
     203 |                 dev_err(dev->dev, "qrcuart transmit date overflow %ld\n", data_length);
         |                                                                   ~~^
         |                                                                     |
         |                                                                     long int
         |                                                                   %d


vim +203 drivers/misc/qrc/qrc_uart.c

   190	
   191	static enum qrcdev_tx qrcuart_xmit(const char __user  *buf,
   192					   size_t data_length, struct qrc_dev *dev)
   193	{
   194		struct qrcuart *qrc = qrc_get_data(dev);
   195		struct qrc_device_stats *n_stats = &dev->stats;
   196		size_t written;
   197		u8 *pos;
   198	
   199		WARN_ON(qrc->tx_left);
   200	
   201		pos = qrc->tx_buffer + qrc->tx_left;
   202		if ((data_length + qrc->tx_left) > QRC_TX_BUFF_SIZE) {
 > 203			dev_err(dev->dev, "qrcuart transmit date overflow %ld\n", data_length);
   204			return __QRCDEV_TX_MIN;
   205		}
   206	
   207		if (copy_from_user(pos, buf, data_length))
   208			return __QRCDEV_TX_MIN;
   209	
   210		pos += data_length;
   211	
   212		spin_lock(&qrc->lock);
   213	
   214		written = serdev_device_write_buf(qrc->serdev, qrc->tx_buffer,
   215						  pos - qrc->tx_buffer);
   216		if (written > 0) {
   217			qrc->tx_left = (pos - qrc->tx_buffer) - written;
   218			qrc->tx_head = qrc->tx_buffer + written;
   219			n_stats->tx_bytes += written;
   220		}
   221	
   222		spin_unlock(&qrc->lock);
   223	
   224		return QRCDEV_TX_OK;
   225	}
   226	

-- 
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