Re: identifying useless sanitized header files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 09, 2007 at 04:22:03PM -0400, Robert P. J. Day wrote:
> On Sun, 8 Apr 2007, Adrian Bunk wrote:
> 
> > On Sun, Apr 08, 2007 at 04:56:07PM -0400, Robert P. J. Day wrote:
> 
> > >   (in fact, if you take a quick look at all of the
> > > include/asm-*/auxvec.h headers, most of them are empty.  what's
> > > the point?)
> 
> > The point is that an "#include <linuc/auxvec.h>" compiles.
> 
> i've been thinking about this, and this approach just grates on me,
> but i don't have an immediate solution for it.
> 
> as it stands, there's a generic, arch-independent header file
> linux/auxvec.h.  ok, that's reasonable.  so anyone who needs auxvec.h
> content does:
> 
>   #include <linux/auxvec.h>
> 
> but there are *some* architectures (as i read them, only 5 out of 23)
> which need additional content in their auxvec.h files.  and to solve
> that, linux/auxvec.h is augmented to include asm/auxvec.h, which means
> that every *other* architecture (the remaining 18 out of 23) is now
> required to implement an empty auxvec.h header file, for the sake of a
> correct compilation.
> 
> that strikes me as an absurd approach for two reasons:
> 
> 1) it doesn't scale well.  in the extreme case, you might someday have
> a single architecture that requires something in the way of extra
> content in a header file, at which point you'll have to add n-1 dummy
> header files to all of the other architectures.
> 
> 2) more importantly, the definition of an architecture's header files
> is being dictated by a *totally different architecture*.  that's just
> grotesque.
> 
> there *has* to be a cleaner solution.  what the above is doing is just
> ugly.

You could start doing tricks like CONFIG_ARCH_HAS_ASM_AUXVEC_H, but KISS 
is a very important point - and the current approach simply works.

> rday

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux