From: Rakuram Eswaran <rakuram.e96@gmail.com>
To: lorenzo@kernel.org
Cc: angelogioacchino.delregno@collabora.com,
dan.carpenter@linaro.org, david.hunter.linux@gmail.com,
khalid@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel-mentees@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-wireless@vger.kernel.org, lkp@intel.com,
matthias.bgg@gmail.com, nbd@nbd.name, rakuram.e96@gmail.com,
rex.lu@mediatek.com, ryder.lee@mediatek.com,
sean.wang@mediatek.com, shayne.chen@mediatek.com,
skhan@linuxfoundation.org
Subject: Re: [PATCH] wifi: mt76: mt7996: remove redundant NULL check in mt7996_msdu_page_get_from_cache()
Date: Thu, 23 Oct 2025 19:54:47 +0530 [thread overview]
Message-ID: <20251023142449.117936-1-rakuram.e96@gmail.com> (raw)
In-Reply-To: aPoqiioo6kUZ0kbY@lore-desk
On Thu, 23 Oct 2025 at 18:45, Lorenzo Bianconi <lorenzo@kernel.org> wrote:
>
> > Smatch reported a warning that the NULL check on `p` in
> > `mt7996_msdu_page_get_from_cache()` is redundant:
> >
> > drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1651
> > mt7996_msdu_page_get_from_cache() warn: can 'p' even be NULL?
> >
> > The function first checks `list_empty(&dev->wed_rro.page_cache)` before
> > calling `list_first_entry()`. When the list is not empty,
> > `list_first_entry()` always returns a valid pointer and can never be NULL.
> >
> > Hence, the `if (p)` condition is unnecessary. Removing it cleans up the
> > code.
>
> Hi Rakuram,
>
> this issue has been already fixed here:
> https://patchwork.kernel.org/project/linux-wireless/patch/20251014-mt7996_msdu_page_get_from_cache-remove-null-ptr-check-v1-1-fbeb7881e192@kernel.org/
>
> Regards,
> Lorenzo
>
Hello Lorenzo,
Thank you for the information. I did check both linus-mainline and linux-next
branches before sending the patch.
From next time, I’ll make sure to also check the subsystem-specific branches as well.
Thanks again for pointing it out.
Best regards,
Rakuram
prev parent reply other threads:[~2025-10-23 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 13:04 [PATCH] wifi: mt76: mt7996: remove redundant NULL check in mt7996_msdu_page_get_from_cache() Rakuram Eswaran
2025-10-23 13:15 ` Lorenzo Bianconi
2025-10-23 14:24 ` Rakuram Eswaran [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=20251023142449.117936-1-rakuram.e96@gmail.com \
--to=rakuram.e96@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=dan.carpenter@linaro.org \
--cc=david.hunter.linux@gmail.com \
--cc=khalid@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=rex.lu@mediatek.com \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
--cc=skhan@linuxfoundation.org \
/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