[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPnjgZ1P6bdAGRa-9ZyuNMT7jRAfrH3abWJPkxVeeM7BDKsXTg@mail.gmail.com>
Date: Tue, 3 Jan 2012 14:40:46 -0800
From: Simon Glass <sjg@...omium.org>
To: Stephen Boyd <sboyd@...eaurora.org>
Cc: linux-arm-kernel@...ts.infradead.org,
Ben Hutchings <ben@...adent.org.uk>,
Olof Johansson <olofj@...omium.org>,
Russell King - ARM Linux <linux@....linux.org.uk>,
LKML <linux-kernel@...r.kernel.org>,
Dave Martin <dave.martin@...aro.org>
Subject: Re: [PATCH] ARM: Remove BUILD_BUG_ON from asm/bug.h
Hi Stephen,
On Tue, Jan 3, 2012 at 2:33 PM, Stephen Boyd <sboyd@...eaurora.org> wrote:
> On 01/03/12 10:44, Simon Glass wrote:
>> BUILD_BUG_ON is defined in linux/kernel.h but that is not included by the
>> asm/bug.h header which uses it. This causes a build error:
>>
>> ...include/linux/mtd/map.h: In function 'inline_map_read':
>> ...include/linux/mtd/map.h:408:3: error: implicit declaration of function
>> 'BUILD_BUG_ON' [-Werror=implicit-function-declaration]
>>
>> The check is not essential and is not present for other architectures, so
>> just remove it.
>
> I thought this check was put in place to catch changes to struct
> bug_entry being out of sync with the __BUG macro defined in ARM. Why
> can't we include kernel.h instead? Or can you elaborate some more on why
> we don't need this check in the commit text?
Yes that is the reason, but ARM is not unique in this matter, and
other archs do not have this check. I did suggest a solution in this
thread involving putting the check in a C file instead of header. But
it needs an arch-specific #define to specify the size expected by the
assembler, and has the disadvantage of moving the check away from the
assembler code.
It's not that we don't want this check, more that it is not essential
(since there is currently no mismatch), it is causing problems and it
is risky to try to solve this problem some other way at this late
stage in 3.2. So the easiest thing is to remove it, to match other
archs.
Regards,
Simon
>
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists