Re: [PATCH V2 2/2] mailbox: tmelite-qmp: Introduce TMEL QMP mailbox driver

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

 



Hi Sricharan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.13-rc5 next-20241220]
[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/Sricharan-R/dt-bindings-mailbox-Document-qcom-tmel-qmp/20241231-135219
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20241231054900.2144961-3-quic_srichara%40quicinc.com
patch subject: [PATCH V2 2/2] mailbox: tmelite-qmp: Introduce TMEL QMP mailbox driver
config: i386-randconfig-005-20250101 (https://download.01.org/0day-ci/archive/20250101/202501011724.6gr0JxBf-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250101/202501011724.6gr0JxBf-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/202501011724.6gr0JxBf-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from drivers/mailbox/qcom-tmel-qmp.c:10:
   In file included from include/linux/dma-mapping.h:8:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2223:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/mailbox/qcom-tmel-qmp.c:312:55: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
     312 |                 dev_err(mdev->dev, "Unsupported packet size %lu\n", pkt->iov_len);
         |                                                             ~~~     ^~~~~~~~~~~~
         |                                                             %zu
   include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
     154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                                ~~~     ^~~~~~~~~~~
   include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ~~~    ^~~~~~~~~~~
   drivers/mailbox/qcom-tmel-qmp.c:710:10: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
     709 |                 pr_err("Invalid pkt.size received size: %lu, expected: %zu\n",
         |                                                         ~~~
         |                                                         %zu
     710 |                        tdev->pkt.iov_len, sizeof(struct tmel_ipc_pkt));
         |                        ^~~~~~~~~~~~~~~~~
   include/linux/printk.h:544:33: note: expanded from macro 'pr_err'
     544 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |                                ~~~     ^~~~~~~~~~~
   include/linux/printk.h:501:60: note: expanded from macro 'printk'
     501 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:473:19: note: expanded from macro 'printk_index_wrap'
     473 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   drivers/mailbox/qcom-tmel-qmp.c:834:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     834 |         int ret;
         |             ^
   4 warnings generated.


vim +312 drivers/mailbox/qcom-tmel-qmp.c

   290	
   291	/**
   292	 * qmp_send_data() - Copy the data to the channel's mailbox and notify
   293	 *		     remote subsystem of new data. This function will
   294	 *		     return an error if the previous message sent has
   295	 *		     not been read. Cannot Sleep.
   296	 * @chan:	mailbox channel that data is to be sent over.
   297	 * @data:	Data to be sent to remote processor, should be in the format of
   298	 *		a kvec.
   299	 *
   300	 * Return: 0 on succes or standard Linux error code.
   301	 */
   302	static int qmp_send_data(struct qmp_device *mdev, void *data)
   303	{
   304		struct kvec *pkt = (struct kvec *)data;
   305		void __iomem *addr;
   306		unsigned long flags;
   307	
   308		if (!mdev || !data || !completion_done(&mdev->ch_complete))
   309			return -EINVAL;
   310	
   311		if (pkt->iov_len > QMP_MAX_PKT_SIZE) {
 > 312			dev_err(mdev->dev, "Unsupported packet size %lu\n", pkt->iov_len);
   313			return -EINVAL;
   314		}
   315	
   316		spin_lock_irqsave(&mdev->tx_lock, flags);
   317		if (mdev->tx_sent) {
   318			spin_unlock_irqrestore(&mdev->tx_lock, flags);
   319			return -EAGAIN;
   320		}
   321	
   322		dev_dbg(mdev->dev, "%s: mcore 0x%x ucore 0x%x", __func__,
   323			mdev->mcore.val, mdev->ucore.val);
   324	
   325		addr = mdev->mcore_desc + QMP_CTRL_DATA_SIZE;
   326		memcpy_toio(addr, pkt->iov_base, pkt->iov_len);
   327	
   328		mdev->mcore.bits.frag_size = pkt->iov_len;
   329		mdev->mcore.bits.rem_frag_count = 0;
   330	
   331		dev_dbg(mdev->dev, "Copied buffer to mbox, sz: %d",
   332			mdev->mcore.bits.frag_size);
   333	
   334		mdev->tx_sent = true;
   335		QMP_MCORE_CH_VAR_TOGGLE(mdev, tx);
   336		qmp_send_irq(mdev);
   337		qmp_schedule_tx_timeout(mdev);
   338		spin_unlock_irqrestore(&mdev->tx_lock, flags);
   339	
   340		return 0;
   341	}
   342	

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