Re: [PATCH net-next v3 3/3] mctp i3c: MCTP I3C driver

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

 



Hi Matt,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Matt-Johnston/dt-bindings-i3c-Add-mctp-controller-property/20231003-144037
base:   net-next/main
patch link:    https://lore.kernel.org/r/20231003063624.126723-4-matt%40codeconstruct.com.au
patch subject: [PATCH net-next v3 3/3] mctp i3c: MCTP I3C driver
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20231003/202310032142.NaWYwlZc-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/20231003/202310032142.NaWYwlZc-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/202310032142.NaWYwlZc-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/net/mctp/mctp-i3c.c: In function 'mctp_i3c_read':
>> drivers/net/mctp/mctp-i3c.c:121:9: error: implicit declaration of function 'put_unaligned_be48' [-Werror=implicit-function-declaration]
     121 |         put_unaligned_be48(mi->pid, ihdr->source);
         |         ^~~~~~~~~~~~~~~~~~
   drivers/net/mctp/mctp-i3c.c: In function 'mctp_i3c_xmit':
>> drivers/net/mctp/mctp-i3c.c:380:15: error: implicit declaration of function 'get_unaligned_be48'; did you mean 'get_unalign_ctl'? [-Werror=implicit-function-declaration]
     380 |         pid = get_unaligned_be48(ihdr->dest);
         |               ^~~~~~~~~~~~~~~~~~
         |               get_unalign_ctl
   cc1: some warnings being treated as errors


vim +/put_unaligned_be48 +121 drivers/net/mctp/mctp-i3c.c

    98	
    99	static int mctp_i3c_read(struct mctp_i3c_device *mi)
   100	{
   101		struct i3c_priv_xfer xfer = { .rnw = 1, .len = mi->mrl };
   102		struct net_device_stats *stats = &mi->mbus->ndev->stats;
   103		struct mctp_i3c_internal_hdr *ihdr = NULL;
   104		struct sk_buff *skb = NULL;
   105		struct mctp_skb_cb *cb;
   106		int net_status, rc;
   107		u8 pec, addr;
   108	
   109		skb = netdev_alloc_skb(mi->mbus->ndev,
   110				       mi->mrl + sizeof(struct mctp_i3c_internal_hdr));
   111		if (!skb) {
   112			stats->rx_dropped++;
   113			rc = -ENOMEM;
   114			goto err;
   115		}
   116	
   117		skb->protocol = htons(ETH_P_MCTP);
   118		/* Create a header for internal use */
   119		skb_reset_mac_header(skb);
   120		ihdr = skb_put(skb, sizeof(struct mctp_i3c_internal_hdr));
 > 121		put_unaligned_be48(mi->pid, ihdr->source);
   122		put_unaligned_be48(mi->mbus->pid, ihdr->dest);
   123		skb_pull(skb, sizeof(struct mctp_i3c_internal_hdr));
   124	
   125		xfer.data.in = skb_put(skb, mi->mrl);
   126	
   127		rc = i3c_device_do_priv_xfers(mi->i3c, &xfer, 1);
   128		if (rc < 0)
   129			goto err;
   130	
   131		if (WARN_ON_ONCE(xfer.len > mi->mrl)) {
   132			/* Bad i3c bus driver */
   133			rc = -EIO;
   134			goto err;
   135		}
   136		if (xfer.len < MCTP_I3C_MINLEN) {
   137			stats->rx_length_errors++;
   138			rc = -EIO;
   139			goto err;
   140		}
   141	
   142		/* check PEC, including address byte */
   143		addr = mi->addr << 1 | 1;
   144		pec = i2c_smbus_pec(0, &addr, 1);
   145		pec = i2c_smbus_pec(pec, xfer.data.in, xfer.len - 1);
   146		if (pec != ((u8 *)xfer.data.in)[xfer.len - 1]) {
   147			stats->rx_crc_errors++;
   148			rc = -EINVAL;
   149			goto err;
   150		}
   151	
   152		/* Remove PEC */
   153		skb_trim(skb, xfer.len - 1);
   154	
   155		cb = __mctp_cb(skb);
   156		cb->halen = PID_SIZE;
   157		put_unaligned_be48(mi->pid, cb->haddr);
   158	
   159		net_status = netif_rx(skb);
   160	
   161		if (net_status == NET_RX_SUCCESS) {
   162			stats->rx_packets++;
   163			stats->rx_bytes += xfer.len - 1;
   164		} else {
   165			stats->rx_dropped++;
   166		}
   167	
   168		return 0;
   169	err:
   170		kfree_skb(skb);
   171		return rc;
   172	}
   173	

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