From patchwork Thu Feb 9 01:03:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 54652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp43418wrn; Wed, 8 Feb 2023 17:07:10 -0800 (PST) X-Google-Smtp-Source: AK7set8z6M51cYnpQrjcKfnUEAw3334LpRry/dHMMkkMiGwEthDagC4n1rHXVbCHGZtrN2HKgGBo X-Received: by 2002:a05:6402:2694:b0:49b:67c5:3044 with SMTP id w20-20020a056402269400b0049b67c53044mr11690923edd.4.1675904830674; Wed, 08 Feb 2023 17:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675904830; cv=none; d=google.com; s=arc-20160816; b=N20wu2lq+T5TzOM0FYPdqb0rZSO7o4yaJ+6VevQ53wwq53rkHgsE8EevL75zLvj2lF r0nij/csvuXFrbh9McKiu9LzeZ2lXaAYPfbGQ4MzEs35rYsmhTpAdMXf87IHysoVAsbA eZgWPbg4yqkC5jlw94Ld8VIj/nOJn0D0JkMX5X5xzk9KM4p+20svSFno6huDcMZtDNut +bLvhMFwqtd5QBuzapV0yfhpo84G4jeHJ1lH6qJIAznxN+r+YXs9EK2P7LrnkFptUGz0 e4gjnuXMwQs/Yhg21cy5glZDfNhA+hG2CIoo8bhLMZ/kQwMc7VE23g5w8yfUsXYN2Hao dWDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1Gyq1awD3AbR7Lmv5tDTtOp1bGuIK/qy5UCH4ZKCpzA=; b=MFpUVf/HGZrRlFzqrHEkcaA/O78I5XNS2l4mZ/ZiFq+Dpe9xBvISXzJoxw3bL8mWR4 abBPNlI9/DNPzDA3EM+mgon5kcyuqC3+j84hU5Hw5iy24XwKyG3Nd5Xxw+EXohcb8HWf /DwUvGMOaDg+L2CHZNcUxHAyktDUkWvrocxRPNzkbABMlltCp8porOM8t5gDBN1zGO72 GKGhWfAFk4mSB8vHRLMfLN6munHwqJwf3HLP2xMAi9qWDVqASyvzZZbT4zhFrTuqjMvr N3qX7qz6X8n5mwKfAIw8HrQ/UCWaA67ZjnbsjoT769N2Frqm2pdml+WKoMU9wUKb4lVf SyrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=1GgKQNB2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020aa7d6c1000000b004a0d634cd0asi312863edr.237.2023.02.08.17.06.46; Wed, 08 Feb 2023 17:07:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=1GgKQNB2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230480AbjBIBEE (ORCPT + 99 others); Wed, 8 Feb 2023 20:04:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230465AbjBIBED (ORCPT ); Wed, 8 Feb 2023 20:04:03 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 323C812851 for ; Wed, 8 Feb 2023 17:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=1Gyq1awD3AbR7Lmv5tDTtOp1bGuIK/qy5UCH4ZKCpzA=; b=1GgKQNB2tG2kDejzQFjuAu3yN5 z8j3w1kG6dBKT1aUQuDghMF/AWfUGHK8U2OL6+Za4vKT0ixlEw9u/+D7f6hBRrzJujGurz7iEnT6V 9PYOvG2TfVF+auVMWC37/K8SitvGzaI00PfwUzew7BOvbTk9/LrdC+HBtsYpsJkWehTOKWBRrlGkc EYjzqGWsmqdVINhybhqg5+izd59iHqb1Z/X+NgumiBIMxoymv1pLoHN+VPPMUeP5JFlGTgwQWp3N4 GkHW2UwQC1Bla9wMWyTfSGV3WV5LIEkbd3kaZQBD97L19WGbRBijfIzVsvcmr21DaWmKLJGgrYWc2 sfD6dQuA==; Received: from [2601:1c2:980:9ec0::df2f] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPvM0-00HMPI-44; Thu, 09 Feb 2023 01:04:00 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Thierry Reding , Joerg Roedel , Will Deacon , iommu@lists.linux.dev Subject: [PATCH] iommu/of: mark an unused function as __maybe_unused Date: Wed, 8 Feb 2023 17:03:59 -0800 Message-Id: <20230209010359.23831-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757313583650249446?= X-GMAIL-MSGID: =?utf-8?q?1757313583650249446?= When CONFIG_OF_ADDRESS is not set, there is a build warning/error about an unused function. Annotate the function to quieten the warning/error. ../drivers/iommu/of_iommu.c:176:29: warning: 'iommu_resv_region_get_type' defined but not used [-Wunused-function] 176 | static enum iommu_resv_type iommu_resv_region_get_type(struct device *dev, struct resource *phys, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: a5bf3cfce8cb ("iommu: Implement of_iommu_get_resv_regions()") Signed-off-by: Randy Dunlap Cc: Thierry Reding Cc: Joerg Roedel Cc: Will Deacon Cc: iommu@lists.linux.dev Reviewed-by: Thierry Reding --- drivers/iommu/of_iommu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff -- a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -173,8 +173,9 @@ const struct iommu_ops *of_iommu_configu return ops; } -static enum iommu_resv_type iommu_resv_region_get_type(struct device *dev, struct resource *phys, - phys_addr_t start, size_t length) +static enum iommu_resv_type __maybe_unused iommu_resv_region_get_type(struct device *dev, + struct resource *phys, + phys_addr_t start, size_t length) { phys_addr_t end = start + length - 1;