All of lore.kernel.org
 help / color / mirror / Atom feed
* patches for PROC_FS=n (2.6.0-test7)
@ 2003-10-10 21:16 Randy.Dunlap
  2003-10-11 19:08 ` David S. Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Randy.Dunlap @ 2003-10-10 21:16 UTC (permalink / raw)
  To: lkml; +Cc: netdev


drivers/char/toshiba.c and
net/atm/clip.c don't build if PROC_FS=n.

Patches for them are available at:

http://developer.osdl.org/rddunlap/patches/toshiba_inline_260t7.patch
http://developer.osdl.org/rddunlap/patches/atmprocfs_260t7.patch

There are several other drivers/protocols that don't build
with PROC_FS=n, like arlan, siimage, ipx, llc, and bluetooth.

--
~Randy

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
@ 2003-10-10 23:06 Noah J. Misch
  2003-10-11  2:45 ` Randy.Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Noah J. Misch @ 2003-10-10 23:06 UTC (permalink / raw)
  To: rddunlap; +Cc: linux-kernel

> drivers/char/toshiba.c and
> net/atm/clip.c don't build if PROC_FS=n.

> Patches for them are available at:

> http://developer.osdl.org/rddunlap/patches/toshiba_inline_260t7.patch

Consider the patch at the bottom of this message instead.  The tosh_get_info
function is really internal to drivers/char/toshiba.c, so instead I changed it
to static in that file and completely removed the prototype in toshiba.h.

BTW, both your patch (I think) and mine also solve a duplicate symbol problem -
see the ChangeSet log for details.

> http://developer.osdl.org/rddunlap/patches/atmprocfs_260t7.patch

Cool.

> There are several other drivers/protocols that don't build
> with PROC_FS=n, like arlan, siimage, ipx, llc, and bluetooth.

I put in a patch for ipx yesterday, and I have patches for siimage and llc
pretty much ready to go.  I noticed the others but I have not done much.

Thanks,
Noah

Toshiba patch:

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1344  -> 1.1345
#	include/linux/toshiba.h	1.3     -> 1.4
#	drivers/char/toshiba.c	1.11    -> 1.12
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/10/10	noah@caltech.edu	1.1345
# Remove the prototypes for tosh_get_info from include/linux/toshiba.h and
# make the function's definition in drivers/char/toshiba.c static.  This
# function is specific to toshiba.c, so no other file needs the prototype.
#
# This allows drivers/char/toshiba.c to compile with CONFIG_PROC_FS=n and
# allows one to link more than one driver that includes toshiba.h into the
# kernel at the same time without a multiple declaration; for example, both
# drivers/char/toshiba.c and drivers/video/neofb.c.
# --------------------------------------------
#
diff -Nru a/drivers/char/toshiba.c b/drivers/char/toshiba.c
--- a/drivers/char/toshiba.c	Fri Oct 10 18:50:17 2003
+++ b/drivers/char/toshiba.c	Fri Oct 10 18:50:17 2003
@@ -292,7 +292,7 @@
  * Print the information for /proc/toshiba
  */
 #ifdef CONFIG_PROC_FS
-int tosh_get_info(char *buffer, char **start, off_t fpos, int length)
+static int tosh_get_info(char *buffer, char **start, off_t fpos, int length)
 {
 	char *temp;
 	int key;
diff -Nru a/include/linux/toshiba.h b/include/linux/toshiba.h
--- a/include/linux/toshiba.h	Fri Oct 10 18:50:17 2003
+++ b/include/linux/toshiba.h	Fri Oct 10 18:50:17 2003
@@ -33,13 +33,4 @@
 	unsigned int edi __attribute__ ((packed));
 } SMMRegisters;

-#ifdef CONFIG_PROC_FS
-static int tosh_get_info(char *, char **, off_t, int);
-#else /* !CONFIG_PROC_FS */
-inline int tosh_get_info(char *buffer, char **start, off_t fpos, int lenght)
-{
-	return 0;
-}
-#endif /* CONFIG_PROC_FS */
-
 #endif


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-10 23:06 Noah J. Misch
@ 2003-10-11  2:45 ` Randy.Dunlap
  2003-10-13  2:17 ` Randy.Dunlap
  2003-10-13  3:13 ` Randy.Dunlap
  2 siblings, 0 replies; 15+ messages in thread
From: Randy.Dunlap @ 2003-10-11  2:45 UTC (permalink / raw)
  To: Noah J. Misch; +Cc: linux-kernel

On Fri, 10 Oct 2003 16:06:29 -0700 (PDT) "Noah J. Misch" <noah@caltech.edu> wrote:

| > drivers/char/toshiba.c and
| > net/atm/clip.c don't build if PROC_FS=n.
| 
| > Patches for them are available at:
| 
| > http://developer.osdl.org/rddunlap/patches/toshiba_inline_260t7.patch
| 
| Consider the patch at the bottom of this message instead.  The tosh_get_info
| function is really internal to drivers/char/toshiba.c, so instead I changed it
| to static in that file and completely removed the prototype in toshiba.h.
| 
| BTW, both your patch (I think) and mine also solve a duplicate symbol problem -
| see the ChangeSet log for details.

Yes, your patch is good and should be applied.

| > http://developer.osdl.org/rddunlap/patches/atmprocfs_260t7.patch
| 
| Cool.
| 
| > There are several other drivers/protocols that don't build
| > with PROC_FS=n, like arlan, siimage, ipx, llc, and bluetooth.
| 
| I put in a patch for ipx yesterday, and I have patches for siimage and llc
| pretty much ready to go.  I noticed the others but I have not done much.

Good, thanks for the info.

~Randy

| Thanks,
| Noah
| 
| Toshiba patch:
| 
| # This is a BitKeeper generated patch for the following project:
| # Project Name: Linux kernel tree
| # This patch format is intended for GNU patch command version 2.5 or higher.
| # This patch includes the following deltas:
| #	           ChangeSet	1.1344  -> 1.1345
| #	include/linux/toshiba.h	1.3     -> 1.4
| #	drivers/char/toshiba.c	1.11    -> 1.12
| #
| # The following is the BitKeeper ChangeSet Log
| # --------------------------------------------
| # 03/10/10	noah@caltech.edu	1.1345
| # Remove the prototypes for tosh_get_info from include/linux/toshiba.h and
| # make the function's definition in drivers/char/toshiba.c static.  This
| # function is specific to toshiba.c, so no other file needs the prototype.
| #
| # This allows drivers/char/toshiba.c to compile with CONFIG_PROC_FS=n and
| # allows one to link more than one driver that includes toshiba.h into the
| # kernel at the same time without a multiple declaration; for example, both
| # drivers/char/toshiba.c and drivers/video/neofb.c.
| # --------------------------------------------
| #
| diff -Nru a/drivers/char/toshiba.c b/drivers/char/toshiba.c
| --- a/drivers/char/toshiba.c	Fri Oct 10 18:50:17 2003
| +++ b/drivers/char/toshiba.c	Fri Oct 10 18:50:17 2003
| @@ -292,7 +292,7 @@
|   * Print the information for /proc/toshiba
|   */
|  #ifdef CONFIG_PROC_FS
| -int tosh_get_info(char *buffer, char **start, off_t fpos, int length)
| +static int tosh_get_info(char *buffer, char **start, off_t fpos, int length)
|  {
|  	char *temp;
|  	int key;
| diff -Nru a/include/linux/toshiba.h b/include/linux/toshiba.h
| --- a/include/linux/toshiba.h	Fri Oct 10 18:50:17 2003
| +++ b/include/linux/toshiba.h	Fri Oct 10 18:50:17 2003
| @@ -33,13 +33,4 @@
|  	unsigned int edi __attribute__ ((packed));
|  } SMMRegisters;
| 
| -#ifdef CONFIG_PROC_FS
| -static int tosh_get_info(char *, char **, off_t, int);
| -#else /* !CONFIG_PROC_FS */
| -inline int tosh_get_info(char *buffer, char **start, off_t fpos, int lenght)
| -{
| -	return 0;
| -}
| -#endif /* CONFIG_PROC_FS */
| -
|  #endif
| 
| -

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-10 21:16 patches for PROC_FS=n (2.6.0-test7) Randy.Dunlap
@ 2003-10-11 19:08 ` David S. Miller
  2003-10-11 19:40   ` Sam Ravnborg
  0 siblings, 1 reply; 15+ messages in thread
From: David S. Miller @ 2003-10-11 19:08 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-kernel, netdev

On Fri, 10 Oct 2003 14:16:46 -0700
"Randy.Dunlap" <rddunlap@osdl.org> wrote:

> http://developer.osdl.org/rddunlap/patches/atmprocfs_260t7.patch

How can this be needed?  When procfs is disabled then
remove_proc_entry() is defined as "do { } while (0)", ie. a nop.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-11 19:08 ` David S. Miller
@ 2003-10-11 19:40   ` Sam Ravnborg
  2003-10-11 19:40     ` David S. Miller
  2003-10-12  3:24     ` Randy.Dunlap
  0 siblings, 2 replies; 15+ messages in thread
From: Sam Ravnborg @ 2003-10-11 19:40 UTC (permalink / raw)
  To: David S. Miller; +Cc: Randy.Dunlap, linux-kernel, netdev

On Sat, Oct 11, 2003 at 12:08:52PM -0700, David S. Miller wrote:
> On Fri, 10 Oct 2003 14:16:46 -0700
> "Randy.Dunlap" <rddunlap@osdl.org> wrote:
> 
> > http://developer.osdl.org/rddunlap/patches/atmprocfs_260t7.patch
> 
> How can this be needed?  When procfs is disabled then
> remove_proc_entry() is defined as "do { } while (0)", ie. a nop.

Due to this - the real offender:

from: net/atm/clip.c:
#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#endif

	Sam

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-11 19:40   ` Sam Ravnborg
@ 2003-10-11 19:40     ` David S. Miller
  2003-10-12  3:24     ` Randy.Dunlap
  1 sibling, 0 replies; 15+ messages in thread
