public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Russell King <linux@armlinux.org.uk>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	"David S. Miller" <davem@davemloft.net>,
	"moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support" 
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v5 3/4] net: phy: Allow pre-declaration of MDIO devices
Date: Mon, 6 Feb 2017 14:48:08 +0100	[thread overview]
Message-ID: <20170206134808.GG32506@lunn.ch> (raw)
In-Reply-To: <20170204210245.14812-4-f.fainelli@gmail.com>

> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index 8a57f0b1242d..8850fcaf50db 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -501,6 +501,7 @@ struct platform_device_id {
>  	kernel_ulong_t driver_data;
>  };
>  
> +#define MDIO_NAME_SIZE		32

...

> +struct mdio_board_info {
> +	const char	*bus_id;
> +	char		modalias[MDIO_NAME_SIZE];
> +

I think it might be better to use MII_BUS_ID_SIZE. These are all
related, so using one define should avoid surprise buffer overruns,
truncation's.

	Andrew

  reply	other threads:[~2017-02-06 13:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-04 21:02 [PATCH net-next v5 0/4] net: dsa: Support for pdata in dsa2 Florian Fainelli
2017-02-04 21:02 ` [PATCH net-next v5 1/4] net: dsa: Rename and export dev_to_net_device() Florian Fainelli
2017-02-04 21:02 ` [PATCH net-next v5 2/4] net: dsa: Add support for platform data Florian Fainelli
2017-02-04 21:02 ` [PATCH net-next v5 3/4] net: phy: Allow pre-declaration of MDIO devices Florian Fainelli
2017-02-06 13:48   ` Andrew Lunn [this message]
2017-02-06 19:08     ` Florian Fainelli
2017-02-06 14:04   ` Andrew Lunn
2017-02-06 19:17     ` Florian Fainelli
2017-02-04 21:02 ` [PATCH net-next v5 4/4] ARM: orion: Register DSA switch as a MDIO device Florian Fainelli

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=20170206134808.GG32506@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    /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