Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1075297pxk; Mon, 31 Aug 2020 09:07:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9g+JwPPuZKBW5F4Syp8RRoTjBgX63KwLmWsbPGLuHBqpBGNfw51iF7oPGNE9hOMKVQ+D0 X-Received: by 2002:a17:906:d8ca:: with SMTP id re10mr1681826ejb.382.1598890049806; Mon, 31 Aug 2020 09:07:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598890049; cv=none; d=google.com; s=arc-20160816; b=Jltx5EP2IRZ87Ivj8o6ZjeWS5P+s/XyxZ4Cp10NJmY8OzueI9HSoQ1Ru62TL272xKd VWz/JQ04uXCTnLHErk7hxfYsw/wwu6Tu3AUOFsTv5/I+Y+40Tx6lwCLXEFMcoU5PwgmB G7+VAo/GEqhHDqejHrm08+5g4qAdZPevR6hLG9v3DrpSAIC/cZelScKM2byzbF/LVUh7 Bv8+CKlqx50JNbW0GkdKfvLVhQ0obR+R0eAK6ocB/Xck3024qLhV2k1DXGA/jOy1R9RR DB9eY0jVETtIBUAe76UqL54SlyXKPcceXvZlXU/QYfwCyQItFxf9TJEXnglqwcD2FuXq RnZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=nCvBclcKzBH5k/oraboDk32nHcQNInznXVzQum4e88U=; b=UstXRczyFZixRN1adbjOPj74S+vdHEpjBROT/H2gdfbXvTA1jUKInbBw4MkVRKB5Zy 0STSf3x/bSdfth8jDlhc+VHHk2Q27AYMRGjkE62pMx72td6aeB810Cp9mKyqC7QQjhNR SYu0NbhA6OoAYlEhSRtSLcr24/+SXhCBE5t4B+NE/w9ioAH6vppHJg+NfRoWcxxWVB/i W6v/1xW4LKFA5x320W5A79gYXOuHBaWD4LFf7hoD2gqLrpen+CjNBvIcYK+6W9vvb4yR Rwac1MxQcTe5cm27/Tm0hYWx7uhKt7jLguMD2ZFyCW3SBPk/jtMGH7d663A7NvdTpn3w 68uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foundries-io.20150623.gappssmtp.com header.s=20150623 header.b=rulFknjg; 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 m7si5727736edq.34.2020.08.31.09.07.07; Mon, 31 Aug 2020 09:07:29 -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=pass header.i=@foundries-io.20150623.gappssmtp.com header.s=20150623 header.b=rulFknjg; 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 S1727935AbgHaQEZ (ORCPT + 99 others); Mon, 31 Aug 2020 12:04:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbgHaQEZ (ORCPT ); Mon, 31 Aug 2020 12:04:25 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF386C061573 for ; Mon, 31 Aug 2020 09:04:24 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id a65so25940wme.5 for ; Mon, 31 Aug 2020 09:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries-io.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nCvBclcKzBH5k/oraboDk32nHcQNInznXVzQum4e88U=; b=rulFknjgmouB6mHwBZM6x2B4xumtWEbtgZq5ADHlGW8eRg2k6lGmKUQSnydBvlK8HJ u/x13n5Og0niJTLg4W5BFerL8Mgrndz6sA6Q1cDDqu5OR0l7fCFDomuD6H1h3wG3kFVg MiY3ii6L0ojZ90XYO0lzr3UP7c+5S0W+5Uro5MFQgKCW4NajHQ06mgdnrO04OysTrFRL TlLZzbL6eC4tx4uAaAdnTOe2vsgRyk2fwvOcXAWq0olpbnYKAnTUiVIXpn9G7Z0re9Mk VcqBMsZP1ISRpXR9d58KfsEqRFQcu/hOEPd/W+e476D4eMtox3UmUOw9f8hhyWunhDsF 70DA== 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=nCvBclcKzBH5k/oraboDk32nHcQNInznXVzQum4e88U=; b=gFBxVeGSso3bIjeuoAqIt277UtRRFwaA2ZyZmORvBWyAqW4+5U4M3/FthWIailGMaM x9dIrWkGTVDwnTAfPa8gX7tuV4vJ4eBQtCgf8IhXixc4L1aG1zTa7Mlizoo2iPi4p0B7 VPoHdzPOE8TbUJMiZrA92bLYt+WP2OWiiDHT4T/0LNADg8OudNN0v3opkIoaWPsFwCuc 01RFUlCMv994LX5S79UJTSeWIeyFc2c2+KBtEEIMVXvPTnkiAAbQL+GS4YdRnFqt8MXl 3M1fqYNp/y1/uaQ1oUGLNnDv5IjBB8GWMsnAf1QY1MmCC7bULksFqT60/PCGNvoC6qfQ Tt6Q== X-Gm-Message-State: AOAM533Y+z66Q9k6SZ9qPQ/n4pI6JHClGXKP1kT0cbHuNENOvq68KnZm JITiXGr3E4jeDbMlurAqDOy5tg== X-Received: by 2002:a7b:cc11:: with SMTP id f17mr75205wmh.21.1598889863347; Mon, 31 Aug 2020 09:04:23 -0700 (PDT) Received: from trex (239.red-83-34-184.dynamicip.rima-tde.net. [83.34.184.239]) by smtp.gmail.com with ESMTPSA id q12sm9883387wrs.48.2020.08.31.09.04.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Aug 2020 09:04:22 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Mon, 31 Aug 2020 18:04:20 +0200 To: Randy Dunlap Cc: Jorge Ramirez-Ortiz , jens.wiklander@linaro.org, sumit.garg@linaro.org, tee-dev@lists.linaro.org, linux-kernel@vger.kernel.org, ricardo@foundries.io Subject: Re: [PATCH] drivers: optee: fix i2c build issue Message-ID: <20200831160420.GA13073@trex> References: <20200831152359.9122-1-jorge@foundries.io> <52448a13-f3fd-d9d1-8e1f-e029db91cf5e@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52448a13-f3fd-d9d1-8e1f-e029db91cf5e@infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/08/20, Randy Dunlap wrote: > 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. yep, much nicer. will do that instead. > > > 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 >