Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3798923pxb; Sun, 7 Feb 2021 23:48:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfITXOyYFp4J5VgEbvmY2qlwNoag9aD6gWOytWFx1YHiHAQN3Vmx/0O2wWWY9fZl9Uyoz1 X-Received: by 2002:a17:906:a1c2:: with SMTP id bx2mr16244513ejb.138.1612770485229; Sun, 07 Feb 2021 23:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612770485; cv=none; d=google.com; s=arc-20160816; b=TTR+O7om0Qe01rfg6GcrinJB2bLFvlNk75x1D0NsQUww+KqjzGgL00Fdpz6unkvDOq Rz2TFrNg3pFY+oFiViv/cFscof23nRnSWnm6IX1askqE8GH2g+emba6qUD5rzKb3tCRM 4TYMc7Vbm7tyAOxp21n4Ep2Ra71nmxdhJukbHKm0cEbJALvsqwGw4PyGqtP7crlc/Pl6 wkZyswHK+IInsPbvET0YhiqTGAJFLjgdmjo37MGmLLHIbzspBbhqrUkX1EbGqkY18PVl jJ4De7JVb/zNhIgvIlGY/ewO0VUpqlnu/pebK71G6qkeXC0JE4MsKlcwOgh8tTQxw4Ex u5ug== 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=VBGn5N2PWVERSgqsZWGAhtPQYhD6ApL/aUSxl/jARz0=; b=AT06Dz/qY7+Iax8eQfbftQtjqWn/pwvfM/gRtpglNgI6mMDWEvf7yFqPGZW7PtDXpj 259rO6iVw9BJK1oqmKm86CCXhV3LPIbDQ9DnCbTifgvFIML6AccmgfkUA9DenpTip8+P ZNsGuXqYwdLZ/nKLLiHIXTa9REPga3NNGJZw6n/7pzKk68dWHFM3wplnXnbkcAZhsgM2 4On7bkyYA+RF8NBZEYfxRD9xYZqQ1fsTPPRVnNKUKGknQHyE/26UnbbPalXvIOEKU/J8 y7DcElnd0X3cJdRQ0hoXAaVUdo4AtPNQduTlz4Bc5KQZwunnGa08mSgMy3MgNLjdX99F 4HEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foundries.io header.s=google header.b=YSvY04+l; 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 d2si3052476edv.274.2021.02.07.23.47.41; Sun, 07 Feb 2021 23:48:05 -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=YSvY04+l; 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 S229848AbhBHHrQ (ORCPT + 99 others); Mon, 8 Feb 2021 02:47:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbhBHHrP (ORCPT ); Mon, 8 Feb 2021 02:47:15 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3D8DC06174A for ; Sun, 7 Feb 2021 23:46:34 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id t142so9546154wmt.1 for ; Sun, 07 Feb 2021 23:46:34 -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=VBGn5N2PWVERSgqsZWGAhtPQYhD6ApL/aUSxl/jARz0=; b=YSvY04+lbWpVcY6yhIfrL8hH2CaElLUp2Wak55sU1KF9bCYN3aFKyAcXp3mHY+l+Lg s/+0nRgueX9txsiPBvRb8X7gYyStdIW2+9pgPU54uB9kj+wQ8Pe7peHR4d0+8RSHsjMg 611Yr/8YunIPAgZctApAmN6/c/OYxqmzka9/z+UDId1kKGWFH6bizaRkjNTFpO14LTov N2OVNjWCp0jS93m1fuZFtAEGhGy55G4Ialm96pywIXIgP6Gy6utDwD5FbtIKp7xCkwph VCS0VRgVhScdfwATb1XPFk0ddtBAfi3iisIZTQxa4ZH4ib3RUblxeMd1SRzGkDi/eqnS c/lg== 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=VBGn5N2PWVERSgqsZWGAhtPQYhD6ApL/aUSxl/jARz0=; b=IwP7L7aGyT/1+KfszUbJXE1xWH64GS0nUGPEewEWLkmYyAXuSqCkf9HjWK9ZJjiCGN 2wG5DRvmzh2SbqJwmqy38AnerYeFVfyJHOO71JvUTCFozvAdwNPOTtXzlhgfQqpgG98N VRcpx/0bSRTgIQsVG7xNVtk9lzHcwwx208dvZ+dBprviaCtEUOuYQBhs//b+iAZsvFzt golALCcmbjYkET83gQglVxRHI/azASNZpiCnX/gJiHPl1tmQQDcMgoLcXrF1ThLnCZpU H8E6+MjCWlXIaeTQ6fJh/sCkcmtRG9Y2KZOUspYpKv0MIr/w64PILaFhXrIgG92+lO/Z zZaQ== X-Gm-Message-State: AOAM531ejuwM6nBp++foaO7mEsDwTBvDUxsAEr6Ba+hpTak8DJC1N73e jShoGxouKz4rImJDekvhIBb+4A== X-Received: by 2002:a1c:c6:: with SMTP id 189mr7096615wma.128.1612770393014; Sun, 07 Feb 2021 23:46:33 -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 l1sm28039211wrp.40.2021.02.07.23.46.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Feb 2021 23:46:32 -0800 (PST) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Mon, 8 Feb 2021 08:46:31 +0100 To: Jens Wiklander Cc: Jorge Ramirez-Ortiz , Arnd Bergmann , Arnd Bergmann , op-tee@lists.trustedfirmware.org, Linux Kernel Mailing List Subject: Re: [PATCH] optee: simplify i2c access Message-ID: <20210208074631.GA27508@trex> References: <20210125113758.2430680-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, 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 > > Thanks, > Jens