Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3840783pxb; Mon, 8 Feb 2021 01:12:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3/KEFdC3MyQXC8snq4Q0DAKeEGxF2FtCaJQIHtthiVXCLd4d9qVWXa6D5JWpiLdsJ8qp0 X-Received: by 2002:a17:906:3999:: with SMTP id h25mr16178747eje.146.1612775567135; Mon, 08 Feb 2021 01:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612775567; cv=none; d=google.com; s=arc-20160816; b=Lg5+/CCIa1hPPbqAQWBBq1bDYuSPtQpcZr4qdaAMwIxG+6NLr3l9nLqvdO+LhMr/kH qztDQ0AWgsDp0imDXRqLRP1OWvnCq+zKWzL8CkQzYH9TSazvSa3Wta88T4z0aj7+l7Am Xw80u1nvAbM0OMtKd6QYXD3Fvo9ISQmytg3Q8Of4a94Clqd7YY//9+GK0HhoTU5wnW2C Vp7yhB/tFD3Bp7fSiQnauAEIGt9E9w8bw5LAYGZicaFmvwwCKK+weLkI+mFAVDtWM+o0 mLl4gXve1DI/mRhrr0oKcKqEaWUSmou0E4f76txoO+ve1NnTk2ujTWFr9tsbhQ8h7c25 OXAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=s+wQppqA+qPwRN7K+pykfRUc5QHoD33seMy1uTYc7ls=; b=kvILShBvgRju6wbcAKVXcYZPoV/nV2jKC1aAEbemUalNVdcdDtwBH+Y8Rw4kuQx5E3 oeTPHCy03uVibCLOXxCW/4OUNpMoHl9W1CvEUM1v07wsuBO6mtyV7gdxtlfqbdEN6MFX gYX96rE+E5pe1RrHP7WaPQh9p8DyABpKrU2ihJiZ5bVFm6itne2MDSTMup4gCKpFV4lM y7H7Onprn6zRY3pb6FTj2AOfGh/Lw8Jixu94XTEeoDtJgQbaQ7rlB+ARy1e/Ktrrv9SY uEmLMgy8Lrnsn1q+ovwJ33GkKJ79tg+Lvff8untrWVP3vbbSrEYv6a+P20P5x02v5glu K9Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rY6XJm+w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si4466882ejg.646.2021.02.08.01.12.23; Mon, 08 Feb 2021 01:12:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rY6XJm+w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231401AbhBHJLa (ORCPT + 99 others); Mon, 8 Feb 2021 04:11:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231282AbhBHIz0 (ORCPT ); Mon, 8 Feb 2021 03:55:26 -0500 Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19604C06174A for ; Mon, 8 Feb 2021 00:54:46 -0800 (PST) Received: by mail-oo1-xc29.google.com with SMTP id q4so3259786ood.8 for ; Mon, 08 Feb 2021 00:54:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s+wQppqA+qPwRN7K+pykfRUc5QHoD33seMy1uTYc7ls=; b=rY6XJm+wPIKEGu+FIxW5ZV8p7BgQs1tjA1Zc9MtNXIcuWsEqJk0uD30cKoGxVWhzzN 4f+6LeUCeV7Vnu4p9XPnUG8vaB0F/gfTW5wHJXV9tCT9TI2BIdbt2GwYBG3gVzHRIbUF 3uNM1hGD140ptAtkUdeCMtKGjG5854P/W2GgWvn4MJMwk1kLWG7LCKBs94cYAt6nu88S 3F0HYbBIVUDgekhJpZzMG20DaRXzAG+hMaTziQNbB9fh00Fvy5azR1iEO2LUP/tZqNhE zAPyR5OtuAJM5I279MCQOKgNTKhGAGHE5FQ2Ju59eZvr5knRwL1KtYzWjISGpFctIIXu 1+OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s+wQppqA+qPwRN7K+pykfRUc5QHoD33seMy1uTYc7ls=; b=QnKVP8pfXY40c1DIeKR9A4gxOznkGBsKeeVwMhFMA63Miw2+kPgg6h1kstWI6ag/4g u46FVFcHRUB8jjay1voFwVxrx5uxLqpZO5eS41sUvyEZRYnSSWttPPSGadctrtrW0Vum /JvBFuo7vo2178R+QSl24C+FFyi1Ich/15Qd0zORSBr68liIYrIDKYVtcWVwE4Szr5W8 tkdRoXs6h9ERyIUCgx5JeLmJCA6u4mllcRAXiQTXLpJfHac2bbZWGAH884OOPMPWA3qS q9LwPuqvsvUqsn3JFvH3D6UjgYRZcv4/K38PVum7d1QhdQZcBwHIBoOi2PO9QUmTDCDM 8JyQ== X-Gm-Message-State: AOAM533sR4pWjrmuZFTrfkV/W9v2cEjutHxdaxnDnos79vrO6pXOZ846 6zhpZaX0mmVJ1YjB2nJQw7VZ5jUaxr5Z34BTw39yMTnYbJE= X-Received: by 2002:a4a:a8cd:: with SMTP id r13mr11814804oom.6.1612774485525; Mon, 08 Feb 2021 00:54:45 -0800 (PST) MIME-Version: 1.0 References: <20210125113758.2430680-1-arnd@kernel.org> <20210208074631.GA27508@trex> <20210208083250.GB27508@trex> In-Reply-To: <20210208083250.GB27508@trex> From: Jens Wiklander Date: Mon, 8 Feb 2021 09:54:34 +0100 Message-ID: Subject: Re: [PATCH] optee: simplify i2c access To: "Jorge Ramirez-Ortiz, Foundries" Cc: Arnd Bergmann , Arnd Bergmann , op-tee@lists.trustedfirmware.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 8, 2021 at 9:32 AM Jorge Ramirez-Ortiz, Foundries wrote: > > On 08/02/21, Jorge Ramirez-Ortiz, Foundries wrote: > > On 08/02/21, Jens Wiklander wrote: > > > Hi Jorge, > > > > > > On Wed, Jan 27, 2021 at 11:41 AM Jens Wiklander > > > wrote: > > > > > > > > Hi Arnd, > > > > > > > > On Mon, Jan 25, 2021 at 12:38 PM Arnd Bergmann wrote: > > > > > > > > > > From: Arnd Bergmann > > > > > > > > > > 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 > > > > > --- > > > > > drivers/tee/optee/rpc.c | 31 ++++++++++++++++--------------- > > > > > 1 file changed, 16 insertions(+), 15 deletions(-) > > > > > > > > Looks good to me. > > > > Reviewed-by: Jens Wiklander > > > > > > 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 > > Tested on imx6ull. > > Tested-by: Jorge Ramirez-Ortiz Thank you. Cheers, Jens