From: Paolo Abeni <pabeni@redhat.com>
To: Shigeru Yoshida <syoshida@redhat.com>, tung.q.nguyen@endava.com
Cc: jmaloy@redhat.com, ying.xue@windriver.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, netdev@vger.kernel.org,
tipc-discussion@lists.sourceforge.net,
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 13:24:36 +0200 [thread overview]
Message-ID: <596fd758-11ad-46c0-b6f1-2c04aeba5e06@redhat.com> (raw)
In-Reply-To: <20240716.164535.1952205982608398288.syoshida@redhat.com>
On 7/16/24 09:45, Shigeru Yoshida wrote:
> On Tue, 16 Jul 2024 07:35:50 +0000, Tung Nguyen wrote:
>>> net/tipc/udp_media.c | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index b849a3d133a0..439f75539977 100644
>>> --- a/net/tipc/udp_media.c
>>> +++ b/net/tipc/udp_media.c
>>> @@ -135,8 +135,11 @@ static int tipc_udp_addr2str(struct tipc_media_addr *a, char *buf, int size)
>>> snprintf(buf, size, "%pI4:%u", &ua->ipv4, ntohs(ua->port));
>>> else if (ntohs(ua->proto) == ETH_P_IPV6)
>>> snprintf(buf, size, "%pI6:%u", &ua->ipv6, ntohs(ua->port));
>>> - else
>>> + else {
>>> pr_err("Invalid UDP media address\n");
>>> + return 1;
>> Please use -EINVAL instead.
>
> Other addr2str functions like tipc_eth_addr2str() use 1, so I followed
> convention. But -EINVAL is more appropriate, as you say.
I think that consistency with other tipc helpers here would be more
appropriate: IMHO no need to send a v2.
@Tung: please trim your replies to only include the relevant quoted text
and fix your configuration to avoid inserting the long trailer, quite
unsuitable for messages sent to a public ML.
Thanks,
Paolo
next prev parent reply other threads:[~2024-07-16 11:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 2:09 Shigeru Yoshida
2024-07-16 7:35 ` Tung Nguyen
2024-07-16 7:45 ` Shigeru Yoshida
2024-07-16 11:24 ` Paolo Abeni [this message]
2024-07-16 11:43 ` Tung Nguyen
2024-07-16 13:10 ` Paolo Abeni
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=596fd758-11ad-46c0-b6f1-2c04aeba5e06@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
all inboxes | Powered by JetHome®