[PATCH v4 03/11] net: mvmdio: use GENMASK for masks

David Laight David.Laight at ACULAB.COM
Mon Jun 19 04:57:51 PDT 2017


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.

	David




More information about the linux-arm-kernel mailing list