Subject: Re: [PATCH net-next v5 06/12] net: homa: create homa_peer.h and homa_peer.c

From: Jakub Kicinski <[email-masked]>
Date: Tue, 7 Jan 2025 06:15:10 -0800

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