mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yue Haibing <yuehaibing@huawei.com>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: <davem@davemloft.net>, <dsahern@kernel.org>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<horms@kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] ipv6: mcast: Remove unnecessary null check in mld_del_delrec()
Date: Mon, 14 Jul 2025 09:32:25 +0800	[thread overview]
Message-ID: <5e714038-3460-42b9-b003-616a394ee2b3@huawei.com> (raw)
In-Reply-To: <CAAVpQUC-mV=SuNNhKbpy_1Mbh_sOs856+oNqDVJ4KcLjhDh2kw@mail.gmail.com>

On 2025/7/13 6:12, Kuniyuki Iwashima wrote:
> On Sat, Jul 12, 2025 at 2:06 AM Yue Haibing <yuehaibing@huawei.com> wrote:
>>
>> These is no need to check null for pmc twice.
>>
>> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
>> ---
>>  net/ipv6/mcast.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
>> index 6c875721d423..f3dae72aa9d3 100644
>> --- a/net/ipv6/mcast.c
>> +++ b/net/ipv6/mcast.c
>> @@ -794,9 +794,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
> 
> Rather early return after the first loop if (!pmc) and
> remove 1 nest level below.

Thanks, will do in v2.
> 
> 
>>                         rcu_assign_pointer(pmc_prev->next, pmc->next);
>>                 else
>>                         rcu_assign_pointer(idev->mc_tomb, pmc->next);
>> -       }
>>
>> -       if (pmc) {
>>                 im->idev = pmc->idev;
>>                 if (im->mca_sfmode == MCAST_INCLUDE) {
>>                         tomb = rcu_replace_pointer(im->mca_tomb,
>> --
>> 2.34.1
>>
> 

      reply	other threads:[~2025-07-14  1:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-12  9:28 Yue Haibing
2025-07-12 19:32 ` Markus Elfring
2025-07-14  1:33   ` Yue Haibing
2025-07-12 22:12 ` Kuniyuki Iwashima
2025-07-14  1:32   ` Yue Haibing [this message]

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=5e714038-3460-42b9-b003-616a394ee2b3@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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®