Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1693804rwi; Thu, 20 Oct 2022 16:21:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6006s5AFUBZSHkrVGi9W3ZWWCD/nd25Zrd2AUr3zzMElx2gcrGodMEWEYEW5MoiQ0hIM0i X-Received: by 2002:a05:6402:34d0:b0:460:96c4:94af with SMTP id w16-20020a05640234d000b0046096c494afmr4717794edc.365.1666308060256; Thu, 20 Oct 2022 16:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666308060; cv=none; d=google.com; s=arc-20160816; b=y149gwv8FXxjjhjBG1eB4QWY2buqjUf5Jyk4jmm04WOIbr/gKFcU5n2xY/Tc1k/I7/ nVkg9lLq9QL9GOwdJaEvYXYCMKehocnGVh5tz00quJWzBo4xO8Cf6HzjORj7awlPKdHB eIAVB42tGTP6ZUnCTb3ma5NTwpBZMtRTSK6ZgyuQTkhIjFXbGxLwQv6qz68qUhD/EycS WbTvRp5mfb4bfQgbhCfmIunTqPPF6xeAgT6l6M9q+4jIwT9vXLMvIqeNFqtyWdozw9eQ Yl6thnWv8rB108EteBwYdCWPUP8jeXKIOuqfimTNUL56RmWFCxkOle0ohxG8VHnfrdzY HShA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:list-id:precedence:in-reply-to:subject:date:to:from :dkim-signature; bh=5HLtj6M5N8x5SCdnb3ABMngx/UZALXblAVL++swe094=; b=b/TYjmhIe4jUwU0sK6lvEkGQ+VYeIlbiOZGGkcPQzgsWv0/0+tj6dEstjpWao47vWT H/D+Nfer5/tJyrKicBPKsfZrJy1CTsWl7u7JmayrkfYSaYZ7bNG0lV5KJW8GB/HdM02c kjgwh3aXPymQk5pbKT/P5w72TJtpKzYNOPfirXVfvGal1ccDtOvldmzOG3Y3exejkCrp bPRqwJWjFK26r5Ioz8DX8bRtVDtpQccDp43nduAh3tWBkLmZSUhzmnYxoCpEIaSe0byv TT6sKab6mwg1kDsnyPkbOdItfPI6ibEoVoVwwLnFHp7lxK4KDMghThczHgCHiFMt9u0k Xr/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@angband.pl header.s=tartarus header.b=eutvSdRk; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a170906a18b00b0078200e81b92si18086910ejy.758.2022.10.20.16.20.33; Thu, 20 Oct 2022 16:21:00 -0700 (PDT) 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=fail header.i=@angband.pl header.s=tartarus header.b=eutvSdRk; 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 S230039AbiJTWqm (ORCPT + 99 others); Thu, 20 Oct 2022 18:46:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230166AbiJTWqV (ORCPT ); Thu, 20 Oct 2022 18:46:21 -0400 Received: from tartarus.angband.pl (tartarus.angband.pl [51.83.246.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F270139C16; Thu, 20 Oct 2022 15:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=angband.pl; s=tartarus; h=In-Reply-To:Subject:Date:To:From:Resent-To:Resent-Message-ID: Resent-Date:Resent-From:Sender:Reply-To:Message-ID:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Sender:Resent-Cc:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5HLtj6M5N8x5SCdnb3ABMngx/UZALXblAVL++swe094=; b=eutvSdRkC+80sIpaXSyOkRBg9Y DXIqVrzREhej/NOftb2AAYNc2wRlx6CpqzMEYRG17Hck7T1nz/EJoImtJbfGGQ4jOrgp0fROEYr8X mnIQaimqtEUvAHuEzwlUkxmAM+7e1ORKhGJnkv9Gq0arPNaTEuEGFCOoCZEd3dnNIEbA=; Received: from kilobyte by tartarus.angband.pl with local (Exim 4.94.2) (envelope-from ) id 1oleIs-009ObH-2C; Fri, 21 Oct 2022 00:46:18 +0200 From: Adam Borowski To: Khalil Blaiech , Asmaa Mnebhi , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 10 Oct 2022 20:33:51 +0200 Subject: [PATCH 5/6] i2c: mlxbf: depend on ACPI; clean away ifdeffage In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MISSING_MID,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 Message-Id: This fixes maybe_unused warnings/errors. According to a comment during device tree removal, only ACPI is supported, thus let's actually require it. Fixes: be18c5ede25da39a0eda541f6de3620a30cf731f Signed-off-by: Adam Borowski --- drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-mlxbf.c | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 264e780ae32e..e50f9603d189 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -764,6 +764,7 @@ config I2C_LPC2K config I2C_MLXBF tristate "Mellanox BlueField I2C controller" depends on MELLANOX_PLATFORM && ARM64 + depends on ACPI select I2C_SLAVE help Enabling this option will add I2C SMBus support for Mellanox BlueField diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c index e68e775f187e..1810d5791b3d 100644 --- a/drivers/i2c/busses/i2c-mlxbf.c +++ b/drivers/i2c/busses/i2c-mlxbf.c @@ -2247,7 +2247,6 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = { .max_write_len = MLXBF_I2C_MASTER_DATA_W_LENGTH, }; -#ifdef CONFIG_ACPI static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = { { "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] }, { "MLNXBF23", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2] }, @@ -2282,12 +2281,6 @@ static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv) return 0; } -#else -static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv) -{ - return -ENOENT; -} -#endif /* CONFIG_ACPI */ static int mlxbf_i2c_probe(struct platform_device *pdev) { @@ -2490,9 +2483,7 @@ static struct platform_driver mlxbf_i2c_driver = { .remove = mlxbf_i2c_remove, .driver = { .name = "i2c-mlxbf", -#ifdef CONFIG_ACPI .acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids), -#endif /* CONFIG_ACPI */ }, }; -- 2.37.2.609.g9ff673ca1a