[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZHB4OETge9T6g5zHqMdd=uO3_-jbMMmzf+vRn=fJQHiQ@mail.gmail.com>
Date: Fri, 1 Dec 2023 14:18:29 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Jorge Ramirez <jorge@...ndries.io>
Cc: ulf.hansson@...aro.org, CLoehle@...erstone.com,
adrian.hunter@...el.com, jinpu.wang@...os.com, hare@...e.de,
beanhuo@...ron.com, asuk4.q@...il.com, yangyingliang@...wei.com,
yibin.ding@...soc.com, victor.shih@...esyslogic.com.tw,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: rpmb: fixes pause retune on all RPMB partitions.
On Fri, Dec 1, 2023 at 10:47 AM Jorge Ramirez <jorge@...ndries.io> wrote:
> On Fri, Dec 1, 2023 at 10:39 AM Jorge Ramirez-Ortiz, Foundries <jorge@...ndries.io> wrote:
>> On 01/12/23 10:28:52, Linus Walleij wrote:
>> > > + const unsigned int mask = EXT_CSD_PART_CONFIG_ACC_RPMB;
>> > > int ret = 0;
>> > >
>> > > - if (part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) {
>> > > + if (part_type & mask == mask) {
>> >
>> > That looks complex, can't we just:
>> >
>> > if (part_type & EXT_CSD_PART_CONFIG_ACC_RPMB)?
>>
>>
>> I chose to mention the mask nature of the field for clarity - just in
>> case - but I'd much rather do your suggestion. So will do :)
>
>
> sorry no, I mispoke (I like clean code so yours looked neat)
> we have to compare against EXT_CSD_PART_CONFIG_ACC_RPMB
> bitfield since part_type could be EXT_CSD_PART_CONFIG_ACC_BOOT0 (0x1)
> in which case we have to skip it.
Aha those defines are not flags but enumerators. I get it.
Yours,
Linus Walleij
Powered by blists - more mailing lists