Re: [PATCH 1/3] optee: simplify OP-TEE context match

Jens Wiklander <[email protected]>
Newsgroups org.trustedfirmware.lists.op-tee,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel,org.kernel.vger.linux-rtc
Message-ID <CAHUa44G1+C47KY8UCV5+ype-NCjYPfgxFs_tivmsOA=R-H1C8g@mail.gmail.com>
On Tue, Feb 10, 2026 at 6:22 AM Sumit Garg <[email protected]> wrote:
>
> On Mon, Jan 26, 2026 at 11:11:24AM +0100, Rouven Czerwinski via B4 Relay wrote:
> > From: Rouven Czerwinski <[email protected]>
> >
> > Simplify the TEE implementor ID match by returning the boolean
> > expression directly instead of going through an if/else.
> >
> > Signed-off-by: Rouven Czerwinski <[email protected]>
> > ---
> >  drivers/tee/optee/device.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> >
>
> Reviewed-by: Sumit Garg <[email protected]>

I'm picking up this.

Thanks,
Jens

>
> -Sumit
>
> > diff --git a/drivers/tee/optee/device.c b/drivers/tee/optee/device.c
> > index 950b4661d5df..4c85b04d6004 100644
> > --- a/drivers/tee/optee/device.c
> > +++ b/drivers/tee/optee/device.c
> > @@ -13,10 +13,7 @@
> >
> >  static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
> >  {
> > -     if (ver->impl_id == TEE_IMPL_ID_OPTEE)
> > -             return 1;
> > -     else
> > -             return 0;
> > +     return (ver->impl_id == TEE_IMPL_ID_OPTEE);
> >  }
> >
> >  static int get_devices(struct tee_context *ctx, u32 session,
> >
> > --
> > 2.52.0
> >
> >
> >
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.