Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4053861pxj; Tue, 8 Jun 2021 05:31:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4oy0NH7LDGbwAEJBTx+M5EFB5iemfMn1NKbCM+U/wZABtzj1hkyC+ToINk2Cr1fYlLXdw X-Received: by 2002:a17:906:8056:: with SMTP id x22mr22260683ejw.298.1623155485296; Tue, 08 Jun 2021 05:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623155485; cv=none; d=google.com; s=arc-20160816; b=O898xwCx69zeNSTDkUfUIEvrQKhDkCLt9oq9CSnA57yZP8IWX0jqTn9lrU3a5rRNbM jqqsKU73HyOFwO0fT09wdsumL06mQexkMqKwL89QJ7MqEPtVLezDzzrvcwA9cxeQr4xp lfbGhoplrygtEd0Jyfx9FMSaGcc8XwyT3KFK9edYQsMiHnQymOyZ+re/JBkvhs38Izsn XwWG8rlk943BhV116fu1oqcUc3SYFUpWwuHRplVo9hxcg4RpNOCNA7Q58ALKlsMFq7ud f7Nc08dJmczz7gpVfGG1NUtpAITJc9zRdfbzbeEGkzwZYrlbvmG+iTOEw542Smf8Qyok NgMQ== 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; bh=VlfdFFne5IMD33w1Kp8p4B7iFG5KrPDx2RZnYsm2By4=; b=sl1Fsyx12oy2AHYDJzz9haJ+MWWg89wCXKLzUxCscpOQJIpEi52Acy+kVA9IzsY5as ts8BZQkB+FlzpDK+FNFBG9ndWJ+BDSu5rl4X3B6sKJytBJ0trAUhMqTKNT6qbQB5yeNg Cvqei+WjqTtOYhM0lHwHnMgOPJ3lAq6wHg2w4KeCsuOVNTIxgNfkLHAGdiPjwvjnU1+G S+mOqzAwVk3vUsuFI5dWPmBB8caHgytzdoT/HIIg+9/OVbNAeer7HxHwMuZpBOk1I/w5 Q31NaQhXoaMCz/I0aQB5eG7buh7+zJcL9fxHk7AHg/P3CUCG5l9yhOAuJzygAhB3JDiL rKTw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si14791295edr.488.2021.06.08.05.31.00; Tue, 08 Jun 2021 05:31:25 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232543AbhFHMak (ORCPT + 99 others); Tue, 8 Jun 2021 08:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232202AbhFHMaj (ORCPT ); Tue, 8 Jun 2021 08:30:39 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCAB1C061574 for ; Tue, 8 Jun 2021 05:28:46 -0700 (PDT) Received: from cap.home.8bytes.org (p4ff2ba7c.dip0.t-ipconnect.de [79.242.186.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by theia.8bytes.org (Postfix) with ESMTPSA id C3996206; Tue, 8 Jun 2021 14:28:44 +0200 (CEST) From: Joerg Roedel To: Joerg Roedel , Will Deacon Cc: Alex Deucher , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Joerg Roedel Subject: [PATCH] iommu/amd: Fix section mismatch warning for detect_ivrs() Date: Tue, 8 Jun 2021 14:28:43 +0200 Message-Id: <20210608122843.8413-1-joro@8bytes.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel A recent commit introduced this section mismatch warning: WARNING: modpost: vmlinux.o(.text.unlikely+0x22a1f): Section mismatch in reference from the function detect_ivrs() to the variable .init.data:amd_iommu_force_enable The reason is that detect_ivrs() is not marked __init while it should be, because it is only called from another __init function. Mark detect_ivrs() __init to get rid of the warning. Fixes: b1e650db2cc4 ("iommu/amd: Add amd_iommu=force_enable option") Signed-off-by: Joerg Roedel --- drivers/iommu/amd/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 4e4fb0f4e412..46280e6e1535 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -2817,7 +2817,7 @@ static int amd_iommu_enable_interrupts(void) return ret; } -static bool detect_ivrs(void) +static bool __init detect_ivrs(void) { struct acpi_table_header *ivrs_base; acpi_status status; -- 2.31.1