can: skb: move can_dropped_invalid_skb() and can_skb_headroom_valid() to skb.c
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Fri, 10 Jun 2022 14:30:08 +0000 (23:30 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 11 Jun 2022 15:11:02 +0000 (17:11 +0200)
commitccd8a9351f7b44bc1c0c8e4d39c0d6593b106fc4
tree75cb7dde258a17f6a314ef4c3f24fb6ef3da3f52
parentd7786af59860a113d62150c4328674e896da7810
can: skb: move can_dropped_invalid_skb() and can_skb_headroom_valid() to skb.c

The functions can_dropped_invalid_skb() and can_skb_headroom_valid()
grew a lot over the years to a point which it does not make much sense
to have them defined as static inline in header files. Move those two
functions to the .c counterpart of skb.h.

can_skb_headroom_valid()'s only caller being
can_dropped_invalid_skb(), the declaration is removed from the
header. Only can_dropped_invalid_skb() gets its symbol exported.

While doing so, do a small cleanup: add brackets around the else block
in can_dropped_invalid_skb().

Link: https://lore.kernel.org/all/20220610143009.323579-7-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Max Staudt <max@enpas.org>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/skb.c
include/linux/can/skb.h