2009-12-29 17:31:03

by Robert P. J. Day

[permalink] [raw]
Subject: simplify numerous param.h's by including <asm-generic/param.h>?


a brief perusal of the numerous param.h files under
arch/<arch>/include/asm shows that most of them could be replaced with
a simple

#include <asm-generic/param.h>

as is done by, for example, the microblaze param.h file. the only
noticeable difference in those files is the value of EXEC_PAGESIZE,
which is already conditionally set in the generic version:

#ifndef EXEC_PAGESIZE
#define EXEC_PAGESIZE 4096
#endif

so, at worst, a param.h file could be replaced by:

#define EXEC_PAGESIZE <whatever>
#include <asm-generic/param.h>

rather than duplicating the same content over and over. (i did this
sort of centralization once upon a time with the ioctl.h file.)

worth doing? not worth doing?

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-29 18:09:13

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: simplify numerous param.h's by including <asm-generic/param.h>?

On Tue, 29 Dec 2009 12:30:23 EST, "Robert P. J. Day" said:
>
> a brief perusal of the numerous param.h files under
> arch/<arch>/include/asm shows that most of them could be replaced with
> a simple
>
> #include <asm-generic/param.h>

> worth doing? not worth doing?

Anytime you can fix "You are in a twisty maze of #include files, all subtly
different" issues, it is a Good Thing.

Thanks for all the de-cruftifying efforts you've made.


Attachments:
(No filename) (227.00 B)

2009-12-30 08:18:22

by Robert P. J. Day

[permalink] [raw]
Subject: Re: simplify numerous param.h's by including <asm-generic/param.h>?

On Tue, 29 Dec 2009, [email protected] wrote:

> On Tue, 29 Dec 2009 12:30:23 EST, "Robert P. J. Day" said:
> >
> > a brief perusal of the numerous param.h files under
> > arch/<arch>/include/asm shows that most of them could be replaced with
> > a simple
> >
> > #include <asm-generic/param.h>
>
> > worth doing? not worth doing?
>
> Anytime you can fix "You are in a twisty maze of #include files, all
> subtly different" issues, it is a Good Thing.
>
> Thanks for all the de-cruftifying efforts you've made.

ok, so i'm assuming there's no legitimate objection to having
numerous arch-specific param.h files simply refer to
<asm-generic/param.h> if that's appropriate. i'll submit individual
patches on a per-arch basis to the appropriate MLs.

rday
--

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

Linux Consulting, Training and Kernel Pedantry.

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