From: David S. Miller @ 2003-10-11 19:40 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: rddunlap, linux-kernel, netdev

On Sat, 11 Oct 2003 21:40:08 +0200
Sam Ravnborg <sam@ravnborg.org> wrote:

> Due to this - the real offender:
> 
> from: net/atm/clip.c:
> #ifdef CONFIG_PROC_FS
> #include <linux/proc_fs.h>
> #include <linux/seq_file.h>
> #endif

That makes a whole lot more sense, here is the fix I just
checked in:

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1352  -> 1.1353 
#	      net/atm/clip.c	1.26    -> 1.27   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/10/11	davem@nuts.ninka.net	1.1353
# [ATM]: Kill PROC_FS ifdef around includes.
# --------------------------------------------
#
diff -Nru a/net/atm/clip.c b/net/atm/clip.c
--- a/net/atm/clip.c	Sat Oct 11 12:43:12 2003
+++ b/net/atm/clip.c	Sat Oct 11 12:43:12 2003
@@ -24,10 +24,8 @@
 #include <linux/if.h> /* for IFF_UP */
 #include <linux/inetdevice.h>
 #include <linux/bitops.h>
-#ifdef CONFIG_PROC_FS
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
-#endif
 #include <net/route.h> /* for struct rtable and routing */
 #include <net/icmp.h> /* icmp_send */
 #include <asm/param.h> /* for HZ */

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-11 19:40   ` Sam Ravnborg
  2003-10-11 19:40     ` David S. Miller
@ 2003-10-12  3:24     ` Randy.Dunlap
  1 sibling, 0 replies; 15+ messages in thread
From: Randy.Dunlap @ 2003-10-12  3:24 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: davem, netdev

On Sat, 11 Oct 2003 21:40:08 +0200 Sam Ravnborg <sam@ravnborg.org> wrote:

| On Sat, Oct 11, 2003 at 12:08:52PM -0700, David S. Miller wrote:
| > On Fri, 10 Oct 2003 14:16:46 -0700
| > "Randy.Dunlap" <rddunlap@osdl.org> wrote:
| > 
| > > http://developer.osdl.org/rddunlap/patches/atmprocfs_260t7.patch
| > 
| > How can this be needed?  When procfs is disabled then
| > remove_proc_entry() is defined as "do { } while (0)", ie. a nop.
| 
| Due to this - the real offender:
| 
| from: net/atm/clip.c:
| #ifdef CONFIG_PROC_FS
| #include <linux/proc_fs.h>
| #include <linux/seq_file.h>
| #endif

ugh, thanks.

--
~Randy

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-10 23:06 Noah J. Misch
  2003-10-11  2:45 ` Randy.Dunlap
