Skip to content

Commit f726f3d

Browse files
hartkoppmarckleinebudde
authored andcommitted
can: remove obsolete version strings
As pointed out by Jakub Kicinski here: http://lore.kernel.org/r/20201009175751.5c54097f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com this patch removes the obsolete version information of the different CAN protocols and the AF_CAN core module. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201012074354.25839-2-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent ac911bf commit f726f3d

8 files changed

Lines changed: 5 additions & 33 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;

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: 1 addition & 3 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>");
@@ -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)