Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EFD7C6FD1C for ; Sat, 11 Mar 2023 18:14:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230104AbjCKSOm (ORCPT ); Sat, 11 Mar 2023 13:14:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjCKSOj (ORCPT ); Sat, 11 Mar 2023 13:14:39 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E11F6287A; Sat, 11 Mar 2023 10:14:38 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id da10so33347933edb.3; Sat, 11 Mar 2023 10:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678558477; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=z1fvfYknXX3s4BMvhdB9LJyWlF6Mhekj+R7eFWprXOE=; b=ZfJAcF7uPhRJSAXwcid6/B7qfuPr/5cWlyH703KEZViuUAK8uf9OnSkBjNxK0F5/br XCeoTPMn/AmpNYwlckwTGdkF+OFV2DvTBdwdtl/dbJj6vrPL7ZVqm9xO9aE7Z45s70Pc TukRa+naUdtVfpFSA6wzzwmqXOGSZqK6SJsfr+NEJpACgSY37KVV3c8dedN8PY7tXk2a PB0Kd8ZbH0+Yi8wB5fhEbvBSV7aw8SXL4Oll8ADCll1UgckSiFv9Qg7RbyzndBZthK3x lYdGJqL1gq4DGvfWeJWoLQ/+SL13T6cjep6emnU+B4P2dOsFLJVKeAdee4nlsqj4Ozth RYOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678558477; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z1fvfYknXX3s4BMvhdB9LJyWlF6Mhekj+R7eFWprXOE=; b=F/5ybCybR2PVGbf43Lfc3kEkwkm4A/bfaxzAVxHbnW4hdBb39f1jlk4frkB5ltRfJF vNpC4nyhzhpETwvZfsEhzeQUthPCNi5Epf2P0AcM/7sW98HCMvs3C7rO2HpvQLqfuhsW Og3t8wCDmjPGEKEB1SLi4etKHrM2OKI/9CmFezOpO4sbqKkl8mXauiJA6wp1isQy4hmy woVc871KHuyTzg3Bf4ZFOvg+zPMBcH8Gm+LYRnwl+ig+4RlJT9TWrnuszMpTz+3g7z4W i5tqGKzpmkVbkKM1IYNsL8OV92M8R1KS7YGMfPjlZJWuhukiCE4/IiQNupYPGcyXGQnH 1vQA== X-Gm-Message-State: AO0yUKXURT7qJgWGiqtRc63WCzVyIRN1OXIyKx+cLPGJYiUqpJYuyRFB MChVBKQKdRrKCnig1yohU4Y= X-Google-Smtp-Source: AK7set8ClX79YIet7szK6WARyHNYMAjqItBvSIAUu8NA8wuQkIeFJ591KGFOSJFGJFNIBAbX2sQp4g== X-Received: by 2002:a17:906:fe43:b0:88f:9c29:d232 with SMTP id wz3-20020a170906fe4300b0088f9c29d232mr39454144ejb.57.1678558476965; Sat, 11 Mar 2023 10:14:36 -0800 (PST) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id m15-20020a17090607cf00b00914fec9f40esm1338874ejc.71.2023.03.11.10.14.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 10:14:36 -0800 (PST) Date: Sat, 11 Mar 2023 20:14:34 +0200 From: Vladimir Oltean To: Krzysztof Kozlowski Cc: Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Hauke Mehrtens , Woojung Huh , UNGLinuxDriver@microchip.com, Claudiu Manoil , Alexandre Belloni , Colin Foster , Michael Hennerich , Alexander Aring , Stefan Schmidt , Miquel Raynal , Heiner Kallweit , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wpan@vger.kernel.org Subject: Re: [PATCH 01/12] net: dsa: lantiq_gswip: mark OF related data as maybe unused Message-ID: <20230311181434.lycxr5h2f6xcmwdj@skbuf> References: <20230311173303.262618-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230311173303.262618-1-krzysztof.kozlowski@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 11, 2023 at 06:32:52PM +0100, Krzysztof Kozlowski wrote: > The driver can be compile tested with !CONFIG_OF making certain data > unused: > > drivers/net/dsa/lantiq_gswip.c:1888:34: error: ‘xway_gphy_match’ defined but not used [-Werror=unused-const-variable=] > > Signed-off-by: Krzysztof Kozlowski > --- Do you happen to have any context as to why of_match_node() without CONFIG_OF is implemented as: #define of_match_node(_matches, _node) NULL and not as: static inline const struct of_device_id * of_match_node(const struct of_device_id *matches, const struct device_node *node) { return NULL; } ? Generally, the static inline shim function model is nicer, because it allows us to not scatter __maybe_unused all around.