Skip to content

Commit 2ad119d

Browse files
committed
Merge tag 'linux-can-next-for-5.10-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
Marc Kleine-Budde says: ==================== linux-can-next-for-5.10-20201012 Both patches are by Oliver Hartkopp, the first one addresses Jakub's review comments of the ISOTP protocol, the other one removes version strings from various CAN protocols. ==================== Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 15f5e48 + f726f3d commit 2ad119d

10 files changed

Lines changed: 14 additions & 42 deletions

File tree

include/linux/can/core.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
#include <linux/skbuff.h>
1919
#include <linux/netdevice.h>
2020

21-
#define CAN_VERSION "20170425"
22-
23-
/* increment this number each time you change some user-space interface */
24-
#define CAN_ABI_VERSION "9"
25-
26-
#define CAN_VERSION_STRING "rev " CAN_VERSION " abi " CAN_ABI_VERSION
27-
2821
#define DNAME(dev) ((dev) ? (dev)->name : "any")
2922

3023
/**

include/net/netns/can.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ struct can_rcv_lists_stats;
1515
struct netns_can {
1616
#if IS_ENABLED(CONFIG_PROC_FS)
1717
struct proc_dir_entry *proc_dir;
18-
struct proc_dir_entry *pde_version;
1918
struct proc_dir_entry *pde_stats;
2019
struct proc_dir_entry *pde_reset_stats;
2120
struct proc_dir_entry *pde_rcvlist_all;

include/uapi/linux/can/isotp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ struct can_isotp_ll_options {
160160
* these default settings can be changed via sockopts.
161161
* For that reason the STmin value is intentionally _not_ checked for
162162
* consistency and copied directly into the flow control (FC) frame.
163-
*
164163
*/
165164

166165
#endif /* !_UAPI_CAN_ISOTP_H */

net/can/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ source "net/can/j1939/Kconfig"
5757

5858
config CAN_ISOTP
5959
tristate "ISO 15765-2:2016 CAN transport protocol"
60-
default y
6160
help
6261
CAN Transport Protocols offer support for segmented Point-to-Point
6362
communication between CAN nodes via two defined CAN Identifiers.
@@ -67,6 +66,8 @@ config CAN_ISOTP
6766
vehicle diagnosis (UDS, ISO 14229) or IP-over-CAN traffic.
6867
This protocol driver implements data transfers according to
6968
ISO 15765-2:2016 for 'classic' CAN and CAN FD frame types.
69+
If you want to perform automotive vehicle diagnostic services (UDS),
70+
say 'y'.
7071

7172
source "drivers/net/can/Kconfig"
7273

net/can/af_can.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ static __init int can_init(void)
875875
offsetof(struct can_frame, data) !=
876876
offsetof(struct canfd_frame, data));
877877

878-
pr_info("can: controller area network core (" CAN_VERSION_STRING ")\n");
878+
pr_info("can: controller area network core\n");
879879

880880
rcv_cache = kmem_cache_create("can_receiver", sizeof(struct receiver),
881881
0, 0, NULL);

net/can/bcm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@
8181
(CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG) : \
8282
(CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG))
8383

84-
#define CAN_BCM_VERSION "20170425"
85-
8684
MODULE_DESCRIPTION("PF_CAN broadcast manager protocol");
8785
MODULE_LICENSE("Dual BSD/GPL");
8886
MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
@@ -1696,7 +1694,7 @@ static int __init bcm_module_init(void)
16961694
{
16971695
int err;
16981696

1699-
pr_info("can: broadcast manager protocol (rev " CAN_BCM_VERSION " t)\n");
1697+
pr_info("can: broadcast manager protocol\n");
17001698

17011699
err = can_proto_register(&bcm_can_proto);
17021700
if (err < 0) {

net/can/gw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
#include <net/net_namespace.h>
6060
#include <net/sock.h>
6161

62-
#define CAN_GW_VERSION "20190810"
6362
#define CAN_GW_NAME "can-gw"
6463

6564
MODULE_DESCRIPTION("PF_CAN netlink gateway");
@@ -1194,8 +1193,7 @@ static __init int cgw_module_init(void)
11941193
/* sanitize given module parameter */
11951194
max_hops = clamp_t(unsigned int, max_hops, CGW_MIN_HOPS, CGW_MAX_HOPS);
11961195

1197-
pr_info("can: netlink gateway (rev " CAN_GW_VERSION ") max_hops=%d\n",
1198-
max_hops);
1196+
pr_info("can: netlink gateway - max_hops=%d\n", max_hops);
11991197

12001198
ret = register_pernet_subsys(&cangw_pernet_ops);
12011199
if (ret)

net/can/isotp.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@
7272
#include <net/sock.h>
7373
#include <net/net_namespace.h>
7474

75-
#define CAN_ISOTP_VERSION "20200928"
76-
7775
MODULE_DESCRIPTION("PF_CAN isotp 15765-2:2016 protocol");
7876
MODULE_LICENSE("Dual BSD/GPL");
7977
MODULE_AUTHOR("Oliver Hartkopp <socketcan@hartkopp.net>");
@@ -222,8 +220,8 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus)
222220

223221
can_send_ret = can_send(nskb, 1);
224222
if (can_send_ret)
225-
printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n",
226-
__func__, can_send_ret);
223+
pr_notice_once("can-isotp: %s: can_send_ret %d\n",
224+
__func__, can_send_ret);
227225

228226
dev_put(dev);
229227

@@ -769,7 +767,7 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer)
769767

770768
isotp_tx_burst:
771769
skb = alloc_skb(so->ll.mtu + sizeof(struct can_skb_priv),
772-
gfp_any());
770+
GFP_ATOMIC);
773771
if (!skb) {
774772
dev_put(dev);
775773
break;
@@ -798,8 +796,8 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer)
798796

799797
can_send_ret = can_send(skb, 1);
800798
if (can_send_ret)
801-
printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n",
802-
__func__, can_send_ret);
799+
pr_notice_once("can-isotp: %s: can_send_ret %d\n",
800+
__func__, can_send_ret);
803801

804802
if (so->tx.idx >= so->tx.len) {
805803
/* we are done */
@@ -942,8 +940,8 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
942940
err = can_send(skb, 1);
943941
dev_put(dev);
944942
if (err) {
945-
printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n",
946-
__func__, err);
943+
pr_notice_once("can-isotp: %s: can_send_ret %d\n",
944+
__func__, err);
947945
return err;
948946
}
949947

@@ -1408,7 +1406,7 @@ static __init int isotp_module_init(void)
14081406
{
14091407
int err;
14101408

1411-
pr_info("can: isotp protocol (rev " CAN_ISOTP_VERSION ")\n");
1409+
pr_info("can: isotp protocol\n");
14121410

14131411
err = can_proto_register(&isotp_can_proto);
14141412
if (err < 0)

net/can/proc.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
* proc filenames for the PF_CAN core
5555
*/
5656

57-
#define CAN_PROC_VERSION "version"
5857
#define CAN_PROC_STATS "stats"
5958
#define CAN_PROC_RESET_STATS "reset_stats"
6059
#define CAN_PROC_RCVLIST_ALL "rcvlist_all"
@@ -293,12 +292,6 @@ static int can_reset_stats_proc_show(struct seq_file *m, void *v)
293292
return 0;
294293
}
295294

296-
static int can_version_proc_show(struct seq_file *m, void *v)
297-
{
298-
seq_printf(m, "%s\n", CAN_VERSION_STRING);
299-
return 0;
300-
}
301-
302295
static inline void can_rcvlist_proc_show_one(struct seq_file *m, int idx,
303296
struct net_device *dev,
304297
struct can_dev_rcv_lists *dev_rcv_lists)
@@ -441,8 +434,6 @@ void can_init_proc(struct net *net)
441434
}
442435

443436
/* own procfs entries from the AF_CAN core */
444-
net->can.pde_version = proc_create_net_single(CAN_PROC_VERSION, 0644,
445-
net->can.proc_dir, can_version_proc_show, NULL);
446437
net->can.pde_stats = proc_create_net_single(CAN_PROC_STATS, 0644,
447438
net->can.proc_dir, can_stats_proc_show, NULL);
448439
net->can.pde_reset_stats = proc_create_net_single(CAN_PROC_RESET_STATS,
@@ -471,9 +462,6 @@ void can_init_proc(struct net *net)
471462
*/
472463
void can_remove_proc(struct net *net)
473464
{
474-
if (net->can.pde_version)
475-
remove_proc_entry(CAN_PROC_VERSION, net->can.proc_dir);
476-
477465
if (net->can.pde_stats)
478466
remove_proc_entry(CAN_PROC_STATS, net->can.proc_dir);
479467

net/can/raw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@
5555
#include <net/sock.h>
5656
#include <net/net_namespace.h>
5757

58-
#define CAN_RAW_VERSION CAN_VERSION
59-
6058
MODULE_DESCRIPTION("PF_CAN raw protocol");
6159
MODULE_LICENSE("Dual BSD/GPL");
6260
MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>");
@@ -885,7 +883,7 @@ static __init int raw_module_init(void)
885883
{
886884
int err;
887885

888-
pr_info("can: raw protocol (rev " CAN_RAW_VERSION ")\n");
886+
pr_info("can: raw protocol\n");
889887

890888
err = can_proto_register(&raw_can_proto);
891889
if (err < 0)

0 commit comments

Comments
 (0)