[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXJAmz+FVRHXh=CrBcp-T-cLX3+s6BRH7DtBzaoFrpQb1zf9w@mail.gmail.com>
Date: Tue, 7 Jan 2025 12:53:28 -0800
From: John Ousterhout <ouster@...stanford.edu>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, edumazet@...gle.com,
horms@...nel.org
Subject: Re: [PATCH net-next v5 06/12] net: homa: create homa_peer.h and homa_peer.c
I have removed the cast now.
-John-
On Tue, Jan 7, 2025 at 6:15 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 6 Jan 2025 10:12:12 -0800 John Ousterhout wrote:
> > +void homa_dst_refresh(struct homa_peertab *peertab, struct homa_peer *peer,
> > + struct homa_sock *hsk)
> > +{
> > + struct dst_entry *dst;
> > +
> > + spin_lock_bh(&peertab->write_lock);
> > + dst = homa_peer_get_dst(peer, &hsk->inet);
> > + if (!IS_ERR(dst)) {
> > + struct homa_dead_dst *dead = (struct homa_dead_dst *)
> > + kmalloc(sizeof(*dead), GFP_KERNEL);
>
> coccicheck says:
>
> net/homa/homa_peer.c:227:32-52: WARNING: casting value returned by memory allocation function to (struct homa_dead_dst *) is useless.
> --
> pw-bot: cr
Powered by blists - more mailing lists