From: Paolo Abeni <pabeni@redhat.com>
To: Tung Nguyen <tung.q.nguyen@endava.com>,
Shigeru Yoshida <syoshida@redhat.com>
Cc: "jmaloy@redhat.com" <jmaloy@redhat.com>,
"ying.xue@windriver.com" <ying.xue@windriver.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"tipc-discussion@lists.sourceforge.net"
<tipc-discussion@lists.sourceforge.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] tipc: Return non-zero value from tipc_udp_addr2str() on error
Date: Tue, 16 Jul 2024 15:10:22 +0200 [thread overview]
Message-ID: <c87f411c-ad0e-4c14-b437-8191db438531@redhat.com> (raw)
In-Reply-To: <AS5PR06MB875264DC53F4C10ACA87D227DBA22@AS5PR06MB8752.eurprd06.prod.outlook.com>
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
next prev parent reply other threads:[~2024-07-16 13:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 2:09 [PATCH net] tipc: Return non-zero value from tipc_udp_addr2str() on error Shigeru Yoshida
2024-07-16 7:35 ` Tung Nguyen
2024-07-16 7:45 ` Shigeru Yoshida
2024-07-16 11:24 ` Paolo Abeni
2024-07-16 11:43 ` Tung Nguyen
2024-07-16 13:10 ` Paolo Abeni [this message]
2024-07-16 13:29 ` Tung Nguyen
2024-07-17 2:03 ` Shigeru Yoshida
2024-07-17 2:10 ` Tung Nguyen
2024-07-17 2:48 ` Shigeru Yoshida
2024-07-17 15:31 ` Jakub Kicinski
2024-07-18 1:30 ` Tung Nguyen
2024-07-18 7:49 ` Paolo Abeni
2024-07-24 11:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c87f411c-ad0e-4c14-b437-8191db438531@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jmaloy@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=syoshida@redhat.com \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=tung.q.nguyen@endava.com \
--cc=ying.xue@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).