All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 net-next 07/10] net: korina: Add support for device tree
Date: Fri, 16 Apr 2021 09:12:26 +0200	[thread overview]
Message-ID: <20210416071226.GA5257@alpha.franken.de> (raw)
In-Reply-To: <YHjQ8ylbX2X+QJHG@lunn.ch>

On Fri, Apr 16, 2021 at 01:49:07AM +0200, Andrew Lunn wrote:
> > -	memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
> > +	if (mac_addr) {
> > +		ether_addr_copy(dev->dev_addr, mac_addr);
> > +	} else {
> > +		u8 ofmac[ETH_ALEN];
> > +
> > +		if (of_get_mac_address(pdev->dev.of_node, ofmac) == 0)
> > +			ether_addr_copy(dev->dev_addr, ofmac);
> 
> You should be able to skip the ether_addr_copy() by passing 
> dev->dev_addr directly to of_get_mac_address().

good point

> 
> > +		else
> > +			eth_hw_addr_random(dev);
> > +	}
> >  
> >  	lp->rx_irq = platform_get_irq_byname(pdev, "korina_rx");
> >  	lp->tx_irq = platform_get_irq_byname(pdev, "korina_tx");
> > @@ -1146,8 +1157,21 @@ static int korina_remove(struct platform_device *pdev)
> >  	return 0;
> >  }
> >  
> > +#ifdef CONFIG_OF
> > +static const struct of_device_id korina_match[] = {
> > +	{
> > +		.compatible = "idt,3243x-emac",
> 
> You need to document this compatible somewhere under Documentation/devicetree/binding

checkpatch hinted to put it in an extra patch, it's patch 10 of this
series and looking at my inbox it didn't get through :-(.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2021-04-16  7:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 23:06 [PATCH v3 net-next 00/10] net: Korina improvements Thomas Bogendoerfer
2021-04-14 23:06 ` [PATCH v3 net-next 01/10] net: korina: Fix MDIO functions Thomas Bogendoerfer
2021-04-15 23:17   ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 02/10] net: korina: Use devres functions Thomas Bogendoerfer
2021-04-15 23:19   ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 03/10] net: korina: Remove not needed cache flushes Thomas Bogendoerfer
2021-04-15 23:20   ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 04/10] net: korina: Remove nested helpers Thomas Bogendoerfer
2021-04-15 23:21   ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 05/10] net: korina: Use DMA API Thomas Bogendoerfer
2021-04-15 23:23   ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 06/10] net: korina: Only pass mac address via platform data Thomas Bogendoerfer
2021-04-15 23:30   ` Andrew Lunn
2021-04-16  6:54     ` Thomas Bogendoerfer
2021-04-14 23:06 ` [PATCH v3 net-next 07/10] net: korina: Add support for device tree Thomas Bogendoerfer
2021-04-15 23:49   ` Andrew Lunn
2021-04-16  7:12     ` Thomas Bogendoerfer [this message]
2021-04-14 23:06 ` [PATCH v3 net-next 08/10] net: korina: Get mdio input clock via common clock framework Thomas Bogendoerfer
2021-04-15 23:52   ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 09/10] net: korina: Make driver COMPILE_TESTable Thomas Bogendoerfer

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=20210416071226.GA5257@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.