All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Krzysztof Halasa <khalasa@piap.pl>
Subject: Re: [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as resource
Date: Tue, 28 May 2019 15:21:36 +0200	[thread overview]
Message-ID: <20190528132136.GC18059@lunn.ch> (raw)
In-Reply-To: <da114d45-5649-b525-039a-470f45d50386@cogentembedded.com>

> >>  /* Built-in 10/100 Ethernet MAC interfaces */
> >>+static struct resource fsg_eth_npeb_resources[] = {
> >>+	{
> >>+		.start		= IXP4XX_EthB_BASE_PHYS,
> >>+		.end		= IXP4XX_EthB_BASE_PHYS + 0x0fff,
> >
> >Hi Linus
> >
> >It is a long time since i did resources. But i was always told to use
> >the SZ_ macros, so SZ_4K. I also think 0xfff is wrong, it should be
> >0x1000.
> 
>    No, 0x0fff is correct there, 0x1000 is not...

Yes, the DEFINE_RES_* macros make this clear. The code should be
changed to use them, and then SZ_ macros can be used, since
DEFINE_RES_NAMED() does a - 1.

	Andrew

  reply	other threads:[~2019-05-28 13:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 16:20 [PATCH 0/8] Xscale IXP4xx ethernet refurbishing Linus Walleij
2019-05-24 16:20 ` [PATCH 1/8] net: ethernet: ixp4xx: Standard module init Linus Walleij
2019-05-24 19:46   ` Andrew Lunn
2019-05-29  7:10     ` Linus Walleij
2019-05-24 16:20 ` [PATCH 2/8] net: ethernet: ixp4xx: Use distinct local variable Linus Walleij
2019-05-24 16:20 ` [PATCH 3/8] net: ehernet: ixp4xx: Use devm_alloc_etherdev() Linus Walleij
2019-05-24 19:52   ` Andrew Lunn
2019-05-24 16:20 ` [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as resource Linus Walleij
2019-05-24 20:00   ` Andrew Lunn
2019-05-25  9:14     ` Sergei Shtylyov
2019-05-28 13:21       ` Andrew Lunn [this message]
2019-05-24 16:20 ` [PATCH 5/8] net: ethernet: ixp4xx: Get port ID from base address Linus Walleij
2019-05-24 16:20 ` [PATCH 6/8] net: ethernet: ixp4xx: Use parent dev for DMA pool Linus Walleij
2019-05-24 16:20 ` [PATCH 7/8] net: ethernet: ixp4xx: Add DT bindings Linus Walleij
2019-05-24 20:06   ` Andrew Lunn
2019-05-29  7:13     ` Linus Walleij
2019-05-24 16:20 ` [PATCH 8/8] net: ethernet: ixp4xx: Support device tree probing Linus Walleij
2019-05-24 20:21   ` Andrew Lunn

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=20190528132136.GC18059@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=khalasa@piap.pl \
    --cc=linus.walleij@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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 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.