From patchwork Fri Sep 11 16:27:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 256788 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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 719CFC43461 for ; Fri, 11 Sep 2020 16:30:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 272E8221EB for ; Fri, 11 Sep 2020 16:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599841841; bh=iVrTsu1h/6XlgdpG7zNyUdsnzo/x/58Z/4c9hRJI3iM=; h=From:To:Cc:Subject:Date:List-ID:From; b=zdV2kJ39OEeE0LEgzz2axlH9k3fGo4vpVaRWWCPP0du+fAK4d+p5eg6uH2GhZCUyM ClaAvXDGPn/0CcegKRa78ggLXfWlb4N1hr7ldLLND6prK+O0qtCuYBr/lLNl6oTmm7 IZ84cIKWyz+JYt3lZcaw1bkgEpQdxmI2nKlpptXI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbgIKQai (ORCPT ); Fri, 11 Sep 2020 12:30:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726613AbgIKQ1m (ORCPT ); Fri, 11 Sep 2020 12:27:42 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 79C56221EB; Fri, 11 Sep 2020 16:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599841654; bh=iVrTsu1h/6XlgdpG7zNyUdsnzo/x/58Z/4c9hRJI3iM=; h=From:To:Cc:Subject:Date:From; b=p5w4DH3NWmRDXCmqROyjGb503AOrxeMLr3ldg0FtnhVLzvq4sRSHrK83BXXPNaxzZ Pd7c9Hq1BTErlyyx7oIMPEDJ3fCaKoOiOZM2uRdSyo5bEzOPoRcmOcGe/cmCAyBIzY bvQzUzzXqOCedLTOKikBMlt/6Ck/CdlDZDDRJN5g= From: Krzysztof Kozlowski To: Sebastian Reichel , Jonathan Bakker , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/7] power: supply: bq24257: skip 'struct acpi_device_id' when !CONFIG_ACPI Date: Fri, 11 Sep 2020 18:27:23 +0200 Message-Id: <20200911162729.3022-1-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused: drivers/power/supply/bq24257_charger.c:1155:36: warning: 'bq24257_acpi_match' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski --- drivers/power/supply/bq24257_charger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power/supply/bq24257_charger.c b/drivers/power/supply/bq24257_charger.c index 8e60cb0f3c3f..96cb3290bcaa 100644 --- a/drivers/power/supply/bq24257_charger.c +++ b/drivers/power/supply/bq24257_charger.c @@ -1152,6 +1152,7 @@ static const struct of_device_id bq24257_of_match[] = { }; MODULE_DEVICE_TABLE(of, bq24257_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id bq24257_acpi_match[] = { { "BQ242500", BQ24250 }, { "BQ242510", BQ24251 }, @@ -1159,6 +1160,7 @@ static const struct acpi_device_id bq24257_acpi_match[] = { {}, }; MODULE_DEVICE_TABLE(acpi, bq24257_acpi_match); +#endif static struct i2c_driver bq24257_driver = { .driver = {