Skip to contentSkip to conversation

net/socket.c: Remove an unused header file <linux/if_frad.h>

PATCH In review Xie He 3 participants 4 messages Sep 11, 2020

Subsystems (3)
lore
Share & tools
lore

Xie He

author
#0 lore raw

PATCH 1/1 net/socket.c: Remove an unused header file <linux/if_frad.h>

This header file is not actually used in this file. Let's remove it.

Information about this header file:

This header file comes from the "Frame Relay" module at
drivers/net/wan/dlci.c

The "Frame Relay" module is used by only one hardware driver, at:
drivers/net/wan/sdla.c

Note that the "Frame Relay" module is different from and unrelated to the "HDLC Frame Relay" module at:
drivers/net/wan/hdlc_fr.c

I think maybe we can deprecate the "Frame Relay" module because we already have the (newer) "HDLC Frame Relay" module.

---
 net/socket.c | 1 -
 1 file changed, 1 deletion(-)
net/socket.c +0 -1
index 82262e1922f9..161dd2775e13 100644
@@ -64,7 +64,6 @@
 #include <linux/seq_file.h>
 #include <linux/mutex.h>
 #include <linux/if_bridge.h>
-#include <linux/if_frad.h>
 #include <linux/if_vlan.h>
 #include <linux/ptp_classify.h>
 #include <linux/init.h>
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 10 lines · On Thu, 10 Sep 2020 23:07:20 -0700 Xie He wrote:

This header file is not actually used in this file. Let's remove it.

Information about this header file:

This header file comes from the "Frame Relay" module at
drivers/net/wan/dlci.c

The "Frame Relay" module is used by only one hardware driver, at:
drivers/net/wan/sdla.c

Quoted 8 lines

Note that the "Frame Relay" module is different from and unrelated to the "HDLC Frame Relay" module at:
drivers/net/wan/hdlc_fr.c

I think maybe we can deprecate the "Frame Relay" module because we already have the (newer) "HDLC Frame Relay" module.

net/socket.c:1032:6: warning: no previous prototype for ‘dlci_ioctl_set’ [-Wmissing-prototypes]
1032 | void dlci_ioctl_set(int (*hook) (unsigned int, void __user *))

      |      ^~~~~~~~~~~~~~

net/socket.c:1032:6: warning: symbol 'dlci_ioctl_set' was not declared. Should it be static?

maintainer
#2 lore raw
In reply to Xie He

From: Xie He <[email protected]>
Date: Thu, 10 Sep 2020 23:07:20 -0700

Quoted 1 line

This header file is not actually used in this file. Let's remove it.

How did you test this assertion? As Jakub showed, the dlci_ioctl_set() function needs to be declared because socket.c references it.

All of your visual scanning of the code is wasted if you don't do something simple like an "allmodconfig" or "allyesconfig" build to test whether your change is correct or not.

Don't leave that step for us, that's your responsibility.

author
#3 lore raw
Quoted 10 lines · David Miller

From: Xie He <[email protected]>
Date: Thu, 10 Sep 2020 23:07:20 -0700

Quoted 1 line

This header file is not actually used in this file. Let's remove it.

How did you test this assertion? As Jakub showed, the dlci_ioctl_set() function needs to be declared because socket.c references it.

Quoted 6 lines

All of your visual scanning of the code is wasted if you don't do something simple like an "allmodconfig" or "allyesconfig" build to test whether your change is correct or not.

Don't leave that step for us, that's your responsibility.

OK. I'm sorry for this.