netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: David.Laight@ACULAB.COM
Cc: antoine.tenart@free-electrons.com, jason@lakedaemon.net,
	andrew@lunn.ch, gregory.clement@free-electrons.com,
	sebastian.hesselbarth@gmail.com, f.fainelli@gmail.com,
	thomas.petazzoni@free-electrons.com, nadavh@marvell.com,
	mw@semihalf.com, linux@armlinux.org.uk, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 03/11] net: mvmdio: use GENMASK for masks
Date: Mon, 19 Jun 2017 10:49:26 -0400 (EDT)	[thread overview]
Message-ID: <20170619.104926.732811694966999045.davem@davemloft.net> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD0025C9A@AcuExch.aculab.com>

From: David Laight <David.Laight@ACULAB.COM>
Date: Mon, 19 Jun 2017 11:57:51 +0000

> From: Antoine Tenart
>> Sent: 14 June 2017 16:49
>> Cosmetic patch to use the GENMASK helper for masks.
> ...
>> -	ret = val & 0xFFFF;
>> +	ret = val & GENMASK(15, 0);
> 
> My 2c: It isn't at all clear to me that changes like this in anyway
> improve the code readability.
> In some sense the '15' should be a named constant - but that just makes
> it even less obvious what is going on.

I agree, a hexidecimal mask of 0xffff is 100 times more readable and
understandable to me than "SOME_MACRO(x, y)".

  reply	other threads:[~2017-06-19 14:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 15:49 [PATCH v4 00/11] net: mvmdio: add xMDIO xSMI support Antoine Tenart
2017-06-14 15:49 ` [PATCH v4 01/11] net: mvmdio: reorder headers alphabetically Antoine Tenart
2017-06-14 15:49 ` [PATCH v4 02/11] net: mvmdio: use tabs for defines Antoine Tenart
2017-06-14 15:49 ` [PATCH v4 03/11] net: mvmdio: use GENMASK for masks Antoine Tenart
2017-06-19 11:57   ` David Laight
2017-06-19 14:49     ` David Miller [this message]
2017-06-14 15:49 ` [PATCH v4 04/11] net: mvmdio: remove duplicate locking Antoine Tenart
2017-06-14 17:01   ` Florian Fainelli
2017-06-14 15:49 ` [PATCH v4 05/11] net: mvmdio: introduce an ops structure Antoine Tenart
2017-06-14 17:02   ` Florian Fainelli
2017-06-14 15:49 ` [PATCH v4 06/11] net: mvmdio: put the poll intervals in the " Antoine Tenart
2017-06-14 17:02   ` Florian Fainelli
2017-06-14 15:49 ` [PATCH v4 07/11] net: mvmdio: check the MII_ADDR_C45 bit is not set for smi operations Antoine Tenart
2017-06-14 17:02   ` Florian Fainelli
2017-06-14 15:49 ` [PATCH v4 08/11] net: mvmdio: add xmdio xsmi support Antoine Tenart
2017-06-14 17:03   ` Florian Fainelli
2017-06-14 15:49 ` [PATCH v4 09/11] net: mvmdio: simplify the smi read and write error paths Antoine Tenart
2017-06-14 17:04   ` Florian Fainelli
2017-06-14 15:49 ` [PATCH v4 10/11] dt-bindings: orion-mdio: document the new xmdio compatible Antoine Tenart
2017-06-14 16:35   ` Andrew Lunn
2017-06-15  6:55     ` Antoine Tenart
2017-06-15 13:12       ` Andrew Lunn
2017-06-15 13:22         ` Antoine Tenart
2017-06-14 15:49 ` [PATCH v4 11/11] arm64: marvell: dts: add xmdio nodes for 7k/8k Antoine Tenart

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=20170619.104926.732811694966999045.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=David.Laight@ACULAB.COM \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@free-electrons.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=mw@semihalf.com \
    --cc=nadavh@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.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).