Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3824386pxb; Mon, 8 Feb 2021 00:40:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHRSnOCJeovzM1XrMOujOxkVqdgMDczsYoILI58T0WhzAkwhEXGeb0S3SrekLLKfz5ppkJ X-Received: by 2002:a17:906:6c92:: with SMTP id s18mr8813447ejr.22.1612773608545; Mon, 08 Feb 2021 00:40:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612773608; cv=none; d=google.com; s=arc-20160816; b=Mth3FwA2XXCrJCxHBlBNXhGHCBnjnkF7dd7VQcfgTuBUitHriu71411Ep/D6mkvUzB YlahWSv11GUZt0pSmGS6qHHmn08e1iU8ESuqabpTNBkKIATZfVrVdJW8aoj895NzyA7R tyaJS6HyxuOXPgJnZqDYAzA6XCw1BPrpOQRbmf7eJbNnEF7eT5ifqSZAj2d+4rLDf+d0 ttuN4LmhCvChevJV5sR/Kvs5ILxJZmgBDiwxepMIp8L5qLOcRD+k3bum2M8YFDz5IbYi gFd5yEFLk6i/LFXyo1Dn7uaFIt65TpcTmYZF3AblXKtFcBvb+TicKe+cImRoqq5R7cLe QUfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=kSU/G1l+Y54In+pRZdaVmq31hPui20B+x8ZAbeeJbPM=; b=wgquT+t9hsn5oqsfP0xz0GlQRE/kwYhKl+rm2TCo7VTHNm9rgjQavleOgVyxBr6Ni7 x8snVbBsRv52WoCsvJM0+dni2NCJ8T4jkmOgyHZpCJBg2oORaL3XpBQxTEjL2sd3akkw wPm5JflYSgCE1WNsQEieLz7ks4ioVGH78OE9onMktvNQDkdTrLMeVJDwMAzK9mfCOVvm 5jB+KO+kQYcjZVXoEy/PpZQAt+ehS47QLZDf5/M/fvhvWyb86kzvbv5j4eUWgFv0Y2b5 y98+HXeZWVW+n6yjEvM1cA3o+UtLfk06j7KOe4CwHDJnG9TzokWOTHcSwoyEXcY/X+do dk5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foundries.io header.s=google header.b=cTszrBad; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si9129823eje.421.2021.02.08.00.39.44; Mon, 08 Feb 2021 00:40:08 -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=@foundries.io header.s=google header.b=cTszrBad; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbhBHIhe (ORCPT + 99 others); Mon, 8 Feb 2021 03:37:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230218AbhBHIeT (ORCPT ); Mon, 8 Feb 2021 03:34:19 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B78DC06174A for ; Mon, 8 Feb 2021 00:32:53 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id f16so11781331wmq.5 for ; Mon, 08 Feb 2021 00:32:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kSU/G1l+Y54In+pRZdaVmq31hPui20B+x8ZAbeeJbPM=; b=cTszrBadmvqVfGr4GE94pFVu3W/vguoltOxdJ6CLYs5lBGtY1/3i1sYdRQLP0rpNlQ Q36CZa/ozGdOBfR2gruh8FeHw9ajEFJzRp6WepZT4lDyjy287m9AMekkL188MItNcmhg BkenBP5Tt4j+0Rt6SS3dyEe7GaH52zvZ5S/7jCDwH0DrlHhxnOeZLFAnAJTyakhvvhf1 4XGwzqgLT/po7/h822Es67I/D2psCo++DWoRQ0ynUnXxHQ46Mhvqacl+tZ6kUn38geqc 7owLYaG5LQwSzL7zDlxzonUHbgkcqNOPnmyJSHdM05HEQsbQbEeARwRdTroeHyYfgiY8 yVpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kSU/G1l+Y54In+pRZdaVmq31hPui20B+x8ZAbeeJbPM=; b=Dif66iw8BMon/Lb1u8ZyTF7whN8Pn5+pWPx3JGVZ9xS02Ac2IG3Qs80tvLHUaQzLkl A0vz0Gw1EIIqS4fuAuk+4GhJmnnHBOU/6uWU72CbL3xWNFKoUxO19nn5LExomt5v94Ps uCdMNUgJ8GBm2Z6eNQviqCryPJKMIzC2alrKbzV6zfe3gaBE8Pws314wVYjuI81AVOT/ LDWLp/D38lQzNFZTJPinMjnBUKbR2bK+hqPkxjSmM+IfyfS1KDUFBakLBRnlkyBe8HHB qKfmiOSkhmDQrLzeJbu5nIMI/okIx0VH0jnp3l88YZ92kwGEjP5wm4nrgdSK59UM66jX 5UFg== X-Gm-Message-State: AOAM533xggr93m79P7GwN0zVS5apsW+uR+4TuTpFQqqvQ7DLVvvWjw3l I9wHpR8MXh8NWynJODck6MrIEmwI8xaMDg== X-Received: by 2002:a1c:3b8a:: with SMTP id i132mr13693056wma.26.1612773172314; Mon, 08 Feb 2021 00:32:52 -0800 (PST) Received: from trex (182.red-79-146-86.dynamicip.rima-tde.net. [79.146.86.182]) by smtp.gmail.com with ESMTPSA id x13sm14134642wmc.27.2021.02.08.00.32.51 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Feb 2021 00:32:51 -0800 (PST) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Mon, 8 Feb 2021 09:32:50 +0100 To: "Jorge Ramirez-Ortiz, Foundries" Cc: Jens Wiklander , Arnd Bergmann , Arnd Bergmann , op-tee@lists.trustedfirmware.org, Linux Kernel Mailing List Subject: Re: [PATCH] optee: simplify i2c access Message-ID: <20210208083250.GB27508@trex> References: <20210125113758.2430680-1-arnd@kernel.org> <20210208074631.GA27508@trex> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210208074631.GA27508@trex> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > > > Thanks, > > Jens