Re: [PATCH] mmc: rpmb: fixes pause retune on all RPMB partitions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 1, 2023 at 10:47 AM Jorge Ramirez <jorge@xxxxxxxxxxxx> wrote:
> On Fri, Dec 1, 2023 at 10:39 AM Jorge Ramirez-Ortiz, Foundries <jorge@xxxxxxxxxxxx> 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





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux