From: "Juha Yrjölä" <juha.yrjola@solidboot.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
jlavi@iki.fi, Adrian Bunk <bunk@stusta.de>
Subject: Re: [2.6 patch] make drivers/mtd/cmdlinepart.c:mtdpart_setup() static
Date: Sun, 09 Jul 2006 19:12:36 +0300 [thread overview]
Message-ID: <44B12AF4.6030809@solidboot.com> (raw)
In-Reply-To: <1152436332.25567.12.camel@shinybook.infradead.org>
David Woodhouse wrote:
>>>> --- linux-2.6.17-mm2-full/drivers/mtd/cmdlinepart.c.old 2006-06-26 23:18:39.000000000 +0200
>>>> +++ linux-2.6.17-mm2-full/drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200
>>>> @@ -346,7 +346,7 @@
>>>> *
>>>> * This function needs to be visible for bootloaders.
>>>> */
>>>> -int mtdpart_setup(char *s)
>>>> +static int mtdpart_setup(char *s)
>>> Patch lacks sufficient explanation. Explain the relevance of the comment
>>> immediately above the function declaration, in the context of your
>>> patch. Explain your decision to change the behaviour, but not change the
>>> comment itself.
>> My explanation regarding the relevance of the comment is that it seems
>> to be nonsense.
>>
>> Do I miss something, or why and how should a bootloader access
>> in-kernel functions?
>
> I'm not entirely sure, but allegedly it does -- Juha, can you elaborate?
Our bootloader doesn't access in-kernel functions, for obvious reasons.
The comment in cmdlinepart.c is unfortunately inaccurate. The
bootloader does need a mechanism for passing the partition table to the
kernel, though. Our partition table is generated on-the-fly by the
bootloader to guarantee that each partition gets a certain number of
non-bad NAND blocks.
We used to do this by passing the partition table in a string compatible
with cmdlinepart syntax. The kernel NAND driver then just passed the
string received from the bootloader to mtdpart_setup().
Nowadays there is a better way of doing this, so as far as we are
concerned, mtdpart_setup() can be made static again. We'll migrate our
MTD drivers to use the platform_data mechanism instead.
Cheers,
Juha
WARNING: multiple messages have this Message-ID (diff)
From: "Juha Yrjölä" <juha.yrjola@solidboot.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Adrian Bunk <bunk@stusta.de>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
jlavi@iki.fi
Subject: Re: [2.6 patch] make drivers/mtd/cmdlinepart.c:mtdpart_setup() static
Date: Sun, 09 Jul 2006 19:12:36 +0300 [thread overview]
Message-ID: <44B12AF4.6030809@solidboot.com> (raw)
In-Reply-To: <1152436332.25567.12.camel@shinybook.infradead.org>
David Woodhouse wrote:
>>>> --- linux-2.6.17-mm2-full/drivers/mtd/cmdlinepart.c.old 2006-06-26 23:18:39.000000000 +0200
>>>> +++ linux-2.6.17-mm2-full/drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200
>>>> @@ -346,7 +346,7 @@
>>>> *
>>>> * This function needs to be visible for bootloaders.
>>>> */
>>>> -int mtdpart_setup(char *s)
>>>> +static int mtdpart_setup(char *s)
>>> Patch lacks sufficient explanation. Explain the relevance of the comment
>>> immediately above the function declaration, in the context of your
>>> patch. Explain your decision to change the behaviour, but not change the
>>> comment itself.
>> My explanation regarding the relevance of the comment is that it seems
>> to be nonsense.
>>
>> Do I miss something, or why and how should a bootloader access
>> in-kernel functions?
>
> I'm not entirely sure, but allegedly it does -- Juha, can you elaborate?
Our bootloader doesn't access in-kernel functions, for obvious reasons.
The comment in cmdlinepart.c is unfortunately inaccurate. The
bootloader does need a mechanism for passing the partition table to the
kernel, though. Our partition table is generated on-the-fly by the
bootloader to guarantee that each partition gets a certain number of
non-bad NAND blocks.
We used to do this by passing the partition table in a string compatible
with cmdlinepart syntax. The kernel NAND driver then just passed the
string received from the bootloader to mtdpart_setup().
Nowadays there is a better way of doing this, so as far as we are
concerned, mtdpart_setup() can be made static again. We'll migrate our
MTD drivers to use the platform_data mechanism instead.
Cheers,
Juha
next prev parent reply other threads:[~2006-07-09 16:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-26 22:02 [2.6 patch] make drivers/mtd/cmdlinepart.c:mtdpart_setup() static Adrian Bunk
2006-06-27 13:49 ` David Woodhouse
2006-06-27 13:49 ` David Woodhouse
2006-06-29 17:32 ` Adrian Bunk
2006-06-29 17:32 ` Adrian Bunk
2006-07-09 9:12 ` David Woodhouse
2006-07-09 9:12 ` David Woodhouse
2006-07-09 16:12 ` Juha Yrjölä [this message]
2006-07-09 16:12 ` Juha Yrjölä
2006-07-10 10:56 ` Sergei Shtylyov
2006-07-10 10:56 ` Sergei Shtylyov
2006-07-10 11:37 ` David Woodhouse
2006-07-10 11:37 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2006-11-25 19:15 Adrian Bunk
2006-11-25 19:15 ` Adrian Bunk
2006-11-28 22:19 ` David Woodhouse
2006-11-30 18:45 ` Andy Isaacson
2006-11-30 18:45 ` Andy Isaacson
2006-12-01 13:41 ` Jarkko Lavinen
2006-12-01 13:41 ` Jarkko Lavinen
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=44B12AF4.6030809@solidboot.com \
--to=juha.yrjola@solidboot.com \
--cc=bunk@stusta.de \
--cc=dwmw2@infradead.org \
--cc=jlavi@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.