[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 04 Apr 2014 10:23:17 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Stanimir Varbanov <svarbanov@...sol.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>
CC: linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 2/9] crypto: qce: Add register defines
Minor nitpicks.
On 03/04/14 17:17, Stanimir Varbanov wrote:
> +#define REQ_SIZE 17 /* bit 20-17 */
I would have defined macros like this with _SHIFT at the end, something
like this:
#define REQ_SIZE_SHIFT 17
> +#define REQ_SIZE_MASK (0xf << REQ_SIZE)
You could possibly use GENMASK macro for this, its much readable, in
*some cases* it could reduce few more lines in header too.
#define REQ_SIZE_MASK GENMASK(20, 17)
My comments are equally applicable to most macros in this header file.
--
srini
Linaro Qualcomm Landing Team.
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists