linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mkl-can-next:testing 5/28] net/can/j1939/transport.c:811:25: error: use of undeclared identifier 'skcb'
@ 2021-06-28 15:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-28 15:34 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: clang-built-linux, kbuild-all, linux-can

[-- Attachment #1: Type: text/plain, Size: 14228 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
head:   ca9280f6324bf09ec5d3667579f7dd3f7567e809
commit: a2ea50608a02ac48371a9fab0167c1b44457913e [5/28] can: j1939: j1939_session_tx_dat(): use consistent name se_skcb for session skb control buffer
config: powerpc64-buildonly-randconfig-r004-20210628 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4c92e31dd0f1bd152eda883af20ff7fbcaa14945)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/commit/?id=a2ea50608a02ac48371a9fab0167c1b44457913e
        git remote add mkl-can-next https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
        git fetch --no-tags mkl-can-next testing
        git checkout a2ea50608a02ac48371a9fab0167c1b44457913e
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash net/can/j1939/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:103:1: note: expanded from here
   __do_insb
   ^
   arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
   #define __do_insb(p, b, n)      readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/can/j1939/transport.c:11:
   In file included from include/linux/can/skb.h:15:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:105:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/can/j1939/transport.c:11:
   In file included from include/linux/can/skb.h:15:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:107:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/can/j1939/transport.c:11:
   In file included from include/linux/can/skb.h:15:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:109:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/can/j1939/transport.c:11:
   In file included from include/linux/can/skb.h:15:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:111:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/can/j1939/transport.c:11:
   In file included from include/linux/can/skb.h:15:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:113:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
>> net/can/j1939/transport.c:811:25: error: use of undeclared identifier 'skcb'
                                           __func__, session, skcb->offset,
                                                              ^
   7 warnings and 1 error generated.


vim +/skcb +811 net/can/j1939/transport.c

9d71dd0c700999 The j1939 authors 2018-10-08  775  
9d71dd0c700999 The j1939 authors 2018-10-08  776  static int j1939_session_tx_dat(struct j1939_session *session)
9d71dd0c700999 The j1939 authors 2018-10-08  777  {
9d71dd0c700999 The j1939 authors 2018-10-08  778  	struct j1939_priv *priv = session->priv;
a2ea50608a02ac Marc Kleine-Budde 2021-05-21  779  	struct j1939_sk_buff_cb *se_skcb;
9d71dd0c700999 The j1939 authors 2018-10-08  780  	int offset, pkt_done, pkt_end;
9d71dd0c700999 The j1939 authors 2018-10-08  781  	unsigned int len, pdelay;
9d71dd0c700999 The j1939 authors 2018-10-08  782  	struct sk_buff *se_skb;
9d71dd0c700999 The j1939 authors 2018-10-08  783  	const u8 *tpdat;
9d71dd0c700999 The j1939 authors 2018-10-08  784  	int ret = 0;
9d71dd0c700999 The j1939 authors 2018-10-08  785  	u8 dat[8];
9d71dd0c700999 The j1939 authors 2018-10-08  786  
2030043e616cab Oleksij Rempel    2021-05-21  787  	se_skb = j1939_session_skb_get_by_offset(session, session->pkt.tx * 7);
9d71dd0c700999 The j1939 authors 2018-10-08  788  	if (!se_skb)
9d71dd0c700999 The j1939 authors 2018-10-08  789  		return -ENOBUFS;
9d71dd0c700999 The j1939 authors 2018-10-08  790  
a2ea50608a02ac Marc Kleine-Budde 2021-05-21  791  	se_skcb = j1939_skb_to_cb(se_skb);
9d71dd0c700999 The j1939 authors 2018-10-08  792  	tpdat = se_skb->data;
9d71dd0c700999 The j1939 authors 2018-10-08  793  	ret = 0;
9d71dd0c700999 The j1939 authors 2018-10-08  794  	pkt_done = 0;
9d71dd0c700999 The j1939 authors 2018-10-08  795  	if (session->skcb.addr.type != J1939_ETP &&
9d71dd0c700999 The j1939 authors 2018-10-08  796  	    j1939_cb_is_broadcast(&session->skcb))
9d71dd0c700999 The j1939 authors 2018-10-08  797  		pkt_end = session->pkt.total;
9d71dd0c700999 The j1939 authors 2018-10-08  798  	else
9d71dd0c700999 The j1939 authors 2018-10-08  799  		pkt_end = session->pkt.last;
9d71dd0c700999 The j1939 authors 2018-10-08  800  
9d71dd0c700999 The j1939 authors 2018-10-08  801  	while (session->pkt.tx < pkt_end) {
9d71dd0c700999 The j1939 authors 2018-10-08  802  		dat[0] = session->pkt.tx - session->pkt.dpo + 1;
a2ea50608a02ac Marc Kleine-Budde 2021-05-21  803  		offset = (session->pkt.tx * 7) - se_skcb->offset;
9d71dd0c700999 The j1939 authors 2018-10-08  804  		len =  se_skb->len - offset;
9d71dd0c700999 The j1939 authors 2018-10-08  805  		if (len > 7)
9d71dd0c700999 The j1939 authors 2018-10-08  806  			len = 7;
9d71dd0c700999 The j1939 authors 2018-10-08  807  
cd3b3636c99fca Oleksij Rempel    2020-08-07  808  		if (offset + len > se_skb->len) {
cd3b3636c99fca Oleksij Rempel    2020-08-07  809  			netdev_err_once(priv->ndev,
cd3b3636c99fca Oleksij Rempel    2020-08-07  810  					"%s: 0x%p: requested data outside of queued buffer: offset %i, len %i, pkt.tx: %i\n",
563289f4161c81 Marc Kleine-Budde 2021-06-16 @811  					__func__, session, skcb->offset,
563289f4161c81 Marc Kleine-Budde 2021-06-16  812  					se_skb->len , session->pkt.tx);
2030043e616cab Oleksij Rempel    2021-05-21  813  			ret = -EOVERFLOW;
2030043e616cab Oleksij Rempel    2021-05-21  814  			goto out_free;
cd3b3636c99fca Oleksij Rempel    2020-08-07  815  		}
cd3b3636c99fca Oleksij Rempel    2020-08-07  816  
cd3b3636c99fca Oleksij Rempel    2020-08-07  817  		if (!len) {
cd3b3636c99fca Oleksij Rempel    2020-08-07  818  			ret = -ENOBUFS;
cd3b3636c99fca Oleksij Rempel    2020-08-07  819  			break;
cd3b3636c99fca Oleksij Rempel    2020-08-07  820  		}
cd3b3636c99fca Oleksij Rempel    2020-08-07  821  
9d71dd0c700999 The j1939 authors 2018-10-08  822  		memcpy(&dat[1], &tpdat[offset], len);
9d71dd0c700999 The j1939 authors 2018-10-08  823  		ret = j1939_tp_tx_dat(session, dat, len + 1);
9d71dd0c700999 The j1939 authors 2018-10-08  824  		if (ret < 0) {
9d71dd0c700999 The j1939 authors 2018-10-08  825  			/* ENOBUS == CAN interface TX queue is full */
9d71dd0c700999 The j1939 authors 2018-10-08  826  			if (ret != -ENOBUFS)
9d71dd0c700999 The j1939 authors 2018-10-08  827  				netdev_alert(priv->ndev,
9d71dd0c700999 The j1939 authors 2018-10-08  828  					     "%s: 0x%p: queue data error: %i\n",
9d71dd0c700999 The j1939 authors 2018-10-08  829  					     __func__, session, ret);
9d71dd0c700999 The j1939 authors 2018-10-08  830  			break;
9d71dd0c700999 The j1939 authors 2018-10-08  831  		}
9d71dd0c700999 The j1939 authors 2018-10-08  832  
9d71dd0c700999 The j1939 authors 2018-10-08  833  		session->last_txcmd = 0xff;
9d71dd0c700999 The j1939 authors 2018-10-08  834  		pkt_done++;
9d71dd0c700999 The j1939 authors 2018-10-08  835  		session->pkt.tx++;
9d71dd0c700999 The j1939 authors 2018-10-08  836  		pdelay = j1939_cb_is_broadcast(&session->skcb) ? 50 :
9d71dd0c700999 The j1939 authors 2018-10-08  837  			j1939_tp_packet_delay;
9d71dd0c700999 The j1939 authors 2018-10-08  838  
9d71dd0c700999 The j1939 authors 2018-10-08  839  		if (session->pkt.tx < session->pkt.total && pdelay) {
9d71dd0c700999 The j1939 authors 2018-10-08  840  			j1939_tp_schedule_txtimer(session, pdelay);
9d71dd0c700999 The j1939 authors 2018-10-08  841  			break;
9d71dd0c700999 The j1939 authors 2018-10-08  842  		}
9d71dd0c700999 The j1939 authors 2018-10-08  843  	}
9d71dd0c700999 The j1939 authors 2018-10-08  844  
9d71dd0c700999 The j1939 authors 2018-10-08  845  	if (pkt_done)
9d71dd0c700999 The j1939 authors 2018-10-08  846  		j1939_tp_set_rxtimeout(session, 250);
9d71dd0c700999 The j1939 authors 2018-10-08  847  
2030043e616cab Oleksij Rempel    2021-05-21  848   out_free:
2030043e616cab Oleksij Rempel    2021-05-21  849  	if (ret)
2030043e616cab Oleksij Rempel    2021-05-21  850  		kfree_skb(se_skb);
2030043e616cab Oleksij Rempel    2021-05-21  851  	else
2030043e616cab Oleksij Rempel    2021-05-21  852  		consume_skb(se_skb);
2030043e616cab Oleksij Rempel    2021-05-21  853  
9d71dd0c700999 The j1939 authors 2018-10-08  854  	return ret;
9d71dd0c700999 The j1939 authors 2018-10-08  855  }
9d71dd0c700999 The j1939 authors 2018-10-08  856  

:::::: The code at line 811 was first introduced by commit
:::::: 563289f4161c81b55ce19c05cd8ba2737fb26240 can: j1939: fix checkpatch warnings

:::::: TO: Marc Kleine-Budde <mkl@pengutronix.de>
:::::: CC: Marc Kleine-Budde <mkl@pengutronix.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24166 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-28 15:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 15:34 [mkl-can-next:testing 5/28] net/can/j1939/transport.c:811:25: error: use of undeclared identifier 'skcb' kernel test robot

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