2009-12-30 00:32:55

by Robert P. J. Day

[permalink] [raw]
Subject: [PATCH] Remove macro MAXHOSTNAMELEN from <asm-generic/param.h>.


Since nothing in the entire tree makes use of this macro, remove it.
This removal should eventually propagate to all of the arch-specific
param.h files.

Signed-off-by: Robert P. J. Day <[email protected]>

---

from the earlier discussion, no one provided any compelling reason
to retain this macro. i'll eventually simplify the rest of the
param.h files similarly. the fact that this macro is currently
exported to user space doesn't seem like any argument to keep it.

diff --git a/include/asm-generic/param.h b/include/asm-generic/param.h
index cdf8251..47939d8 100644
--- a/include/asm-generic/param.h
+++ b/include/asm-generic/param.h
@@ -19,6 +19,4 @@
#define NOGROUP (-1)
#endif

-#define MAXHOSTNAMELEN 64 /* max length of hostname */
-
#endif /* __ASM_GENERIC_PARAM_H */

rday
--

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================


2009-12-30 00:56:20

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH] Remove macro MAXHOSTNAMELEN from <asm-generic/param.h>.

Hi Robert,

On Tue, 29 Dec 2009 19:32:15 -0500 (EST) "Robert P. J. Day" <[email protected]> wrote:
>
> Since nothing in the entire tree makes use of this macro, remove it.
> This removal should eventually propagate to all of the arch-specific
> param.h files.

Except if the only place this is picked up by glibc is the kernel header
files, then it will disappear from user mode and some packages may break.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (516.00 B)
(No filename) (198.00 B)
Download all attachments

2009-12-30 01:03:36

by Robert P. J. Day

[permalink] [raw]
Subject: Re: [PATCH] Remove macro MAXHOSTNAMELEN from <asm-generic/param.h>.

On Wed, 30 Dec 2009, Stephen Rothwell wrote:

> Hi Robert,
>
> On Tue, 29 Dec 2009 19:32:15 -0500 (EST) "Robert P. J. Day" <[email protected]> wrote:
> >
> > Since nothing in the entire tree makes use of this macro, remove
> > it. This removal should eventually propagate to all of the
> > arch-specific param.h files.
>
> Except if the only place this is picked up by glibc is the kernel
> header files, then it will disappear from user mode and some
> packages may break.

true, but this still takes me back to my original observation -- why
is this macro being defined in a kernel header file if the kernel
itself has absolutely no interest in it and doesn't use it in any way?

if glibc wants it, it might as well define it.

rday
--


========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================

2009-12-30 02:05:45

by Vikram Dhillon

[permalink] [raw]
Subject: Re: [PATCH] Remove macro MAXHOSTNAMELEN from <asm-generic/param.h>.

I agree with you, the only place this macro is being used in glibc,
there are some really nice packages like MATLAB that depend on it, but
in distributions like Solaris there are conflicts in the newer version
and glibc so the trend seems to be moving away from glibc dependency
because of those conflicts. We might more of packages moving away from
glibc so let's wait and see what happens next :D

Regards,
Vikram Dhillon

~~~
There are lots of Linux users who don't care how the kernel works, but
only want to use it. That is a tribute to how good Linux is.
-- Linus Torvalds



On Tue, Dec 29, 2009 at 8:03 PM, Robert P. J. Day <[email protected]> wrote:
> On Wed, 30 Dec 2009, Stephen Rothwell wrote:
>
>> Hi Robert,
>>
>> On Tue, 29 Dec 2009 19:32:15 -0500 (EST) "Robert P. J. Day" <[email protected]> wrote:
>> >
>> > Since nothing in the entire tree makes use of this macro, remove
>> > it. This removal should eventually propagate to all of the
>> > arch-specific param.h files.
>>
>> Except if the only place this is picked up by glibc is the kernel
>> header files, then it will disappear from user mode and some
>> packages may break.
>
>  true, but this still takes me back to my original observation -- why
> is this macro being defined in a kernel header file if the kernel
> itself has absolutely no interest in it and doesn't use it in any way?
>
>  if glibc wants it, it might as well define it.
>
> rday
> --
>
>
> ========================================================================
> Robert P. J. Day                               Waterloo, Ontario, CANADA
>
>            Linux Consulting, Training and Kernel Pedantry.
>
> Web page:                                          http://crashcourse.ca
> Twitter:                                       http://twitter.com/rpjday
> ========================================================================
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>