Skip to contentSkip to conversation

simplify numerous param.h's by including <asm-generic/param.h>?

DISCUSSION Robert P. J. Day 2 participants 3 messages Dec 29, 2009 – Dec 30, 2009

lore
Share & tools
lore
#0 lore raw

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

========================================================================

#1 lore raw
Quoted 8 lines · Robert P. J. Day

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.

#2 lore raw
Quoted 6 lines · On Tue, 29 Dec 2009, [email protected] wrote:
Quoted 5 lines · Robert P. J. Day

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

Quoted 8 lines
Quoted 3 lines
  #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

========================================================================