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: 'skcb' undeclared
@ 2021-06-28 14:34 kernel test robot
  2021-07-14 19:56 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-06-28 14:34 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: kbuild-all, linux-can

[-- Attachment #1: Type: text/plain, Size: 8760 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: i386-randconfig-a011-20210628 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # 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
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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

   In file included from include/net/sock.h:46,
                    from include/linux/can/skb.h:17,
                    from net/can/j1939/transport.c:11:
   net/can/j1939/transport.c: In function 'j1939_session_tx_dat':
>> net/can/j1939/transport.c:811:25: error: 'skcb' undeclared (first use in this function)
     811 |      __func__, session, skcb->offset,
         |                         ^~~~
   include/linux/netdevice.h:5255:36: note: in definition of macro 'netdev_level_once'
    5255 |   netdev_printk(level, dev, fmt, ##__VA_ARGS__); \
         |                                    ^~~~~~~~~~~
   net/can/j1939/transport.c:809:4: note: in expansion of macro 'netdev_err_once'
     809 |    netdev_err_once(priv->ndev,
         |    ^~~~~~~~~~~~~~~
   net/can/j1939/transport.c:811:25: note: each undeclared identifier is reported only once for each function it appears in
     811 |      __func__, session, skcb->offset,
         |                         ^~~~
   include/linux/netdevice.h:5255:36: note: in definition of macro 'netdev_level_once'
    5255 |   netdev_printk(level, dev, fmt, ##__VA_ARGS__); \
         |                                    ^~~~~~~~~~~
   net/can/j1939/transport.c:809:4: note: in expansion of macro 'netdev_err_once'
     809 |    netdev_err_once(priv->ndev,
         |    ^~~~~~~~~~~~~~~


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: 47112 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-14 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 14:34 [mkl-can-next:testing 5/28] net/can/j1939/transport.c:811:25: error: 'skcb' undeclared kernel test robot
2021-07-14 19:56 ` Marc Kleine-Budde

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