public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: decnet: fix build error due to incompatible pointer type, in dn_dst_gc
@ 2026-01-23 23:23 Carlos Bilbao
  2026-01-24 20:33 ` David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Bilbao @ 2026-01-23 23:23 UTC (permalink / raw)
  To: davem, kuba, jmaxwell37, dsahern, linux-decnet-user
  Cc: linux-kernel, netdev, bilbao

Update the signature of dn_dst_gc() to return void instead of int.

This change is required because the .gc member of struct dst_ops was
updated to a void return type in a previous commit [1]. This leads to the
following build error:

net/decnet/dn_route.c:132:10: error: initialization of 'void (*)(struct dst_ops *)' from incompatible pointer type 'int (*)(struct dst_ops *)' [-Werror=incompatible-pointer-types]

Note that dst_alloc() inside net/core/dst.c was already updated to
ignore the return value of this callback.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=af6d10345ca76670c1b7c37799f0d5576ccef277

Fixes: af6d10345ca7 ("ipv6: remove max_size check inline with ipv4")
Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
---
 net/decnet/dn_route.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 729d3de6020d..840a0e3852de 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -100,7 +100,7 @@ static const int dn_rt_mtu_expires = 10 * 60 * HZ;

 static unsigned long dn_rt_deadline;

-static int dn_dst_gc(struct dst_ops *ops);
+static void dn_dst_gc(struct dst_ops *ops);
 static struct dst_entry *dn_dst_check(struct dst_entry *, __u32);
 static unsigned int dn_dst_default_advmss(const struct dst_entry *dst);
 static unsigned int dn_dst_mtu(const struct dst_entry *dst);
@@ -208,7 +208,7 @@ static void dn_dst_check_expire(struct timer_list *unused)
     mod_timer(&dn_route_timer, now + decnet_dst_gc_interval * HZ);
 }

-static int dn_dst_gc(struct dst_ops *ops)
+static void dn_dst_gc(struct dst_ops *ops)
 {
     struct dn_route *rt;
     struct dn_route __rcu **rtp;
@@ -236,8 +236,6 @@ static int dn_dst_gc(struct dst_ops *ops)
         }
         spin_unlock_bh(&dn_rt_hash_table[i].lock);
     }
-
-    return 0;
 }

 /*
--
2.50.1 (Apple Git-155)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: decnet: fix build error due to incompatible pointer type, in dn_dst_gc
  2026-01-23 23:23 [PATCH] net: decnet: fix build error due to incompatible pointer type, in dn_dst_gc Carlos Bilbao
@ 2026-01-24 20:33 ` David Ahern
  0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2026-01-24 20:33 UTC (permalink / raw)
  To: Carlos Bilbao, davem, kuba, jmaxwell37, linux-decnet-user
  Cc: linux-kernel, netdev, bilbao

On 1/23/26 4:23 PM, Carlos Bilbao wrote:
> Update the signature of dn_dst_gc() to return void instead of int.
> 
> This change is required because the .gc member of struct dst_ops was
> updated to a void return type in a previous commit [1]. This leads to the
> following build error:
> 
> net/decnet/dn_route.c:132:10: error: initialization of 'void (*)(struct dst_ops *)' from incompatible pointer type 'int (*)(struct dst_ops *)' [-Werror=incompatible-pointer-types]
> 
> Note that dst_alloc() inside net/core/dst.c was already updated to
> ignore the return value of this callback.
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=af6d10345ca76670c1b7c37799f0d5576ccef277
> 
> Fixes: af6d10345ca7 ("ipv6: remove max_size check inline with ipv4")
> Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
> ---
>  net/decnet/dn_route.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 

commit 1202cdd665315c525b5237e96e0bedc76d7e754f
Author: Stephen Hemminger <stephen@networkplumber.org>
Date:   Wed Aug 17 17:43:21 2022 -0700

    Remove DECnet support from kernel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-24 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 23:23 [PATCH] net: decnet: fix build error due to incompatible pointer type, in dn_dst_gc Carlos Bilbao
2026-01-24 20:33 ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox