mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Tao Ren <taoren@fb.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Maxim Mikityanskiy <maximmi@mellanox.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Samuel Mendoza-Jonas <sam@mendozajonas.com>,
	Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH net 1/2] net: add eth_addr_inc in etherdevice.h
Date: Tue, 23 Apr 2019 16:15:02 -0700	[thread overview]
Message-ID: <20190423161502.5d3e9c36@cakuba.netronome.com> (raw)
In-Reply-To: <20190423224138.1295-1-taoren@fb.com>

On Tue, 23 Apr 2019 22:41:56 +0000, Tao Ren wrote:
> Add eth_addr_inc function in etherdevice.h to increment MAC address. One
> of the use cases is in ncsi stack, where the host's MAC address needs to
> be incremented to get BMC's MAC address.
> 
> Signed-off-by: Tao Ren <taoren@fb.com>

Please squash this patch with the next one, IMHO they form a single
logical change together.

>  include/linux/etherdevice.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> index e2f3b21cd72a..d48e3a724c54 100644
> --- a/include/linux/etherdevice.h
> +++ b/include/linux/etherdevice.h
> @@ -448,6 +448,19 @@ static inline void eth_addr_dec(u8 *addr)
>  	u64_to_ether_addr(u, addr);
>  }
>  
> +/**
> + * eth_addr_inc - Increment the given MAC address
> + *
> + * @addr: Pointer to a six-byte array containing Ethernet address to increment

Please see:  Documentation/doc-guide/kernel-doc.rst

Here we need:
 - "()" after function name;
 - no extra line between function name and argument description.

> + */
> +static inline void eth_addr_inc(u8 *addr)
> +{
> +	u64 u = ether_addr_to_u64(addr);
> +
> +	u++;
> +	u64_to_ether_addr(u, addr);
> +}
> +
>  /**
>   * is_etherdev_addr - Tell if given Ethernet address belongs to the device.
>   * @dev: Pointer to a device structure


  reply	other threads:[~2019-04-23 23:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 22:41 Tao Ren
2019-04-23 23:15 ` Jakub Kicinski [this message]
2019-04-24  0:59   ` Tao Ren
2019-04-24  1:24     ` Jakub Kicinski
  -- strict thread matches above, loose matches on Subject: below --
2019-04-23 21:20 Tao Ren

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=20190423161502.5d3e9c36@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=andrew@aj.id.au \
    --cc=bgolaszewski@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=joel@jms.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maximmi@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=sam@mendozajonas.com \
    --cc=taoren@fb.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

all inboxes | Powered by JetHome®