From: Greg KH <gregkh@linuxfoundation.org>
To: Temitope obabi <obabitemitope765@gmail.com>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, outreachy@lists.linux.dev,
julia.lawall@inria.fr
Subject: Re: [PATCH v2] staging: sm750fb: Remove redundant NULL and zero assignments in probe
Date: Fri, 20 Nov 2026 08:11:47 +0100 [thread overview]
Message-ID: <2026112033-diagnoses-cartload-9d93@gregkh> (raw)
In-Reply-To: <20261019202015.1724-1-obabitemitope765@gmail.com>
On Mon, Oct 19, 2026 at 11:20:15PM +0300, Temitope obabi wrote:
> The sm750_dev structure is allocated with devm_kzalloc() just above,
> so its memory is already zeroed. Remove the explicit NULL assignments
> to fbinfo[0] and fbinfo[1] and the zero assignment to mtrr.vram, which
> only set fields that are already zero.
>
> Signed-off-by: Temitope obabi <obabitemitope765@gmail.com>
>
> ---
> Changes in v2:
> - Remove an accidental duplicate of the note at the end of the patch.
> No code changes.
>
> Note: Greg replied to my earlier sm750fb patch that keeping the
> explicit zero assignments is good because it is clear what is
> happening. In that patch the allocation was in a different function.
> Here the assignments are in lynxfb_pci_probe(), just after the
> devm_kzalloc() call and its NULL check, so I think removing them may
> still be useful.
Let's leave them as-is, it's nice to be explicit at times.
thanks,
greg k-h
prev parent reply other threads:[~2026-11-20 7:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 20:20 Temitope obabi
2026-11-20 7:11 ` Greg KH [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=2026112033-diagnoses-cartload-9d93@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=julia.lawall@inria.fr \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=obabitemitope765@gmail.com \
--cc=outreachy@lists.linux.dev \
--cc=sudipm.mukherjee@gmail.com \
--cc=teddy.wang@siliconmotion.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®