[lkml]   [2012]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Circular dependency between <linux/kernel.h> and <asm/bug.h> on ARM
    On Sun, Jan 1, 2012 at 6:44 PM, Ben Hutchings <> wrote:
    > Commit 87e040b6456fd3416a1f6831c1eedaef5c0a94ff ("ARM: 7017/1: Use
    > generic BUG() handler") makes BUG() use BUILD_BUG_ON().  However,
    > BUILD_BUG_ON() is not defined in <linux/bug.h> but in <linux/kernel.h>.
    > arch/include/asm/bug.h does not include <linux/kernel.h> and *cannot* do
    > so because the latter already includes <asm/bug.h>.

    Sure it can, but it's not ideal. Since the BUILD_BUG_ON is only used
    in bug.h in a #define, it will be resolved below the includes of
    either so there should be no ordering issue between the two.

    I coincidentally posted a patch earlier to do just that, I didn't see
    your email until later.

    > Maybe BUILD_BUG_ON() should be moved out to a header of its own, or else
    > this particular use should be moved to some other file.  This needs to
    > be fixed somehow, as it obviously leads to build failures, e.g.:

    Or perhaps moving BUILD_BUG_ON to include/linux/bug.h?

    The quickest fix for now might be to take out the BUILD_BUG_ON(),
    especially so close to 3.2-final.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2012-01-02 08:03    [W:0.020 / U:5.248 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site