why usr/include/linux/if_frad.h is required
Subsystems (2)
For if_frad.h I am getting two warnings with 'make headers_check':
usr/include/linux/if_frad.h:29: leaks CONFIG_DLCI to userspace where it is not valid usr/include/linux/if_frad.h:129: leaks CONFIG_DLCI to userspace where it is not valid
Almost all if_frad.h is covered with #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
If I remove this portion so only this what we get in userspace:
#ifndef _FRAD_H_
#define _FRAD_H_
#include <linux/if.h>
#endif
So I am surprising what is the point of this ?
Can I change its name to is_fraud ;-)
--
JSR
Quoted 21 lines · Jaswinder Singh Rajput
For
if_frad.hI am getting two warnings with 'makeheaders_check':
usr/include/linux/if_frad.h:29: leaksCONFIG_DLCIto userspace where it is not validusr/include/linux/if_frad.h:129: leaksCONFIG_DLCIto userspace where it is not validAlmost all
if_frad.his covered with #ifdefined(CONFIG_DLCI)||defined(CONFIG_DLCI_MODULE)If I remove this portion so only this what we get in userspace:
#ifndef _FRAD_H_
#define _FRAD_H_#include <
linux/if.h>#endif
So I am surprising what is the point of this ?
Can I change its name to
is_fraud;-)--
JSR
Quoted 21 lines · Jaswinder Singh Rajput
CC LKMLQuoted 18 lines · Jaswinder Singh Rajput
For
if_frad.hI am getting two warnings with 'makeheaders_check':
usr/include/linux/if_frad.h:29: leaksCONFIG_DLCIto userspace where it is not validusr/include/linux/if_frad.h:129: leaksCONFIG_DLCIto userspace where it is not validAlmost all
if_frad.his covered with #ifdefined(CONFIG_DLCI)||defined(CONFIG_DLCI_MODULE)If I remove this portion so only this what we get in userspace:
#ifndef _FRAD_H_
#define _FRAD_H_#include <
linux/if.h>#endif
So I am surprising what is the point of this ?
Can I change its name to
is_fraud;-)
The CONFIG_DLCI check in there is clearly in error, the definition in there is a user interface. The obvious solution is to drop the #if / #endif pair without a replacement.
Arnd <><
Quoted 3 lines · Arnd Bergmann
The
CONFIG_DLCIcheck in there is clearly in error, the definition in there is a user interface. The obvious solution is to drop the #if / #endif pair without a replacement.
I think so.
OTOH I'd be really surprised if anyone on the planet still used this code/driver. IIRC and AFAICS it is (sdla.c coupled with dlci.c) the first driver for the old Sangoma ISA sync serial cards (S502 - S508, i.e. those based on Z80CPU doing HDLC and other things in firmware).
There was also a second(?) driver for those cards (official from Sangoma), but:
commit 8db60bcf3021921e2d10d158641792d640e52fe8
Author: Adrian Bunk <[email protected]> Date: Tue Apr 11 17:28:33 2006 -0700
[WAN]: Remove broken and unmaintained Sangoma drivers.
The in-kernel Sangoma drivers are both not compiling and marked as BROKEN since at least kernel 2.6.0.
Sangoma offers out-of-tree drivers, and David Mandelstam told me Sangoma does no longer maintain the in-kernel drivers and prefers to provide them as a separate installation package.
This patch therefore removes these drivers.
They claim support for "All S-Series Legacy Cards" with out-of-tree drivers available from www.sangoma.com.
Signature · 1 line
Krzysztof Halasa
Quoted 6 lines · Krzysztof Halasa
Quoted 3 lines · Arnd Bergmann
The
CONFIG_DLCIcheck in there is clearly in error, the definition in there is a user interface. The obvious solution is to drop the #if / #endif pair without a replacement.
Quoted 7 lines
I think so.
OTOH I'd be really surprised if anyone on the planet still used this code/driver. IIRC and AFAICS it is (sdla.ccoupled withdlci.c) the first driver for the old Sangoma ISA sync serial cards (S502 - S508, i.e. those based on Z80CPU doing HDLC and other things in firmware).
usr/include/linux/if_frad.h is covered with CONFIG_DLCI from many years and no body is complaining about it so it means no body is using it.
So should we need to drop #if / #endif pair or the whole file from userspace.
--
JSR
Quoted 5 lines · Jaswinder Singh Rajput
usr/include/linux/if_frad.his covered withCONFIG_DLCIfrom many years and no body is complaining about it so it means no body is using it.So should we need to drop #if / #endif pair or the whole file from userspace.
I think the file. "Empty file exported to userspace", long unused. We can also have it back there, and it being not exported is an indicator that it's not used. I guess the #ifdef __KERNEL__ can be removed, too.
Signature · 1 line
Krzysztof Halasa
Quoted 11 lines · Krzysztof Halasa
Quoted 5 lines · Jaswinder Singh Rajput
usr/include/linux/if_frad.his covered withCONFIG_DLCIfrom many years and no body is complaining about it so it means no body is using it.So should we need to drop #if / #endif pair or the whole file from userspace.
I think the file. "Empty file exported to userspace", long unused. We can also have it back there, and it being not exported is an indicator that it's not used. I guess the #ifdef
__KERNEL__can be removed, too.
I will definately define #ifdef __KERNEL__ but I am also curious after defining it there is no point of making empty usr/include/linux/if_frad.h
--
JSR
Quoted 9 lines · Jaswinder Singh Rajput
Quoted 8 lines · Krzysztof Halasa
Quoted 5 lines · Jaswinder Singh Rajput
usr/include/linux/if_frad.his covered withCONFIG_DLCIfrom many years and no body is complaining about it so it means no body is using it.So should we need to drop #if / #endif pair or the whole file from userspace.
Quoted 7 lines
Quoted 3 lines
I think the file. "Empty file exported to userspace", long unused. We can also have it back there, and it being not exported is an indicator that it's not used. I guess the #ifdef
__KERNEL__can be removed, too.I will definately define #ifdef
__KERNEL__but I am also curious after defining it there is no point of making emptyusr/include/linux/if_frad.h
Googling a bit did not turn up _any_ non-kernel hits that has relevance. So based on the information given in this thread I strongly suggest to drop the export of this header.
Sam
David Miller
maintainerFrom: Sam Ravnborg <[email protected]>
Date: Wed, 21 Jan 2009 06:33:10 +0100
Quoted 14 lines · Jaswinder Singh Rajput
Quoted 13 lines · Krzysztof Halasa
Quoted 11 lines
Quoted 5 lines · Jaswinder Singh Rajput
usr/include/linux/if_frad.his covered withCONFIG_DLCIfrom many years and no body is complaining about it so it means no body is using it.So should we need to drop #if / #endif pair or the whole file from userspace.
I think the file. "Empty file exported to userspace", long unused. We can also have it back there, and it being not exported is an indicator that it's not used. I guess the #ifdef
__KERNEL__can be removed, too.
Quoted 7 lines
Quoted 3 lines
I will definately define #ifdef
__KERNEL__but I am also curious after defining it there is no point of making emptyusr/include/linux/if_frad.hGoogling a bit did not turn up _any_ non-kernel hits that has relevance. So based on the information given in this thread I strongly suggest to drop the export of this header.
Sure, but on the other hand this makes all of the userland APIs essentially inaccessible and undefined.
I bet Sangoma's internal tools reference this stuff.
Quoted 25 lines · On Tue, 20 Jan 2009 22:15:04 -0800 (PST) David Miller <[email protected]>…
From: Sam Ravnborg <[email protected]>
Date: Wed, 21 Jan 2009 06:33:10 +0100Quoted 14 lines · Jaswinder Singh Rajput
Quoted 13 lines · Krzysztof Halasa
Quoted 11 lines
Quoted 5 lines · Jaswinder Singh Rajput
usr/include/linux/if_frad.his covered withCONFIG_DLCIfrom many years and no body is complaining about it so it means no body is using it.So should we need to drop #if / #endif pair or the whole file from userspace.
I think the file. "Empty file exported to userspace", long unused. We can also have it back there, and it being not exported is an indicator that it's not used. I guess the #ifdef
__KERNEL__can be removed, too.Quoted 7 lines
Quoted 3 lines
I will definately define #ifdef
__KERNEL__but I am also curious after defining it there is no point of making emptyusr/include/linux/if_frad.hGoogling a bit did not turn up _any_ non-kernel hits that has relevance. So based on the information given in this thread I strongly suggest to drop the export of this header.
Quoted 8 lines
Sure, but on the other hand this makes all of the userland APIs essentially inaccessible and undefined.
I bet Sangoma's internal tools reference this stuff.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
There are no references if_frad.h in the version of Sangoma (out of tree) code that we use in Vyatta.
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Wed, 21 Jan 2009 17:38:38 +1100
Quoted 2 lines
There are no references
if_frad.hin the version of Sangoma (out of tree) code that we use in Vyatta.
frad-0.20:src/dlcicfg.c
It includes linux/if_frad.h and also performs the DLCI_SET_CONF ioctl.
Enough evidence to show we need to keep this header in the export set. Let's just kill the bogus CONFIG_* ifdef tests in there.
Quoted 6 lines · David Miller
From: Stephen Hemminger <[email protected]>
Date: Wed, 21 Jan 2009 17:38:38 +1100Quoted 2 lines
There are no references
if_frad.hin the version of Sangoma (out of tree) code that we use in Vyatta.
Quoted 8 lines
frad-0.20:src/dlcicfg.c
It includes
linux/if_frad.hand also performs theDLCI_SET_CONFioctl.Enough evidence to show we need to keep this header in the export set. Let's just kill the bogus CONFIG_* ifdef tests in there.
Thanks for investigating David.
Sam
Quoted 6 lines · David Miller
From: Stephen Hemminger <[email protected]>
Date: Wed, 21 Jan 2009 17:38:38 +1100Quoted 2 lines
There are no references
if_frad.hin the version of Sangoma (out of tree) code that we use in Vyatta.
Quoted 8 lines
frad-0.20:src/dlcicfg.c
It includes
linux/if_frad.hand also performs theDLCI_SET_CONFioctl.Enough evidence to show we need to keep this header in the export set. Let's just kill the bogus CONFIG_* ifdef tests in there.
After killing CONFIG_DLCI and CONFIG_DLCI_MODULE, it is also killing the kernel:
CC net/socket.o
In file included from net/socket.c:75:include/linux/if_frad.h:170: error: ‘CONFIG_DLCI_MAX’ undeclared here (not in a function) make[1]: *** [net/socket.o] Error 1
make: *** [net] Error 2
because these things still depends on CONFIG_DLCI:
struct frad_local
{
struct net_device_stats stats;
/* devices which this FRAD is slaved to */ struct net_device *master[CONFIG_DLCI_MAX]; short dlci[CONFIG_DLCI_MAX];
Are you still sure we do not need CONFIG_DLCI.
--
JSR
Quoted 6 lines · Jaswinder Singh Rajput
After killing
CONFIG_DLCIandCONFIG_DLCI_MODULE, it is also killing the kernel:CC
net/socket.o
In file included fromnet/socket.c:75:include/linux/if_frad.h:170: error: ‘CONFIG_DLCI_MAX’ undeclared here (not in a function)
Perhaps this would do (untested).
include/linux/if_frad.h +4 -6
@@ -26,8 +26,6 @@#include <linux/if.h> -#if defined(CONFIG_DLCI ) || defined(CONFIG_DLCI_MODULE ) -/* Structures and constants associated with the DLCI device driver */ struct dlci_add
@@ -127,6 +125,8 @@ struct frad_conf#ifdef __KERNEL__ +#if defined(CONFIG_DLCI ) || defined(CONFIG_DLCI_MODULE ) +/* these are the fields of an RFC 1490 header */ struct frhdr {
@@ -190,12 +190,10 @@ struct frad_localint buffer;/* current buffer for S508 firmware */ }; -#endif /* __KERNEL__ */ -#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */ -#ifdef __KERNEL__extern void dlci_ioctl_set (int (*hook)(unsigned int ,void __user *)); -#endif + +#endif /* __KERNEL__ */ #endif
David Miller
maintainerFrom: Krzysztof Halasa <[email protected]>
Date: Sat, 24 Jan 2009 16:32:55 +0100
Quoted 11 lines
Quoted 6 lines · Jaswinder Singh Rajput
After killing
CONFIG_DLCIandCONFIG_DLCI_MODULE, it is also killing the kernel:CC
net/socket.o
In file included fromnet/socket.c:75:include/linux/if_frad.h:170: error: ‘CONFIG_DLCI_MAX’ undeclared here (not in a function)Perhaps this would do (untested).
Signed-off-by Krzysztof Hałasa <[email protected]>
This looks good, applied, thanks everyone.