From: Sam Ravnborg <sam@ravnborg.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org, jeff@garzik.org,
John Rigby <jrigby@freescale.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] [Rev2] MPC5121 FEC support
Date: Tue, 17 Jun 2008 23:00:55 +0200 [thread overview]
Message-ID: <20080617210055.GA13468@uranus.ravnborg.org> (raw)
In-Reply-To: <485818AA.8090701@freescale.com>
On Tue, Jun 17, 2008 at 03:03:54PM -0500, Scott Wood wrote:
> Sam Ravnborg wrote:
> >On Tue, Jun 17, 2008 at 02:33:28PM -0500, Scott Wood wrote:
> >>John Rigby wrote:
> >>>config FS_ENET
> >>> tristate "Freescale Ethernet Driver"
> >>>- depends on CPM1 || CPM2
> >>>+ depends on CPM1 || CPM2 || FS_ENET_MPC5121_FEC
> >>> select MII
> >>> select PHYLIB
> >>>
> >>>+config FS_ENET_MPC5121_FEC
> >>>+ bool "Freescale MPC512x FEC driver"
> >>>+ depends on PPC_MPC512x
> >>>+ select FS_ENET
> >>>+ select PPC_CPM_NEW_BINDING
> >>>+ default y
> >>No default y.
> >I by the way do not see the need for the prompt of FS_ENET.
>
> Agreed, especially since it's overly broad (there is Freescale ethernet
> hardware that this driver doesn't support). We'd need to change depends
> into selects in the more specific entries.
>
> >Do you ever want to change it if one of the dependencies
> >are selected?
>
> Do you mean if CPM1 or CPM2 is selected? Yes, it's quite possible that
> the user has no need for the CPM ethernet and would rather reclaim the
> memory (especially on CPM1, which has boards as small as 8MiB).
I took a closer look now.
And I can see that FS_ENET is indeed a driver and CPM1, CPM2, FS_ENET_MPC5121_FEC
are all booleans that say that it may make sense to use this driver.
But I was misguided by:
>+config FS_ENET_MPC5121_FEC
>+ select FS_ENET
This is not good.
In general when you select a symbol that has dependencies you are almost
always on the wrong track.
Use a dependency here with a sane default - then people can
set it to 'n' if they really do not want this driver.
Spreading selects too much is just causing you pain in the long run.
Sam
next prev parent reply other threads:[~2008-06-17 21:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 19:08 [PATCH] [Rev2] MPC5121 FEC support John Rigby
2008-06-17 19:22 ` Sam Ravnborg
2008-06-17 19:31 ` Scott Wood
2008-06-17 19:46 ` Sam Ravnborg
2008-06-17 19:43 ` John Rigby
2008-06-17 19:57 ` Sam Ravnborg
2008-06-17 19:33 ` Scott Wood
2008-06-17 19:57 ` Sam Ravnborg
2008-06-17 20:03 ` Scott Wood
2008-06-17 21:00 ` Sam Ravnborg [this message]
2008-06-17 21:12 ` Scott Wood
2008-06-17 23:52 ` Trent Piepho
2008-06-18 5:00 ` Sam Ravnborg
2008-06-18 15:43 ` Scott Wood
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=20080617210055.GA13468@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=jeff@garzik.org \
--cc=jrigby@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=scottwood@freescale.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;
as well as URLs for NNTP newsgroup(s).