Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2576280ybk; Tue, 12 May 2020 02:55:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEEH+wXcvP86SBVO8Ku0RJFwjP3GcJq4QTm7PVmT0QSkx1PZ+G9inG3NeKprCtexWf8PQu X-Received: by 2002:a17:906:f84b:: with SMTP id ks11mr5139706ejb.114.1589277326979; Tue, 12 May 2020 02:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589277326; cv=none; d=google.com; s=arc-20160816; b=PKE5QsLWkSufbGhWFhDSR+1cP3Q1RnqQNHg2rhChCblUGMJ0Spkx/+o0WPhVXdXsWa 4YYuNTLAmf6le6g9U2FkmGm7e+EeOencEzbb3Q+J77mMUO0f0o6+nTEJu7zPxJrXHdOv 8yMDJE2wF6H83BeDgB0s38mkEwxup0Smii02Ob5131e5RTMltVIYj9KDtDJD6BODqRol 462K23J4NRA5R9G30b/P19hOj/qFrVeglhDv9beBFV4OMbDZajbEwytZZlItxtDqGeBS V0ugoLO0BCYA6hcEl3MwtUTE5DqGvIROKQ6etoYjyOAJPWeiISkNWG+cZFwTvgacnhjB FnWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organisation:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KkQxUeh/IkKsSE6BGxCRXwicwZAjSDl+8FYKvXuxFq0=; b=pHdBA7qvQE7gxM8POJSIBW0uWU5HoEHBkxUKZUY8O1NytFE1YT1vtvbQnLC6DKxw0q wljm3KX40eF8YoHr7ac5N3CShtnTh1ynG/V5sojle2mjPFfRCvCAN+pNSb9B/6Kv9BAv CnwRnmRbYnn0p+YxpT4Aah7pvOsMl+jJguYKmWFLfLX6lJz1tILABSFqvXRaRMVqTgWV LkaOT2eb3AfXdSVLk7S+9NRZ339ZWz7seJxFKtoTK2yqe+4eC4RN7fPTMkYcAqk4cQ8c W10ffPfXVx8a3dLoSsdckcKcxHVfxAldk+DJ9K9XKfx/FQDz5XXUH/fdf1Qw461uAXDA se4A== ARC-Authentication-Results: i=1; mx.google.com; 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 r18si3029333ejz.306.2020.05.12.02.55.02; Tue, 12 May 2020 02:55:26 -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; 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 S1727859AbgELJxe (ORCPT + 99 others); Tue, 12 May 2020 05:53:34 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:36000 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725889AbgELJxe (ORCPT ); Tue, 12 May 2020 05:53:34 -0400 Received: from penelope.horms.nl (tulip.horms.nl [83.161.246.101]) by kirsty.vergenet.net (Postfix) with ESMTPA id AB32C25AD50; Tue, 12 May 2020 19:53:31 +1000 (AEST) Received: by penelope.horms.nl (Postfix, from userid 7100) id 57B76717; Tue, 12 May 2020 11:53:29 +0200 (CEST) Date: Tue, 12 May 2020 11:53:29 +0200 From: Simon Horman To: Arnd Bergmann Cc: Joerg Roedel , Joerg Roedel , Geert Uytterhoeven , Yoshihiro Shimoda , Will Deacon , Robin Murphy , Hai Nguyen Pham , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/renesas: fix unused-function warning Message-ID: <20200512095329.GA18408@vergenet.net> References: <20200508220224.688985-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508220224.688985-1-arnd@arndb.de> Organisation: Horms Solutions BV User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 09, 2020 at 12:02:16AM +0200, Arnd Bergmann wrote: > gcc warns because the only reference to ipmmu_find_group > is inside of an #ifdef: > > drivers/iommu/ipmmu-vmsa.c:878:28: error: 'ipmmu_find_group' defined but not used [-Werror=unused-function] > > Change the #ifdef to an equivalent IS_ENABLED(). > > Fixes: 6580c8a78424 ("iommu/renesas: Convert to probe/release_device() call-backs") > Signed-off-by: Arnd Bergmann Reviewed-by: Simon Horman > --- > drivers/iommu/ipmmu-vmsa.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c > index fb7e702dee23..4c2972f3153b 100644 > --- a/drivers/iommu/ipmmu-vmsa.c > +++ b/drivers/iommu/ipmmu-vmsa.c > @@ -903,11 +903,8 @@ static const struct iommu_ops ipmmu_ops = { > .probe_device = ipmmu_probe_device, > .release_device = ipmmu_release_device, > .probe_finalize = ipmmu_probe_finalize, > -#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA) > - .device_group = generic_device_group, > -#else > - .device_group = ipmmu_find_group, > -#endif > + .device_group = IS_ENABLED(CONFIG_ARM) && !IS_ENABLED(CONFIG_IOMMU_DMA) > + ? generic_device_group : ipmmu_find_group, > .pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K, > .of_xlate = ipmmu_of_xlate, > }; > -- > 2.26.0 >