lkml.org 
[lkml]   [2023]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/12] net: dsa: lantiq_gswip: mark OF related data as maybe unused
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 <krzysztof.kozlowski@linaro.org>
> ---

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.

\
 
 \ /
  Last update: 2023-03-27 00:54    [W:0.460 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site