diff mbox series

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

Message ID 20200911060720.81033-1-xie.he.0141@gmail.com
State New
Headers show
Series [net-next] net/socket.c: Remove an unused header file <linux/if_frad.h> | expand

Commit Message

Xie He Sept. 11, 2020, 6:07 a.m. UTC
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.

Signed-off-by: Xie He <xie.he.0141@gmail.com>
---
 net/socket.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jakub Kicinski Sept. 11, 2020, 2:57 p.m. UTC | #1
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
> 
> 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.
> 
> Signed-off-by: Xie He <xie.he.0141@gmail.com>

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?
David Miller Sept. 11, 2020, 9:41 p.m. UTC | #2
From: Xie He <xie.he.0141@gmail.com>
Date: Thu, 10 Sep 2020 23:07:20 -0700

> 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.
Xie He Sept. 11, 2020, 11:30 p.m. UTC | #3
On Fri, Sep 11, 2020 at 2:41 PM David Miller <davem@davemloft.net> wrote:
>
> From: Xie He <xie.he.0141@gmail.com>
> Date: Thu, 10 Sep 2020 23:07:20 -0700
>
> > 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.
>

OK. I'm sorry for this.
diff mbox series

Patch

diff --git a/net/socket.c b/net/socket.c
index 82262e1922f9..161dd2775e13 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -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>