Skip to contentSkip to conversation

net/can/raw.c:933: undefined reference to `safe_candev_priv'

PATCH kernel test robot 2 participants 2 messages Nov 28, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7d31f578f3230f3b7b33b0930b08f9afd8429817
commit: 1a620a723853a0f49703c317d52dc6b9602cbaa8 [11759/12740] can: raw: instantly reject unsupported CAN frames
config: nios2-randconfig-002-20251128 (https://download.01.org/0day-ci/archive/20251128/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251128/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

nios2-linux-ld: net/can/raw.o: in function `raw_check_txframe':

>> net/can/raw.c:933: undefined reference to `safe_candev_priv'
>> net/can/raw.c:933:(.text+0x284): relocation truncated to fit: R_NIOS2_CALL26 against `safe_candev_priv'

vim +933 net/can/raw.c

929
930 static unsigned int raw_check_txframe(struct raw_sock *ro, struct sk_buff *skb,
931 struct net_device *dev)
932 {

 > 933		struct can_priv *priv = safe_candev_priv(dev);

934
935 /* Classical CAN */
936 if (can_is_can_skb(skb) && raw_dev_cc_enabled(dev, priv))
937 return CAN_MTU;
938
939 /* CAN FD */
940 if (ro->fd_frames && can_is_canfd_skb(skb) &&
941 raw_dev_fd_enabled(dev, priv))
942 return CANFD_MTU;
943
944 /* CAN XL */
945 if (ro->xl_frames && can_is_canxl_skb(skb) &&
946 raw_dev_xl_enabled(dev, priv))
947 return CANXL_MTU;
948
949 return 0;
950 }
951

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw

Hi,

the issue already has been reported.

And this patch is on its way:

https://lore.kernel.org/linux-can/[email protected]/

Many thanks,
Oliver

Quoted 45 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7d31f578f3230f3b7b33b0930b08f9afd8429817
commit: 1a620a723853a0f49703c317d52dc6b9602cbaa8 [11759/12740] can: raw: instantly reject unsupported CAN frames
config: nios2-randconfig-002-20251128 (https://download.01.org/0day-ci/archive/20251128/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251128/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

nios2-linux-ld: net/can/raw.o: in function `raw_check_txframe':

Quoted 2 lines
Quoted 2 lines

net/can/raw.c:933: undefined reference to safe_candev_priv' net/can/raw.c:933:(.text+0x284): relocation truncated to fit: R_NIOS2_CALL26 against safe_candev_priv'

vim +933 net/can/raw.c

    929	
    930	static unsigned int raw_check_txframe(struct raw_sock *ro, struct sk_buff *skb,
    931					      struct net_device *dev)
    932	{
Quoted 1 line

933 struct can_priv *priv = safe_candev_priv(dev);

    934	
    935		/* Classical CAN */
    936		if (can_is_can_skb(skb) && raw_dev_cc_enabled(dev, priv))
    937			return CAN_MTU;
    938	
    939		/* CAN FD */
    940		if (ro->fd_frames && can_is_canfd_skb(skb) &&
    941		    raw_dev_fd_enabled(dev, priv))
    942			return CANFD_MTU;
    943	
    944		/* CAN XL */
    945		if (ro->xl_frames && can_is_canxl_skb(skb) &&
    946		    raw_dev_xl_enabled(dev, priv))
    947			return CANXL_MTU;
    948	
    949		return 0;
    950	}
    951