@ 2003-10-13  2:17 ` Randy.Dunlap
  2003-10-14  5:17   ` Noah J. Misch
  2003-10-13  3:13 ` Randy.Dunlap
  2 siblings, 1 reply; 15+ messages in thread
From: Randy.Dunlap @ 2003-10-13  2:17 UTC (permalink / raw)
  To: Noah J. Misch; +Cc: netdev, davem, maxk

On Fri, 10 Oct 2003 16:06:29 -0700 (PDT) "Noah J. Misch" <noah@caltech.edu> wrote:

| > There are several other drivers/protocols that don't build
| > with PROC_FS=n, like arlan, siimage, ipx, llc, and bluetooth.
| 
| I put in a patch for ipx yesterday, and I have patches for siimage and llc
| pretty much ready to go.  I noticed the others but I have not done much.

ipx is merged.  I'll leave siimage and llc to Noah.
Patch below fixes af_bluetooth.  Comments on it?

--
~Randy


patch_name:	bt_noprocfs.patch
patch_version:	2003-10-12.19:11:03
author:		Randy.Dunlap <rddunlap@osdl.org>
description:	af_bluetooth uses/needs proc_bt when PROC_FS=n
product:	Linux
product_versions: 2.6.0-test7
diffstat:	=
 net/bluetooth/af_bluetooth.c |    2 --
 1 files changed, 2 deletions(-)


diff -Naur ./net/bluetooth/af_bluetooth.c~btprocfs ./net/bluetooth/af_bluetooth.c
--- ./net/bluetooth/af_bluetooth.c~btprocfs	2003-10-08 12:24:02.000000000 -0700
+++ ./net/bluetooth/af_bluetooth.c	2003-10-12 19:09:11.000000000 -0700
@@ -56,9 +56,7 @@
 #define BT_DBG( A... )
 #endif
 
-#ifdef CONFIG_PROC_FS
 struct proc_dir_entry *proc_bt;
-#endif
 
 /* Bluetooth sockets */
 #define BT_MAX_PROTO	5

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-10 23:06 Noah J. Misch
  2003-10-11  2:45 ` Randy.Dunlap
  2003-10-13  2:17 ` Randy.Dunlap
@ 2003-10-13  3:13 ` Randy.Dunlap
  2003-10-13 11:31   ` Elmer
  2003-10-14  5:52   ` Noah J. Misch
  2 siblings, 2 replies; 15+ messages in thread
From: Randy.Dunlap @ 2003-10-13  3:13 UTC (permalink / raw)
  To: Noah J. Misch; +Cc: netdev, davem, elmer, Elmer.Joandi

On Fri, 10 Oct 2003 16:06:29 -0700 (PDT) "Noah J. Misch" <noah@caltech.edu> wrote:

| > There are several other drivers/protocols that don't build
| > with PROC_FS=n, like arlan, siimage, ipx, llc, and bluetooth.


Here's a patch for the wireless/arlan driver for PROC_FS=n.
Currently it defines both a function and a macro for
init_arlan_proc() if PROC_FS=n.  This causes a bunch of
compile-time errors.

It looks to me like it should always call the init_arlan_proc()
(and cleanup_arlan_proc()) functions since it inits some sysctl tables.
Or am I misunderstanding it?

Thanks,
--
~Randy


patch_name:	arlan_noprocfs.patch
patch_version:	2003-10-12.19:46:24
author:		Randy.Dunlap <rddunlap@osdl.org>
description:	use init_arlan_proc() for sysctl inits
product:	Linux
product_versions: 2.6.0-test7
diffstat:	=
 drivers/net/wireless/arlan.h |    5 -----
 1 files changed, 5 deletions(-)


diff -Naur ./drivers/net/wireless/arlan.h~arlanprocfs ./drivers/net/wireless/arlan.h
--- ./drivers/net/wireless/arlan.h~arlanprocfs	2003-10-08 12:24:08.000000000 -0700
+++ ./drivers/net/wireless/arlan.h	2003-10-12 19:45:46.000000000 -0700
@@ -39,13 +39,8 @@
 #define ARLAN_RCV_PROMISC 1
 #define ARLAN_RCV_CONTROL 2
 
-#ifdef CONFIG_PROC_FS
 extern int init_arlan_proc(void);
 extern void cleanup_arlan_proc(void);
-#else
-#define init_arlan_proc()	(0)
-#define cleanup_arlan_proc()	do { } while (0);
-#endif
 
 extern struct net_device *arlan_device[MAX_ARLANS];
 extern int	arlan_debug;

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-13  3:13 ` Randy.Dunlap
@ 2003-10-13 11:31   ` Elmer
  2003-10-13 14:49     ` Randy.Dunlap
  2003-10-14  5:52   ` Noah J. Misch
  1 sibling, 1 reply; 15+ messages in thread
From: Elmer @ 2003-10-13 11:31 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Noah J. Misch, netdev@oss.sgi.com, davem@redhat.com



arlan.c is ok without arlan-proc.c
as init_arlan_proc is in arlan-proc.c, it shoult be
OK, as long as radio parameters are saved into cards ROM.

I have forgot a lot about that code, of course.



Elmer

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-13 11:31   ` Elmer
@ 2003-10-13 14:49     ` Randy.Dunlap
  0 siblings, 0 replies; 15+ messages in thread
From: Randy.Dunlap @ 2003-10-13 14:49 UTC (permalink / raw)
  To: Elmer; +Cc: noah, netdev, davem

On Mon, 13 Oct 2003 13:31:30 +0200 (EET) Elmer <elmer@linking.ee> wrote:

| 
| 
| arlan.c is ok without arlan-proc.c
| as init_arlan_proc is in arlan-proc.c, it shoult be
| OK, as long as radio parameters are saved into cards ROM.
| 
| I have forgot a lot about that code, of course.

Hi Elmer,
Sure, I understand the last comment.

I don't quite understand the first paragraph though.
Could we try again?

Currently arlan.c + arlan-proc.c does not build if CONFIG_PROC_FS=n.
The Makefile always builds arlan-main.o and arlan-proc.o.
Are you saying that this is incorrect?
Should arlan-proc.o only be built/used when CONFIG_PROC_FS=y?

Thanks.
--
~Randy

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-13  2:17 ` Randy.Dunlap
@ 2003-10-14  5:17   ` Noah J. Misch
  0 siblings, 0 replies; 15+ messages in thread
From: Noah J. Misch @ 2003-10-14  5:17 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: maxk, netdev, davem

Randy,

That fix looks like the best to me.  I did notice also that proc_bt_rfcomm and
proc_bt_hci have similar #ifdef wrappers.  I think that's okay since they aren't
EXPORT_SYMBOL-ed, and they're used in fewer places.

FYI, IPX won't compile without CONFIG_PROC_FS at this time.  The merged patch
depended on a patch that I sent to Linus and posted to linux-kernel alongside
the IPX patch.  I also sent them to linux-net (accidentally, instead of netdev).
I may need to resend that patch.  In the mean time, if you actually need to use
IPX without procfs, you can grab the patch (and rationale) here:
http://www.ussg.iu.edu/hypermail/linux/kernel/0310.1/0452.html

FYI #2, from elsewhere in the department of fixing exotic breakage, I'm working
on patches that will allow one to compile a linux kernel under Unix and other
similar systems.  I've gotten allnoconfig for i386 to build from Solaris 2.7 on
sun4u, but a number of the userspace tools that support the build process of
optional components need a bit more help.

On Sun, 12 Oct 2003, Randy.Dunlap wrote:

> On Fri, 10 Oct 2003 16:06:29 -0700 (PDT) "Noah J. Misch" <noah@caltech.edu> wrote:
>
> | > There are several other drivers/protocols that don't build
> | > with PROC_FS=n, like arlan, siimage, ipx, llc, and bluetooth.
> |
> | I put in a patch for ipx yesterday, and I have patches for siimage and llc
> | pretty much ready to go.  I noticed the others but I have not done much.
>
> ipx is merged.  I'll leave siimage and llc to Noah.
> Patch below fixes af_bluetooth.  Comments on it?
>
> --
> ~Randy
>
>
> patch_name:	bt_noprocfs.patch
> patch_version:	2003-10-12.19:11:03
> author:		Randy.Dunlap <rddunlap@osdl.org>
> description:	af_bluetooth uses/needs proc_bt when PROC_FS=n
> product:	Linux
> product_versions: 2.6.0-test7
> diffstat:	=
>  net/bluetooth/af_bluetooth.c |    2 --
>  1 files changed, 2 deletions(-)
>
>
> diff -Naur ./net/bluetooth/af_bluetooth.c~btprocfs ./net/bluetooth/af_bluetooth.c
> --- ./net/bluetooth/af_bluetooth.c~btprocfs	2003-10-08 12:24:02.000000000 -0700
> +++ ./net/bluetooth/af_bluetooth.c	2003-10-12 19:09:11.000000000 -0700
> @@ -56,9 +56,7 @@
>  #define BT_DBG( A... )
>  #endif
>
> -#ifdef CONFIG_PROC_FS
>  struct proc_dir_entry *proc_bt;
> -#endif
>
>  /* Bluetooth sockets */
>  #define BT_MAX_PROTO	5
>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-13  3:13 ` Randy.Dunlap
  2003-10-13 11:31   ` Elmer
