From: "Jorge Ramirez-Ortiz, Foundries" <jorge@foundries.io>
To: op-tee@lists.trustedfirmware.org
Subject: Re: [PATCH] optee: simplify i2c access
Date: Mon, 08 Feb 2021 08:46:31 +0100 [thread overview]
Message-ID: <20210208074631.GA27508@trex> (raw)
In-Reply-To: < <CAHUa44Fa4oCjpGQj-52nei1M+KkyxPYBsX5TDmgA3ekRPqg8GQ@mail.gmail.com>>
[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]
On 08/02/21, Jens Wiklander wrote:
> Hi Jorge,
>
> On Wed, Jan 27, 2021 at 11:41 AM Jens Wiklander
> <jens.wiklander@linaro.org> wrote:
> >
> > Hi Arnd,
> >
> > On Mon, Jan 25, 2021 at 12:38 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > >
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > Storing a bogus i2c_client structure on the stack adds overhead and
> > > causes a compile-time warning:
> > >
> > > drivers/tee/optee/rpc.c:493:6: error: stack frame size of 1056 bytes in function 'optee_handle_rpc' [-Werror,-Wframe-larger-than=]
> > > void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,
> > >
> > > Change the implementation of handle_rpc_func_cmd_i2c_transfer() to
> > > open-code the i2c_transfer() call, which makes it easier to read
> > > and avoids the warning.
> > >
> > > Fixes: c05210ab9757 ("drivers: optee: allow op-tee to access devices on the i2c bus")
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > ---
> > > drivers/tee/optee/rpc.c | 31 ++++++++++++++++---------------
> > > 1 file changed, 16 insertions(+), 15 deletions(-)
> >
> > Looks good to me.
> > Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
>
> Would you mind testing this?
sure, doing it this morning.
btw what Arnd has done - removing the unnecessary level of indirection
- was pretty much my initial though but I thought it was easier to
read the way I wrote it (I guess I was wrong and I obviously missed
the stack size increase)
but yes, will test
>
> Thanks,
> Jens
WARNING: multiple messages have this Message-ID (diff)
From: "Jorge Ramirez-Ortiz, Foundries" <jorge@foundries.io>
To: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Jorge Ramirez-Ortiz <jorge@foundries.io>,
Arnd Bergmann <arnd@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
op-tee@lists.trustedfirmware.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] optee: simplify i2c access
Date: Mon, 8 Feb 2021 08:46:31 +0100 [thread overview]
Message-ID: <20210208074631.GA27508@trex> (raw)
In-Reply-To: <CAHUa44Fa4oCjpGQj-52nei1M+KkyxPYBsX5TDmgA3ekRPqg8GQ@mail.gmail.com>
On 08/02/21, Jens Wiklander wrote:
> Hi Jorge,
>
> On Wed, Jan 27, 2021 at 11:41 AM Jens Wiklander
> <jens.wiklander@linaro.org> wrote:
> >
> > Hi Arnd,
> >
> > On Mon, Jan 25, 2021 at 12:38 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > >
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > Storing a bogus i2c_client structure on the stack adds overhead and
> > > causes a compile-time warning:
> > >
> > > drivers/tee/optee/rpc.c:493:6: error: stack frame size of 1056 bytes in function 'optee_handle_rpc' [-Werror,-Wframe-larger-than=]
> > > void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,
> > >
> > > Change the implementation of handle_rpc_func_cmd_i2c_transfer() to
> > > open-code the i2c_transfer() call, which makes it easier to read
> > > and avoids the warning.
> > >
> > > Fixes: c05210ab9757 ("drivers: optee: allow op-tee to access devices on the i2c bus")
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > ---
> > > drivers/tee/optee/rpc.c | 31 ++++++++++++++++---------------
> > > 1 file changed, 16 insertions(+), 15 deletions(-)
> >
> > Looks good to me.
> > Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
>
> Would you mind testing this?
sure, doing it this morning.
btw what Arnd has done - removing the unnecessary level of indirection
- was pretty much my initial though but I thought it was easier to
read the way I wrote it (I guess I was wrong and I obviously missed
the stack size increase)
but yes, will test
>
> Thanks,
> Jens
next parent reply other threads:[~2021-02-08 7:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] < <CAHUa44Fa4oCjpGQj-52nei1M+KkyxPYBsX5TDmgA3ekRPqg8GQ@mail.gmail.com>
2021-02-08 7:46 ` Jorge Ramirez-Ortiz, Foundries [this message]
2021-02-08 7:46 ` [PATCH] optee: simplify i2c access Jorge Ramirez-Ortiz, Foundries
2021-02-08 8:32 ` Jorge Ramirez-Ortiz, Foundries
2021-02-08 8:32 ` Jorge Ramirez-Ortiz, Foundries
2021-02-08 8:54 ` Jens Wiklander
2021-02-08 8:54 ` Jens Wiklander
[not found] < <CAHUa44GwSRB=7tFpXi2ZW-SXGipp7ErDkB2_4iGQfyH_ECAU8A@mail.gmail.com>
2021-02-08 7:00 ` Jens Wiklander
2021-02-08 7:00 ` Jens Wiklander
[not found] < <CAK8P3a09stVcEr9xBOLbkw7ZtzdZpP_pqE4wYRzBoC70c3h1eA@mail.gmail.com>
2021-01-26 11:45 ` Jorge Ramirez-Ortiz, Foundries
2021-01-26 11:45 ` Jorge Ramirez-Ortiz, Foundries
2021-01-26 14:09 ` Arnd Bergmann
2021-01-26 14:09 ` Arnd Bergmann
2021-01-25 11:37 Arnd Bergmann
2021-01-25 11:37 ` Arnd Bergmann
2021-01-26 8:08 ` Jorge Ramirez-Ortiz, Foundries
2021-01-26 8:08 ` Jorge Ramirez-Ortiz, Foundries
2021-01-26 9:10 ` Arnd Bergmann
2021-01-26 9:10 ` Arnd Bergmann
2021-01-27 10:41 ` Jens Wiklander
2021-01-27 10:41 ` Jens Wiklander
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=20210208074631.GA27508@trex \
--to=jorge@foundries.io \
--cc=op-tee@lists.trustedfirmware.org \
/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.