[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c87f411c-ad0e-4c14-b437-8191db438531@redhat.com>
Date: Tue, 16 Jul 2024 15:10:22 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Tung Nguyen <tung.q.nguyen@...ava.com>,
Shigeru Yoshida <syoshida@...hat.com>
Cc: "jmaloy@...hat.com" <jmaloy@...hat.com>,
"ying.xue@...driver.com" <ying.xue@...driver.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"tipc-discussion@...ts.sourceforge.net"
<tipc-discussion@...ts.sourceforge.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] tipc: Return non-zero value from tipc_udp_addr2str()
on error
On 7/16/24 13:43, Tung Nguyen wrote:
>
>> I think that consistency with other tipc helpers here would be more
>> appropriate: IMHO no need to send a v2.
>>
> I do not think so. If you look at other helper functions for udp media, they use predefined error codes, for example:
> tipc_udp_msg2addr()
> {
> ...
> return -EINVAL;
> ...
> }
It's not a big deal really, but, as noted by Shigeru, all the other
tipc_*_addr2str() callbacks return 1 on error and such callback is
invoked via function pointer.
If only this one returns a negative error, modification to the function
pointer callsite will become prone to errors (and stable backports more
fragiles)
Cheers,
Paolo
Powered by blists - more mailing lists