[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4c85bfc-9e76-4dcd-ab09-699d50fc73a4@oss.qualcomm.com>
Date: Fri, 25 Oct 2024 20:13:09 +0200
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Md Sadre Alam <quic_mdalam@...cinc.com>, broonie@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
andersson@...nel.org, konradybcio@...nel.org,
miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
manivannan.sadhasivam@...aro.org, linux-arm-msm@...r.kernel.org,
linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Cc: quic_srichara@...cinc.com, quic_varada@...cinc.com
Subject: Re: [PATCH v12 5/8] mtd: rawnand: qcom: use FIELD_PREP and GENMASK
On 21.10.2024 1:56 PM, Md Sadre Alam wrote:
> Use the bitfield macro FIELD_PREP, and GENMASK to
> do the shift and mask in one go. This makes the code
> more readable.
>
> Signed-off-by: Md Sadre Alam <quic_mdalam@...cinc.com>
> ---
[...]
> + host->cfg1 = FIELD_PREP(NAND_RECOVERY_CYCLES_MASK, 7) |
> + FIELD_PREP(BAD_BLOCK_BYTE_NUM_MASK, bad_block_byte) |
> + FIELD_PREP(BAD_BLOCK_IN_SPARE_AREA, 0) |
> + FIELD_PREP(WR_RD_BSY_GAP_MASK, 2) |
> + FIELD_PREP(WIDE_FLASH, wide_bus) |
> + FIELD_PREP(ENABLE_BCH_ECC, host->bch_enabled);
CS_ACTIVE_BSY is no longer set (not a functional change, but it looks
omitted on accident)
The rest looks good, thank you!
Reviewed-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Konrad
Powered by blists - more mailing lists