Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1064781pxk; Mon, 31 Aug 2020 08:52:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIggnR1kv0jDZITc+apml63VL568iUFq3UH7HrEpMjb58FULp0T5mb23TGV83MsQUYl0Rf X-Received: by 2002:a50:bf08:: with SMTP id f8mr1715795edk.207.1598889150361; Mon, 31 Aug 2020 08:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598889150; cv=none; d=google.com; s=arc-20160816; b=wx0Ut5brnOuXe5KORLfKPZdGxfdXcSwoSSyqug59NB0I+qr7Aq1qNYsJ79bUi/+q8o WNzj+L593KXYOdg1X6e3WRXP0vWXN+TF0p5z5MNSEzgCmrwzJezvQStp5Ckfx0YZBhCm +cjEXROG46lDClSEwL1VocFFvrePWiirMVvlcED/tOOpGeLR2olq1kBPzMgnbzKQqBJR Sfc6Txa5WYYdpq14ek1G9Qvx+CFnwPUMq8GxaLaanND2V1VBkBj/EDw2BUOgVEQFGlHq Yzxiq9wj2suBjT5sAcbhJ9KjeH/z4dTC51u/ZCIL08NMqKxSIpqYeuRGL8+ULd24zII/ tjdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Q2fmjWOqML3J93lLPzsO/5fosKHTpEL7oawS3DEChd0=; b=t4c4HJ83LQLv26n8VANtZX7vCSbwZqFYQ0A+LGx62m2yUn6auCwY/cq6Da3+o4CaD2 HEZHCFPbhnp0v4nkvSZCzMqaDCl0T8W91sraDWH+rxRPfP/PvcYUx8DKwRQ9ooZfonoL 5HJX1Yg3l9a5m6Q68b0U218ZSUE6JcbL3OLXhU77EiGDbt+nSqd4pmjjcQljqu2mSchD i7PXi+D3Rfld8WOPs5JRtB537ccvsLIzNNCbeTm8070qe4Ic8NlZjWZRxUE3jTtVD6rT Io9dSIfip6qCxjb7BaqU9j28UcXbo9wJuYc8qdemyqz8151ssTtlJCXzYv5Fqp6tmf0t NGhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=kVl69r1L; 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 a23si5513130edn.432.2020.08.31.08.52.07; Mon, 31 Aug 2020 08:52:30 -0700 (PDT) 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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=kVl69r1L; 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 S1728358AbgHaPuG (ORCPT + 99 others); Mon, 31 Aug 2020 11:50:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728251AbgHaPuB (ORCPT ); Mon, 31 Aug 2020 11:50:01 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 165A7C061573 for ; Mon, 31 Aug 2020 08:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=Q2fmjWOqML3J93lLPzsO/5fosKHTpEL7oawS3DEChd0=; b=kVl69r1Ld4MkR6op1ATnOt/IXk j8CXY3O+RXHJ9nQvNEg1OyzCkgS+a6EDqfOs+3S5SDOipvPKq1oE8twLkIPdJNd58RL3BUEvZyxFj ovFKcDnlnC0QcYCCg76JgkeuPENZjpXFm0pfLOatk03JQh3DFH/Q8wlYUXIiSh6fWH40CT5TANTRQ DNMuefopcJTIfqfWdnnF0K754p/6zGa5dgA31gSQg+9pPdM7FL/wFHtpOLqjB/pZCNshvJ2zHqPEw B6yyoGJsAwKxFARSCXTKyaandSAMWzggVu5IZtzsc/BKn1owBswlDTtP8ZqZm3gYcIsI2Kzbe+RBA fMUICqeg==; Received: from [2601:1c0:6280:3f0:897c:6038:c71d:ecac] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCm4D-00046g-3e; Mon, 31 Aug 2020 15:49:57 +0000 Subject: Re: [PATCH] drivers: optee: fix i2c build issue To: Jorge Ramirez-Ortiz , jens.wiklander@linaro.org Cc: sumit.garg@linaro.org, tee-dev@lists.linaro.org, linux-kernel@vger.kernel.org, ricardo@foundries.io References: <20200831152359.9122-1-jorge@foundries.io> From: Randy Dunlap Message-ID: <52448a13-f3fd-d9d1-8e1f-e029db91cf5e@infradead.org> Date: Mon, 31 Aug 2020 08:49:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200831152359.9122-1-jorge@foundries.io> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/31/20 8:23 AM, Jorge Ramirez-Ortiz wrote: > When the optee driver is compiled into the kernel while the i2c core > is configured as a module, the i2c symbols are not available. > > This commit addresses the situation by disabling the i2c support for > this use case while allowing it in all other scenarios: > > i2c=y, optee=y > i2c=m, optee=m > i2c=y, optee=m > i2c=m, optee=y (not supported) > > Reported-by: kernel test robot > Signed-off-by: Jorge Ramirez-Ortiz > --- > > This patch applies on top of > https://git.linaro.org/people/jens.wiklander/linux-tee.git/tag/?h=optee-i2c-for-v5.10 > > drivers/tee/optee/rpc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c > index 64a206c56264..96e91d5f0a86 100644 > --- a/drivers/tee/optee/rpc.c > +++ b/drivers/tee/optee/rpc.c > @@ -51,6 +51,7 @@ static void handle_rpc_func_cmd_get_time(struct optee_msg_arg *arg) > } > > #if IS_ENABLED(CONFIG_I2C) > +#if !defined(CONFIG_I2C_MODULE) || defined(CONFIG_OPTEE_MODULE) Looks like #if IS_REACHABLE(CONFIG_I2C) should work here. > static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx, > struct optee_msg_arg *arg) > { > @@ -140,6 +141,7 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx, > arg->ret = TEEC_ERROR_NOT_SUPPORTED; > } > #endif > +#endif > > static struct wq_entry *wq_entry_get(struct optee_wait_queue *wq, u32 key) > { > -- ~Randy