From: mike@compulab.co.il (Mike Rapoport)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] omap: move detection of NAND CS to common-board-devices
Date: Wed, 04 May 2011 10:17:13 +0300 [thread overview]
Message-ID: <4DC0FD79.2020005@compulab.co.il> (raw)
In-Reply-To: <20110504064614.GG27860@atomide.com>
On 05/04/11 09:46, Tony Lindgren wrote:
> * Mike Rapoport <mike@compulab.co.il> [110504 09:35]:
>> On 05/04/11 07:10, Oleg Drokin wrote:
>>> Ok, so here's a simple patch to save everyone trouble, I guess.
>>>
>>> Though on the other hand I can imagine that perhaps including this generic common-board-devices.c
>>> might not be desirable for people that don't use anything from that file.
>>
>> Since the common-board-devices.c has TWL initialization I doubt there would a
>> board that does not use it at all...
>>
>>> Would it be a better idea to split it to a file-per-feature?
>>
>> Splitting the common-board-devices into a file-per-feature will diminish its
>> added value, IMO.
>> We can either continue to use #ifdef CONFIG_SOMETHING in both
>> common-board-devices.[ch] as your fix proposes or just drop #ifdefs and inlines
>> from the header.
>> Tony, what is your preference?
>
> We should consider the code size too.. Maybe see if you can make them
> weak instead of the ifdefs?
Unless I completely misunderstand how weak works, we'll still have ifdefs in .c
file, i.e.
common-board-devices.h:
void __omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts)
{
}
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts)
__attribute__((weak, alias("__omap_nand_flash_init")));
common-board-devices.c:
#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts)
{
...
}
#endif
Yet, we can keep the ifdefs only in common-board-devices.c and get rid if
inlines in the header.
Also, all the code in common-board-devices.c is __init, so it's eventually
dropped in runtime
> Tony
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2011-05-04 7:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-24 22:09 [PATCH 0/4] omap: cleanup board files Mike Rapoport
2011-04-24 22:09 ` [PATCH 1/4] omap: consolidate touch screen initialization among different boards Mike Rapoport
2011-05-04 3:10 ` Oleg Drokin
2011-05-04 14:02 ` Thomas Weber
2011-05-04 15:10 ` Igor Grinberg
2011-04-24 22:09 ` [PATCH 2/4] omap: use common initialization for PMIC i2c bus Mike Rapoport
2011-04-24 22:09 ` [PATCH 3/4] omap: move detection of NAND CS to common-board-devices Mike Rapoport
2011-05-04 3:12 ` Oleg Drokin
2011-05-04 4:10 ` Oleg Drokin
2011-05-04 6:38 ` Mike Rapoport
2011-05-04 6:46 ` Tony Lindgren
2011-05-04 7:17 ` Mike Rapoport [this message]
2011-05-04 8:38 ` Tony Lindgren
2011-05-04 15:54 ` Oleg Drokin
2011-04-24 22:09 ` [PATCH 4/4] omap: musb: introduce default baord config Mike Rapoport
2011-04-27 4:23 ` Oleg Drokin
2011-04-27 7:23 ` Mike Rapoport
2011-04-28 14:18 ` Russell King - ARM Linux
2011-04-28 16:21 ` Oleg Drokin
2011-04-28 16:28 ` Russell King - ARM Linux
2011-04-28 16:36 ` Oleg Drokin
2011-05-02 14:20 ` Tony Lindgren
2011-05-02 14:25 ` Felipe Balbi
2011-05-03 7:50 ` Tony Lindgren
2011-04-27 8:56 ` [PATCH v2 4/4] omap: musb: introduce default board config Mike Rapoport
2011-05-03 8:24 ` Felipe Balbi
2011-05-02 13:57 ` [PATCH 0/4] omap: cleanup board files Mike Rapoport
2011-05-02 14:22 ` Tony Lindgren
2011-05-03 10:25 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DC0FD79.2020005@compulab.co.il \
--to=mike@compulab.co.il \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).