From patchwork Tue Feb 9 21:12:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George McCollister X-Patchwork-Id: 12079251 X-Patchwork-Delegate: kuba@kernel.org 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 77FB1C4332E for ; Tue, 9 Feb 2021 21:31:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 461A864EAC for ; Tue, 9 Feb 2021 21:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234410AbhBIV2s (ORCPT ); Tue, 9 Feb 2021 16:28:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233922AbhBIVOO (ORCPT ); Tue, 9 Feb 2021 16:14:14 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA0EC0613D6 for ; Tue, 9 Feb 2021 13:13:26 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id m7so20948650oiw.12 for ; Tue, 09 Feb 2021 13:13:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=zOr93WXqZTrgj40r/VXH5RS6b9QPAmKqC4y8SY4MmVE=; b=IFfzTe2Vf7XGKUlO54vbIpDDLyvgED0kGUirNPBVeEj8z4rYkPjYgJ9LJlCuQsKQnt VjgIF+DzJDNOh0e98JWTVECnJiFOktX+GRv+Lq6q80o8VsQ8roSR4q/+Zd6QVe1QP9oo BMCZ5q0jDd+dcYyKWASOtEuATFeTckGKnT6fK3Vq2qdP6Eje4C5DP+c/zP271TmFQ1nU eg0fOGQAozdm56OItFl/oln4d/xDVkgKQsnpzKarNxSKQkb+8or4dz0QnXenvVRANOpV wx1Asuj3ri0OXRKTJQHo6Za6qaT7Hby12dx+M9eSgjn6wqLNJYazOvAz8Bnvlbzpl8Lk vJ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zOr93WXqZTrgj40r/VXH5RS6b9QPAmKqC4y8SY4MmVE=; b=HF+6XDji7OCHPypOE4+2bHyqAdHuVO6PiNugWRENo8DLPz6C2i0yQUV6jmQGQ5ks6+ DG33OOvNXcQsGD1szVQkHqNRfBtEu8LGa0byXPprcp+QW5B67X8DH3oEBLk0Ayr8YZ2n XKeOFMXrRi7a1AqNcdyz14ymNoPYVJHgEdGOjEDAzuxpYJOuURsbf5/EA1rjQcb/7c2z gYgv/xlnjxo1/O1Wq0gtY7CxhmUsCESziJj20mBdEI6KlDNE1oR06gT+vOQ+FksLpzLg qL6tMKq81KOqJNJNlj+Sthxn8mSDFenubVHTmwcf8Lso8MSuAr3a9bIIz2QueDFDpPML 6Uyg== X-Gm-Message-State: AOAM530b1zWOj8u9QZV4Rq8/dhZWzkGARYof2H3cEZVG4zwXxZB3yShW NGpdsL/bluxAkdlNDesjYQ== X-Google-Smtp-Source: ABdhPJwQPIVjg/jV61MvVZhkFP+s+dN16N9y4y2ncRKXop9+HP8hE+y3MzTIl73QXUwduzB+gYBDzQ== X-Received: by 2002:aca:5f85:: with SMTP id t127mr3577862oib.76.1612905205795; Tue, 09 Feb 2021 13:13:25 -0800 (PST) Received: from threadripper.novatech-llc.local ([216.21.169.52]) by smtp.gmail.com with ESMTPSA id r4sm2512777oig.52.2021.02.09.13.13.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Feb 2021 13:13:24 -0800 (PST) From: George McCollister To: Jakub Kicinski Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , netdev@vger.kernel.org, George McCollister Subject: [PATCH net-next 1/2] net: dsa: xrs700x: fix unused warning for of_device_id Date: Tue, 9 Feb 2021 15:12:55 -0600 Message-Id: <20210209211256.111764-1-george.mccollister@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Fix unused variable warning that occurs when CONFIG_OF isn't defined by adding __maybe_unused. >> drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids' [-Wunused-const-variable] static const struct of_device_id xrs700x_i2c_dt_ids[] = { Reported-by: kernel test robot Signed-off-by: George McCollister Reviewed-by: Florian Fainelli --- drivers/net/dsa/xrs700x/xrs700x_i2c.c | 2 +- drivers/net/dsa/xrs700x/xrs700x_mdio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/xrs700x/xrs700x_i2c.c b/drivers/net/dsa/xrs700x/xrs700x_i2c.c index 16a46a78a037..489d9385b4f0 100644 --- a/drivers/net/dsa/xrs700x/xrs700x_i2c.c +++ b/drivers/net/dsa/xrs700x/xrs700x_i2c.c @@ -121,7 +121,7 @@ static const struct i2c_device_id xrs700x_i2c_id[] = { MODULE_DEVICE_TABLE(i2c, xrs700x_i2c_id); -static const struct of_device_id xrs700x_i2c_dt_ids[] = { +static const struct of_device_id __maybe_unused xrs700x_i2c_dt_ids[] = { { .compatible = "arrow,xrs7003e", .data = &xrs7003e_info }, { .compatible = "arrow,xrs7003f", .data = &xrs7003f_info }, { .compatible = "arrow,xrs7004e", .data = &xrs7004e_info }, diff --git a/drivers/net/dsa/xrs700x/xrs700x_mdio.c b/drivers/net/dsa/xrs700x/xrs700x_mdio.c index a10ee28eb86e..3b3b78f20263 100644 --- a/drivers/net/dsa/xrs700x/xrs700x_mdio.c +++ b/drivers/net/dsa/xrs700x/xrs700x_mdio.c @@ -138,7 +138,7 @@ static void xrs700x_mdio_remove(struct mdio_device *mdiodev) xrs700x_switch_remove(priv); } -static const struct of_device_id xrs700x_mdio_dt_ids[] = { +static const struct of_device_id __maybe_unused xrs700x_mdio_dt_ids[] = { { .compatible = "arrow,xrs7003e", .data = &xrs7003e_info }, { .compatible = "arrow,xrs7003f", .data = &xrs7003f_info }, { .compatible = "arrow,xrs7004e", .data = &xrs7004e_info }, From patchwork Tue Feb 9 21:12:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George McCollister X-Patchwork-Id: 12079253 X-Patchwork-Delegate: kuba@kernel.org 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 233CFC43332 for ; Tue, 9 Feb 2021 21:31:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D20CD64E92 for ; Tue, 9 Feb 2021 21:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234436AbhBIVaQ (ORCPT ); Tue, 9 Feb 2021 16:30:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233924AbhBIVOO (ORCPT ); Tue, 9 Feb 2021 16:14:14 -0500 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B424C061788 for ; Tue, 9 Feb 2021 13:13:28 -0800 (PST) Received: by mail-oi1-x22d.google.com with SMTP id k204so19418871oih.3 for ; Tue, 09 Feb 2021 13:13:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PDpwFkmPxH6ciI2XoWxAqgpzMyliu9KEV9JmnUxkEXM=; b=KYc5ofENeXxcywILRgEwKQE5y1MqWfn3pVoDllTF7Dsd18PkcM4hsBkEC6yD9uvQeu 4D1hLK9ZAeQ0LUoWldu5HipiUo6dLsOM6hcVvzesj8xmn564pcYcCV89rMc6xtFOBSSb NWnXeGng5jtQgd1SGGJfobpyOtVwOm4nTttOuV7TdghACX6Xx265ZhLTEubxKLGgnEuW HR28nrAlSt8aPWnJj2PeNdgzX9+2ugsfZxv7oPx2QuBGbqb0339NiG6qDEEUjQRuePD8 fExiqngCrvCfeqXxVaOFLenOmqj0kRzy4H8oaSeO6MqFyQsVorP0XHIbRaeJgzf/MkTh kZuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PDpwFkmPxH6ciI2XoWxAqgpzMyliu9KEV9JmnUxkEXM=; b=eyLzK6dnvrqFh0oZ3vjnPTGEiK+6N+fL3jCWroklaR7l6wfHyXwwOfo+6jE01E2hR2 p5HPk9pd4cMrLJTor291afebLeQQJiEXCax0khvz1TNUa0lqpKU38Y13jXr0n4FFFruF zmsBWFkamon7v9Le2KWRUU+O55G9U5AgErsXyoDwRYeaTmOlhcDjMGpCAng1xF6iMlZR mi9DK/XaWBHQm0NOc8TJPhn0DGc9AqKtAwoKsVNa1H+PonDJs3VfPL4oRk/dAxf3/SR+ m806AT55ng+/xg5DVlQGjfN29uMyG7cIYJuvaDLF6QFhwLykj9vHrRaCdYltNpenHIVK HCqg== X-Gm-Message-State: AOAM533qy1rqT67QCgIlfis62RWZ4BkqCQ127w3J2vgct7r1T+rVIKx4 jwvM+FfAm9qEl1cEr25dWg== X-Google-Smtp-Source: ABdhPJxCmWQDcOiLMxDZIZZ3GTilrTn/PUOeFtMrtpG/nEoSewJrPR1nShCDfsa9QY02QJtF3VVOtg== X-Received: by 2002:aca:f00a:: with SMTP id o10mr3759516oih.175.1612905207795; Tue, 09 Feb 2021 13:13:27 -0800 (PST) Received: from threadripper.novatech-llc.local ([216.21.169.52]) by smtp.gmail.com with ESMTPSA id r4sm2512777oig.52.2021.02.09.13.13.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Feb 2021 13:13:26 -0800 (PST) From: George McCollister To: Jakub Kicinski Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , netdev@vger.kernel.org, George McCollister Subject: [PATCH net-next 2/2] net: dsa: xrs700x: use of_match_ptr() on xrs700x_mdio_dt_ids Date: Tue, 9 Feb 2021 15:12:56 -0600 Message-Id: <20210209211256.111764-2-george.mccollister@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210209211256.111764-1-george.mccollister@gmail.com> References: <20210209211256.111764-1-george.mccollister@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use of_match_ptr() on xrs700x_mdio_dt_ids so that NULL is substituted when CONFIG_OF isn't defined. This will prevent unnecessary use of xrs700x_mdio_dt_ids when CONFIG_OF isn't defined. Signed-off-by: George McCollister Reviewed-by: Florian Fainelli --- drivers/net/dsa/xrs700x/xrs700x_mdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/xrs700x/xrs700x_mdio.c b/drivers/net/dsa/xrs700x/xrs700x_mdio.c index 3b3b78f20263..44f58bee04a4 100644 --- a/drivers/net/dsa/xrs700x/xrs700x_mdio.c +++ b/drivers/net/dsa/xrs700x/xrs700x_mdio.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "xrs700x.h" #include "xrs700x_reg.h" @@ -150,7 +151,7 @@ MODULE_DEVICE_TABLE(of, xrs700x_mdio_dt_ids); static struct mdio_driver xrs700x_mdio_driver = { .mdiodrv.driver = { .name = "xrs700x-mdio", - .of_match_table = xrs700x_mdio_dt_ids, + .of_match_table = of_match_ptr(xrs700x_mdio_dt_ids), }, .probe = xrs700x_mdio_probe, .remove = xrs700x_mdio_remove,