From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, linux-can@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net,
eugen.hristev@microchip.com, ludovic.desroches@microchip.com,
pankaj.dubey@samsung.com, rcsekar@samsung.com,
Pankaj Sharma <pankj.sharma@samsung.com>,
Sriram Dash <sriram.dash@samsung.com>
Subject: Re: [PATCH] can: m_can: add support for handling arbitration error
Date: Tue, 15 Oct 2019 00:20:21 +0800 [thread overview]
Message-ID: <201910142341.47sbfMiD%lkp@intel.com> (raw)
In-Reply-To: <1571052844-22633-1-git-send-email-pankj.sharma@samsung.com>
[-- Attachment #1: Type: text/plain, Size: 3410 bytes --]
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-20191014]
[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: x86_64-fedora-25 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
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
813 static int m_can_handle_bus_errors(struct net_device *dev, u32 irqstatus,
814 u32 psr)
815 {
816 struct m_can_classdev *cdev = netdev_priv(dev);
817 int work_done = 0;
818
819 if (irqstatus & IR_RF0L)
820 work_done += m_can_handle_lost_msg(dev);
821
822 /* handle lec errors on the bus */
823 if ((cdev->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) &&
824 is_lec_err(psr))
825 work_done += m_can_handle_lec_err(dev, psr & LEC_UNUSED);
826
827 /* handle protocol errors in arbitration phase */
> 828 if ((priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) &&
829 is_protocol_err(irqstatus))
830 work_done += m_can_handle_protocol_error(dev, irqstatus);
831
832 /* other unproccessed error interrupts */
833 m_can_handle_other_err(dev, irqstatus);
834
835 return work_done;
836 }
837
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51182 bytes --]
prev parent reply other threads:[~2019-10-14 16:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20191014113437epcas5p2143d7e85d5a50dad79a4a60a9d666fe4@epcas5p2.samsung.com>
2019-10-14 11:34 ` [PATCH] can: m_can: add support for handling arbitration error Pankaj Sharma
2019-10-14 12:31 ` Marc Kleine-Budde
2019-10-17 11:51 ` pankj.sharma
2019-10-14 13:04 ` kbuild test robot
2019-10-14 15:04 ` kbuild test robot
2019-10-14 15:04 ` [PATCH] can: m_can: fix boolreturn.cocci warnings kbuild test robot
2019-10-15 5:57 ` Simon Horman
2019-10-15 6:37 ` Jeroen Hofstee
2019-10-15 7:13 ` Simon Horman
2019-10-15 8:32 ` Jeroen Hofstee
2019-10-17 11:54 ` pankj.sharma
2019-10-14 16:20 ` kbuild test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201910142341.47sbfMiD%lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=eugen.hristev@microchip.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pankaj.dubey@samsung.com \
--cc=pankj.sharma@samsung.com \
--cc=rcsekar@samsung.com \
--cc=sriram.dash@samsung.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).