@ 2003-10-14  5:52   ` Noah J. Misch
  2003-10-14  6:12     ` Randy.Dunlap
  1 sibling, 1 reply; 15+ messages in thread
From: Noah J. Misch @ 2003-10-14  5:52 UTC (permalink / raw)
  To: Randy.Dunlap, Elmer.Joandi, elmer; +Cc: netdev

Randy,

I poked around the driver a bit and uncovered a few points that suggest to me a
different approach to the problem.

The file arlan-proc.c contains a number of functions supporting the driver's
sysctl interface.  Nothing in that file appears procfs-specific.

I would change the Makefile to compile arlan-proc.c depending on CONFIG_SYSCTL
and remove the #ifdef CONFIG_PROC_FS guarding much of that file.  I would then
make arlan.h define macro or static inline stubs for init_arlan_proc and
cleanup_arlan_proc much like the current arlan.h does.

For the matter, perhaps one could add an extra config option, ARLAN_SYSCTL, that
depends on ARLAN and SYSCTL, and conditional-compile arlan-proc.c on that
instead of CONFIG_SYSCTL itself.  That way, users could leave it out to save
space without zapping all sysctls.  I would go for this approach myself.

The configuration help text for the arlan driver claims that it builds a module
for the driver and another for its sysctl interface.  It doesn't do that at the
moment, but that is another option (though not one I like as much).

What do you think?

On Sun, 12 Oct 2003, Randy.Dunlap wrote:

