Subject: Re: [PATCH v4 1/3] mctp pcc: Check before sending MCTP PCC response ACK

From: kernel test robot <[email-masked]>
Date: Thu, 4 Jul 2024 16:53:35 +0800

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge linus/master v6.10-rc6 next-20240703]
[cannot apply to horms-ipvs/master]
[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/admiyo-os-amperecomputing-com/mctp-pcc-Check-before-sending-MCTP-PCC-response-ACK/20240703-163558
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link:    https://lore.kernel.org/r/20240702225845.322234-2-admiyo%40os.amperecomputing.com
patch subject: [PATCH v4 1/3] mctp pcc: Check before sending MCTP PCC response ACK
config: i386-randconfig-061-20240704 (https://download.01.org/0day-ci/archive/20240704/[email-masked]/config)
compiler: gcc-12 (Ubuntu 12.3.0-9ubuntu2) 12.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240704/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

sparse warnings: (new ones prefixed by >>)
>> drivers/mailbox/pcc.c:287:44: sparse: sparse: dubious: !x & y

vim +287 drivers/mailbox/pcc.c

   272	
   273	static void check_and_ack(struct pcc_chan_info *pchan, struct mbox_chan *chan)
   274	{
   275		struct pcc_extended_type_hdr pcc_hdr;
   276	
   277		if (pchan->type != ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE)
   278			return;
   279		memcpy_fromio(&pcc_hdr, pchan->shmem_base_addr,
   280			      sizeof(struct pcc_extended_type_hdr));
   281		/*
   282		 * The PCC slave subspace channel needs to set the command complete bit
   283		 * and ring doorbell after processing message.
   284		 *
   285		 * The PCC master subspace channel clears chan_in_use to free channel.
   286		 */
 > 287		if (!!le32_to_cpup(&pcc_hdr.flags) & PCC_ACK_FLAG_MASK)
   288			pcc_send_data(chan, NULL);
   289	}
   290	

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