Hi Matt,
kernel test robot noticed the following build errors:
[auto build test ERROR on cb560795c8c2ceca1d36a95f0d1b2eafc4074e37]
url: https://github.com/intel-lab-lkp/linux/commits/Matt-Johnston/mctp-i2c-handle... base: cb560795c8c2ceca1d36a95f0d1b2eafc4074e37 patch link: https://lore.kernel.org/r/20241021-mctp-i2c-null-dest-v2-1-4503e478517c%40co... patch subject: [PATCH net v2] mctp i2c: handle NULL header address config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241022/202410221036.hs5xBVOp-lkp@i...) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241022/202410221036.hs5xBVOp-lkp@i...)
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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202410221036.hs5xBVOp-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/net/mctp/mctp-i2c.c:599:9: error: incompatible pointer to integer conversion assigning to 'u8' (aka 'unsigned char') from 'const unsigned char *' [-Wint-conversion]
599 | llsrc = dev->dev_addr; | ^ ~~~~~~~~~~~~~ 1 error generated.
vim +599 drivers/net/mctp/mctp-i2c.c
579 580 static int mctp_i2c_header_create(struct sk_buff *skb, struct net_device *dev, 581 unsigned short type, const void *daddr, 582 const void *saddr, unsigned int len) 583 { 584 struct mctp_i2c_hdr *hdr; 585 struct mctp_hdr *mhdr; 586 u8 lldst, llsrc; 587 588 if (len > MCTP_I2C_MAXMTU) 589 return -EMSGSIZE; 590 591 if (daddr) 592 lldst = *((u8 *)daddr); 593 else 594 return -EINVAL; 595 596 if (saddr) 597 llsrc = *((u8 *)saddr); 598 else
599 llsrc = dev->dev_addr;
600 601 skb_push(skb, sizeof(struct mctp_i2c_hdr)); 602 skb_reset_mac_header(skb); 603 hdr = (void *)skb_mac_header(skb); 604 mhdr = mctp_hdr(skb); 605 hdr->dest_slave = (lldst << 1) & 0xff; 606 hdr->command = MCTP_I2C_COMMANDCODE; 607 hdr->byte_count = len + 1; 608 hdr->source_slave = ((llsrc << 1) & 0xff) | 0x01; 609 mhdr->ver = 0x01; 610 611 return sizeof(struct mctp_i2c_hdr); 612 } 613