> On Fri, 10 Oct 2003 16:06:29 -0700 (PDT) "Noah J. Misch" <noah@caltech.edu> wrote:
>
> | > There are several other drivers/protocols that don't build
> | > with PROC_FS=n, like arlan, siimage, ipx, llc, and bluetooth.
>
>
> Here's a patch for the wireless/arlan driver for PROC_FS=n.
> Currently it defines both a function and a macro for
> init_arlan_proc() if PROC_FS=n.  This causes a bunch of
> compile-time errors.
>
> It looks to me like it should always call the init_arlan_proc()
> (and cleanup_arlan_proc()) functions since it inits some sysctl tables.
> Or am I misunderstanding it?
>
> Thanks,
> --
> ~Randy
>
>
> patch_name:	arlan_noprocfs.patch
> patch_version:	2003-10-12.19:46:24
> author:		Randy.Dunlap <rddunlap@osdl.org>
> description:	use init_arlan_proc() for sysctl inits
> product:	Linux
> product_versions: 2.6.0-test7
> diffstat:	=
>  drivers/net/wireless/arlan.h |    5 -----
>  1 files changed, 5 deletions(-)
>
>
> diff -Naur ./drivers/net/wireless/arlan.h~arlanprocfs ./drivers/net/wireless/arlan.h
> --- ./drivers/net/wireless/arlan.h~arlanprocfs	2003-10-08 12:24:08.000000000 -0700
> +++ ./drivers/net/wireless/arlan.h	2003-10-12 19:45:46.000000000 -0700
> @@ -39,13 +39,8 @@
>  #define ARLAN_RCV_PROMISC 1
>  #define ARLAN_RCV_CONTROL 2
>
> -#ifdef CONFIG_PROC_FS
>  extern int init_arlan_proc(void);
>  extern void cleanup_arlan_proc(void);
> -#else
> -#define init_arlan_proc()	(0)
> -#define cleanup_arlan_proc()	do { } while (0);
> -#endif
>
>  extern struct net_device *arlan_device[MAX_ARLANS];
>  extern int	arlan_debug;
>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-14  5:52   ` Noah J. Misch
@ 2003-10-14  6:12     ` Randy.Dunlap
  2003-10-14  8:39       ` Elmer
  0 siblings, 1 reply; 15+ messages in thread
From: Randy.Dunlap @ 2003-10-14  6:12 UTC (permalink / raw)
  To: Noah J. Misch; +Cc: Elmer.Joandi, elmer, netdev

On Mon, 13 Oct 2003 22:52:56 -0700 (PDT) "Noah J. Misch" <noah@caltech.edu> wrote:

| Randy,
| 
| I poked around the driver a bit and uncovered a few points that suggest to me a
| different approach to the problem.
| 
| The file arlan-proc.c contains a number of functions supporting the driver's
| sysctl interface.  Nothing in that file appears procfs-specific.

Right.

| I would change the Makefile to compile arlan-proc.c depending on CONFIG_SYSCTL
| and remove the #ifdef CONFIG_PROC_FS guarding much of that file.  I would then
| make arlan.h define macro or static inline stubs for init_arlan_proc and
| cleanup_arlan_proc much like the current arlan.h does.

That's about what I was planning to do next if I didn't hear anything
else from Elmer.

| For the matter, perhaps one could add an extra config option, ARLAN_SYSCTL, that
| depends on ARLAN and SYSCTL, and conditional-compile arlan-proc.c on that
| instead of CONFIG_SYSCTL itself.  That way, users could leave it out to save
| space without zapping all sysctls.  I would go for this approach myself.

I wouldn't prefer this, but if you make the patch, do whatever you want.
I think that CONFIG_SYSCTL should be enough to determine/decide/control it.

| The configuration help text for the arlan driver claims that it builds a module
| for the driver and another for its sysctl interface.  It doesn't do that at the
| moment, but that is another option (though not one I like as much).

I missed this config help text.  Glad you caught it.
But I wouldn't make that a separate module.

| What do you think?

Go ahead, your choice, but my preferences are above.


| On Sun, 12 Oct 2003, Randy.Dunlap wrote:
| 
| > On Fri, 10 Oct 2003 16:06:29 -0700 (PDT) "Noah J. Misch" <noah@caltech.edu> wrote:
| >
| > | > There are several other drivers/protocols that don't build
| > | > with PROC_FS=n, like arlan, siimage, ipx, llc, and bluetooth.
| >
| >
| > Here's a patch for the wireless/arlan driver for PROC_FS=n.
| > Currently it defines both a function and a macro for
| > init_arlan_proc() if PROC_FS=n.  This causes a bunch of
| > compile-time errors.
| >
| > It looks to me like it should always call the init_arlan_proc()
| > (and cleanup_arlan_proc()) functions since it inits some sysctl tables.
| > Or am I misunderstanding it?

Thanks.  And I hope that your mailbox is functional now.

--
~Randy

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: patches for PROC_FS=n (2.6.0-test7)
  2003-10-14  6:12     ` Randy.Dunlap
@ 2003-10-14  8:39       ` Elmer
  0 siblings, 0 replies; 15+ messages in thread
From: Elmer @ 2003-10-14  8:39 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Noah J. Misch, netdev@oss.sgi.com



on the other hand,  consider following:

1. the card is shit, also, on ISA interface
2. most people do write configuration parameters into cards BIOS under DOS
and do not need interface for configuration.
3. all of contents should be in /proc/sys , as far as I remember, I have
tried to implement all via sysctl rather than procfs io.
4. there is a file, reading of which causes card reset. Most of people
need this.

Therefore sensible solution would be simple, whatever it is.

Elmer.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-10-14  8:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-10 21:16 patches for PROC_FS=n (2.6.0-test7) Randy.Dunlap
2003-10-11 19:08 ` David S. Miller
2003-10-11 19:40   ` Sam Ravnborg
2003-10-11 19:40     ` David S. Miller
2003-10-12  3:24     ` Randy.Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2003-10-10 23:06 Noah J. Misch
2003-10-11  2:45 ` Randy.Dunlap
2003-10-13  2:17 ` Randy.Dunlap
2003-10-14  5:17   ` Noah J. Misch
2003-10-13  3:13 ` Randy.Dunlap
2003-10-13 11:31   ` Elmer
2003-10-13 14:49     ` Randy.Dunlap
2003-10-14  5:52   ` Noah J. Misch
2003-10-14  6:12     ` Randy.Dunlap
2003-10-14  8:39       ` Elmer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.