Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] build: missing prototype for drop_reason_lookup() on !CONFIG_TRACEPOINTS
--

commit 052e9cafef9be2c8ee3e8254caa3827b7ac1f5b6
Author: Johannes Berg <[email protected]>

net: drop_monitor: use drop_reason_lookup()

This commit updates drop_monitor to use drop_reason_lookup() instead of
exporting the drop_reasons_by_subsys list. It unconditionally exposes the
drop_reason_lookup() function.

> diff --git a/include/net/dropreason.h b/include/net/dropreason.h
> index dc4a60130c09c..4680da5964ef7 100644
> --- a/include/net/dropreason.h
> +++ b/include/net/dropreason.h
[ ... ]
> -/* Note: due to dynamic registrations, access must be under RCU */
> -extern const struct drop_reason_list __rcu *
> -drop_reasons_by_subsys[SKB_DROP_REASON_SUBSYS_NUM];
> -
>  #ifdef CONFIG_TRACEPOINTS
>  const char *drop_reason_lookup(unsigned long long value);

[Severity: Low]
Will this cause a missing prototype build warning when CONFIG_TRACEPOINTS
is disabled?

The drop_reason_lookup() prototype in include/net/dropreason.h is conditionally
guarded by CONFIG_TRACEPOINTS.

>  void drop_reason_show(struct seq_file *m);
[ ... ]
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index de294ce08a32c..a4ae26acc68c2 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
[ ... ]
> -EXPORT_SYMBOL(drop_reasons_by_subsys);
>  
> -#ifdef CONFIG_TRACEPOINTS
>  const char *drop_reason_lookup(unsigned long long value)

However, the function definition in net/core/skbuff.c is now compiled
unconditionally. This causes a -Wmissing-prototypes compiler warning when
compiling the kernel with CONFIG_TRACEPOINTS disabled.

Could this break builds where WERROR or W=1 is enabled?

>  {
>       unsigned long long subsys_id = value >> SKB_DROP_REASON_SUBSYS_SHIFT;

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=4

Reply via email to