From: Dong Aisheng <aisheng.dong@freescale.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: Dong Aisheng <dongas86@gmail.com>,
Shawn Guo <shawn.guo@linaro.org>,
Dong Aisheng-B29396 <B29396@freescale.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/1] net: phylib: remove the length limitation of mii bus id
Date: Wed, 21 Mar 2012 19:26:56 +0800 [thread overview]
Message-ID: <20120321112655.GB4905@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <4F688F01.40604@openwrt.org>
On Tue, Mar 20, 2012 at 10:06:57PM +0800, Florian Fainelli wrote:
> Hi,
>
> Le 03/20/12 11:53, Dong Aisheng a écrit :
> > On Tue, Mar 20, 2012 at 1:32 AM, Shawn Guo<shawn.guo@linaro.org> wrote:
> >> On 20 March 2012 12:23, Dong Aisheng<b29396@freescale.com> wrote:
> >>> From: Dong Aisheng<dong.aisheng@linaro.org>
> >>>
> >>> When convert to dt, the length of old mii bus id (17 bytes) is not
> >>> sufficent to use.
> >>> For example, the bus id could be 800f0000.ethernet-1:00 in DT.
> >>>
> >>> This patch removes the bus id length limitation by changing the
> >>> bus id to a const char pionter and user could dynamically set the
> >>> bus id via kasprintf function call.
> >>>
> >>> Since then no users use MII_BUS_ID_SIZE any more, just remove it.
> >>>
> >>> Signed-off-by: Dong Aisheng<dong.aisheng@linaro.org>
> >>> ---
> >>> The simplest way may just change MII_BUS_ID_SIZE to a more bigger size,
> >>> but i'm not sure that's gonna be accepted.
> >>
> >> The simplest fix has been applied on -next tree as below.
> >>
> > Oh, i missed it, seems my patch covers that change.
> > But that patch only fixed wrong phy_name buffer length issue.
> > My patch is totally remove the length limitation of bus id and phy_name
> > or the bus id name will be truncated if it's longer than MII_BUS_ID_SIZE
> > which is not a comfortable limitation.
>
> Then just increase the bus id size locally for your driver. Drivers that
> can live with a static allocation are better of using it.
>
That's the common part, can not change it locally by driver.
Or we can change MII_BUS_ID_SIZE to a more big size in common code,
maybe 30 bytes, but when is the end?
> Your patch completely missed testing the return value of kasprintf(),
> and its return value can be NULL, please fix this at least.
>
Yes, thanks for the reminder.
I will fix it.
Regards
Dong Aisheng
next prev parent reply other threads:[~2012-03-21 11:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 4:23 Dong Aisheng
2012-03-20 8:32 ` Shawn Guo
2012-03-20 10:53 ` Dong Aisheng
2012-03-20 14:06 ` Florian Fainelli
2012-03-21 11:26 ` Dong Aisheng [this message]
2012-03-20 4:27 Dong Aisheng
2012-03-20 7:50 ` Wolfram Sang
2012-03-20 8:13 ` Dong Aisheng-B29396
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=20120321112655.GB4905@shlinux2.ap.freescale.net \
--to=aisheng.dong@freescale.com \
--cc=B29396@freescale.com \
--cc=davem@davemloft.net \
--cc=dongas86@gmail.com \
--cc=florian@openwrt.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shawn.guo@linaro.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
all inboxes | Powered by JetHome®