lkml.org 
[lkml]   [2023]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1 2/5] mtd: rawnand: meson: replace GENMASK() macro with define
From


On 12.04.2023 13:06, David Laight wrote:
> From: Arseniy Krasnov
>> Sent: 12 April 2023 07:17
>> Subject: [PATCH v1 2/5] mtd: rawnand: meson: replace GENMASK() macro with define
>>
> ...
>> len = mtd->writesize + mtd->oobsize;
>> - cmd = (len & GENMASK(13, 0)) | scrambler | DMA_DIR(dir);
>> + cmd = (len & NFC_CMD_RAW_LEN) | scrambler | DMA_DIR(dir);
>> writel(cmd, nfc->reg_base + NFC_REG_CMD);
>
> What is the point of the mask?
> If the length is too big it just generates a different
> 'hard to debug' error.
> If the length can't be too bit there is no point masking it.

Exactly, thanks for pointing!

Thanks, Arseniy

>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>

\
 
 \ /
  Last update: 2023-04-12 12:15    [W:0.061 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site