Re: [PATCH] can: m_can: add support for handling arbitration error

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

 



Hi Pankaj,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net/master]
[cannot apply to v5.4-rc3 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Pankaj-Sharma/can-m_can-add-support-for-handling-arbitration-error/20191014-193532
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/net/can/m_can/m_can.c: In function 'm_can_handle_protocol_error':
>> drivers/net/can/m_can/m_can.c:800:10: error: dereferencing pointer to incomplete type 'struct m_can_priv'
     if (priv->version >= 31 && (irqstatus & IR_PEA)) {
             ^~
   drivers/net/can/m_can/m_can.c: In function 'm_can_handle_bus_errors':
   drivers/net/can/m_can/m_can.c:828:7: error: 'priv' undeclared (first use in this function); did you mean 'pid'?
     if ((priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) &&
          ^~~~
          pid
   drivers/net/can/m_can/m_can.c:828:7: note: each undeclared identifier is reported only once for each function it appears in

vim +800 drivers/net/can/m_can/m_can.c

   787	
   788	static int m_can_handle_protocol_error(struct net_device *dev, u32 irqstatus)
   789	{
   790		struct net_device_stats *stats = &dev->stats;
   791		struct m_can_priv *priv = netdev_priv(dev);
   792		struct can_frame *cf;
   793		struct sk_buff *skb;
   794	
   795		/* propagate the error condition to the CAN stack */
   796		skb = alloc_can_err_skb(dev, &cf);
   797		if (unlikely(!skb))
   798			return 0;
   799	
 > 800		if (priv->version >= 31 && (irqstatus & IR_PEA)) {
   801			netdev_dbg(dev, "Protocol error in Arbitration fail\n");
   802			stats->tx_errors++;
   803			priv->can.can_stats.arbitration_lost++;
   804			cf->can_id |= CAN_ERR_LOSTARB;
   805			cf->data[0] |= CAN_ERR_LOSTARB_UNSPEC;
   806		}
   807	
   808		netif_receive_skb(skb);
   809	
   810		return 1;
   811	}
   812	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux