From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] net-next: stmmac: add adjust_link function
Date: Wed, 17 May 2017 10:21:29 +0200 [thread overview]
Message-ID: <20170517082129.GB19202@Red> (raw)
In-Reply-To: <b54c0535-f3b2-6184-1422-ec9eed22e67f@gmail.com>
On Tue, May 16, 2017 at 09:43:04AM -0700, Florian Fainelli wrote:
> On 05/15/2017 04:41 AM, Corentin Labbe wrote:
> > My dwmac-sun8i serie will add some if (has_sun8i) to
> > stmmac_adjust_link()
> > Since the current stmmac_adjust_link() alreaady have lots of if (has_gmac/gmac4),
> > It is now better to create an adjust_link() function for each dwmac.
>
> Is it really, because the diffstat really seems to indicate otherwise
> and by looking at the code, I am definitively not convinced this is an
> improvement other the current code.
>
> >
> > So this patch add an adjust_link() function pointer, and move code out
> > of stmmac_adjust_link to it.
>
> Can't we keep the existing adjust_link() function and just have a
> different one for dwmac-sun8i that either re-uses portions of the
> existing, or duplicate just what it needs?
>
I found another way, removing port/speed variable and use new struct links member speed10/speed100/speed1000/speedmask
I will make the current adjust_link function simplier. (and no if has_xxx for any dwmac type)
I will send that try soon.
prev parent reply other threads:[~2017-05-17 8:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 11:41 [PATCH 1/2] net-next: stmmac: add adjust_link function Corentin Labbe
2017-05-15 11:41 ` [PATCH 2/2] net-next: stmmac: remove struct mac_link Corentin Labbe
2017-05-16 16:38 ` [PATCH 1/2] net-next: stmmac: add adjust_link function David Miller
2017-05-16 16:43 ` Florian Fainelli
2017-05-16 19:04 ` Corentin Labbe
2017-05-17 8:21 ` Corentin Labbe [this message]
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=20170517082129.GB19202@Red \
--to=clabbe.montjoie@gmail.com \
--cc=alexandre.torgue@st.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.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).