From: "Jorge Ramirez-Ortiz, Foundries" <jorge@foundries.io>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jorge Ramirez-Ortiz <jorge@foundries.io>,
ulf.hansson@linaro.org, CLoehle@hyperstone.com,
adrian.hunter@intel.com, jinpu.wang@ionos.com, hare@suse.de,
beanhuo@micron.com, asuk4.q@gmail.com, yangyingliang@huawei.com,
yibin.ding@unisoc.com, victor.shih@genesyslogic.com.tw,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: rpmb: fixes pause retune on all RPMB partitions.
Date: Fri, 1 Dec 2023 10:39:01 +0100 [thread overview]
Message-ID: <ZWmptatt60if9GBH@trax> (raw)
In-Reply-To: <CACRpkdaMnphBxvqpmvNG_72O02Umny3qdxfyrKdA4BsDwZmtfg@mail.gmail.com>
On 01/12/23 10:28:52, Linus Walleij wrote:
> Hi Jorge,
>
> thanks for your patch!
>
> On Fri, Dec 1, 2023 at 10:10 AM Jorge Ramirez-Ortiz <jorge@foundries.io> wrote:
>
> > When RPMB was converted to a character device, it added support for
> > multiple RPMB partitions (Commit 97548575bef3 ("mmc: block: Convert RPMB
> > to a character device").
> >
> > One of the changes in this commit was transforming the variable
> > target_part defined in __mmc_blk_ioctl_cmd into a bitmask.
> >
> > This inadvertedly regressed the validation check done in
> > mmc_blk_part_switch_pre() and mmc_blk_part_switch_post().
> >
> > This commit fixes that regression.
> >
> > Fixes: 97548575bef3 ("mmc: block: Convert RPMB to a character device")
> > Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
>
> My bug :/
> Shouldn't we also add Cc: stable@vger.kernel.org?
ack, will do.
>
>
> > + 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 :)
>
> > + 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) {
>
> Dito here.
yep
>
> Yours,
> Linus Walleij
thanks !
next prev parent reply other threads:[~2023-12-01 9:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 9:10 [PATCH] mmc: rpmb: fixes pause retune on all RPMB partitions Jorge Ramirez-Ortiz
2023-12-01 9:28 ` Linus Walleij
2023-12-01 9:39 ` Jorge Ramirez-Ortiz, Foundries [this message]
[not found] ` <CAJ1nHOW9T3yvFj5FFdOZYrdgfy0f=opiDri+2srE=yBp5vtVZw@mail.gmail.com>
2023-12-01 13:18 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZWmptatt60if9GBH@trax \
--to=jorge@foundries.io \
--cc=CLoehle@hyperstone.com \
--cc=adrian.hunter@intel.com \
--cc=asuk4.q@gmail.com \
--cc=beanhuo@micron.com \
--cc=hare@suse.de \
--cc=jinpu.wang@ionos.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=victor.shih@genesyslogic.com.tw \
--cc=yangyingliang@huawei.com \
--cc=yibin.ding@unisoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.