From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98514C0650F for ; Mon, 5 Aug 2019 13:07:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 643452147A for ; Mon, 5 Aug 2019 13:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565010420; bh=2Sa/gQR0nElZc1lOcm+cOW+SlHHwNDe/kZ8wHR4OzJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OI15ZIyt0d4BNufNkzeGPZ9/g9rJi+lRWjh5JMNzSw0X1URfTqbJzD0/romaRxw2i 64/kdAoigzftIRD0DNYRjvtj9kkfPqSfmbVeHAiFLAhxSks4BUXDs6XU1h6dDBsGx1 BnZ6MDvCA6BVblj7YpWPWjlzKTxeSOzR51AswNrs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729730AbfHENG7 (ORCPT ); Mon, 5 Aug 2019 09:06:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:44014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728907AbfHENGz (ORCPT ); Mon, 5 Aug 2019 09:06:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9110C2075B; Mon, 5 Aug 2019 13:06:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565010415; bh=2Sa/gQR0nElZc1lOcm+cOW+SlHHwNDe/kZ8wHR4OzJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ABszgl5qDcsxyHxVnOMProfesfS5V9GCBZx3AEZ6xRLjBkPIXW/qVNbgDiDDXCT81 N1pTwVu/c6QCG75Jmj+L6CZ3qF6NmwzTh6nAOKHBCLevrNs4PF2N9cixmpni+dPpPl elzne3NhvwrmayB15gPcmDDdm69hBEEHVHCYIlVI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Nathan Chancellor , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.14 15/53] ACPI: blacklist: fix clang warning for unused DMI table Date: Mon, 5 Aug 2019 15:02:40 +0200 Message-Id: <20190805124929.782402076@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124927.973499541@linuxfoundation.org> References: <20190805124927.973499541@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit b80d6a42bdc97bdb6139107d6034222e9843c6e2 ] When CONFIG_DMI is disabled, we only have a tentative declaration, which causes a warning from clang: drivers/acpi/blacklist.c:20:35: error: tentative array definition assumed to have one element [-Werror] static const struct dmi_system_id acpi_rev_dmi_table[] __initconst; As the variable is not actually used here, hide it entirely in an #ifdef to shut up the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/blacklist.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 995c4d8922b12..761f0c19a4512 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -30,7 +30,9 @@ #include "internal.h" +#ifdef CONFIG_DMI static const struct dmi_system_id acpi_rev_dmi_table[] __initconst; +#endif /* * POLICY: If *anything* doesn't work, put it on the blacklist. @@ -74,7 +76,9 @@ int __init acpi_blacklisted(void) } (void)early_acpi_osi_init(); +#ifdef CONFIG_DMI dmi_check_system(acpi_rev_dmi_table); +#endif return blacklisted; } -- 2.20.1