netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jeremy Linton <jeremy.linton@arm.com>
Cc: netdev@vger.kernel.org, steve.glendinning@shawell.net,
	sergei.shtylyov@cogentembedded.com
Subject: Re: [PATCH 2/2] net/smsc911x: Move interrupt allocation to open/stop
Date: Thu, 1 Sep 2016 21:45:10 +0200	[thread overview]
Message-ID: <20160901194510.GB13292@lunn.ch> (raw)
In-Reply-To: <8305921f-9b9a-459b-2452-7c4e63057e8f@arm.com>

On Thu, Sep 01, 2016 at 01:47:44PM -0500, Jeremy Linton wrote:
> Hi Andrew,
> 
> 	Thanks for taking a look at this!
> 
> On 09/01/2016 12:06 PM, Andrew Lunn wrote:
> >Hi Jeremy
> >
> >Please don't add forward references. Move the function earlier in the
> >file.
> 
> Ok, but I thought it was a fairly large move due to further
> dependent functions..

There are a few other options, like moving smsc911x_open() rather than
the interrupt handler.

And i would suggest what ever you do, make it a separate patch. A
patch which says: No functional changes, just move functions around as
needed by later patches, is going to be quick and easy to review.

> >>+	netif_carrier_off(dev);
> >
> >What has this change got to do with interrupt handling?
> 
> 	This is a whoops, it should be in the previous patch..

Or a patch of its own? You also needs to be careful with ordering
against the phy_connect.

> >>@@ -2479,38 +2491,18 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
> >> 	if (retval < 0)
> >> 		goto out_disable_resources;
> >>
> >>-	/* configure irq polarity and type before connecting isr */
> >>-	if (pdata->config.irq_polarity == SMSC911X_IRQ_POLARITY_ACTIVE_HIGH)
> >>-		intcfg |= INT_CFG_IRQ_POL_;
> >>-
> >>-	if (pdata->config.irq_type == SMSC911X_IRQ_TYPE_PUSH_PULL)
> >>-		intcfg |= INT_CFG_IRQ_TYPE_;
> >>-
> >>-	smsc911x_reg_write(pdata, INT_CFG, intcfg);
> >
> >
> >I see these removes, but where are the adds?
> 
> 
> 	The functionality is duplicated in open, when the IRQ handler is tested.

Ah, it is obfusticated by SMC_SET_IRQ_CFG().

If you say it is duplicated, how about a separate patch removing it,
with a clear pointer to where the duplicate is.

     Andrew

  reply	other threads:[~2016-09-01 21:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 16:25 [PATCH 0/2] net: smsc911x: Move phy and interrupt config Jeremy Linton
2016-09-01 16:25 ` [PATCH 1/2] net: smsc911x: Fix register_netdev, phy startup, driver unload ordering Jeremy Linton
2016-09-01 16:58   ` Andrew Lunn
2016-09-01 18:42     ` Jeremy Linton
2016-09-01 19:22       ` Andrew Lunn
2016-09-01 16:25 ` [PATCH 2/2] net/smsc911x: Move interrupt allocation to open/stop Jeremy Linton
2016-09-01 17:06   ` Andrew Lunn
2016-09-01 18:47     ` Jeremy Linton
2016-09-01 19:45       ` Andrew Lunn [this message]
2016-09-01 20:39         ` Jeremy Linton

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=20160901194510.GB13292@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=jeremy.linton@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=steve.glendinning@shawell.net \
    /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).