From: Bart Van Assche <bvanassche@acm.org>
To: Abinash Singh <abinashsinghlalotra@gmail.com>,
martin.petersen@oracle.com,
James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
dlemoal@kernel.org
Subject: Re: [PATCH v8 1/2] scsi: sd: Fix build warning in sd_revalidate_disk()
Date: Fri, 22 Aug 2025 12:47:42 -0700 [thread overview]
Message-ID: <660498d6-3526-4f1c-99d8-776fa9967747@acm.org> (raw)
In-Reply-To: <20250820144511.15329-2-abinashsinghlalotra@gmail.com>
On 8/20/25 7:45 AM, Abinash Singh wrote:
> + lim = kmalloc(sizeof(*lim), GFP_KERNEL);
> + if (!lim) {
> + sd_printk(KERN_WARNING, sdkp,
> + "sd_revalidate_disk: Disk limit allocation failure.\n");
> + goto out;
> + }
From Documentation/process/coding-style.rst:
These generic allocation functions all emit a stack dump on failure when
used
without __GFP_NOWARN so there is no use in emitting an additional failure
message when NULL is returned.
> buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL);
> if (!buffer) {
> sd_printk(KERN_WARNING, sdkp, "sd_revalidate_disk: Memory "
Has this example perhaps been followed? I think it is safe to remove
this sd_printk() statement.
Otherwise this patch looks good to me.
Thanks,
Bart.
next prev parent reply other threads:[~2025-08-22 19:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 14:45 [PATCH v8 0/2] " Abinash Singh
2025-08-20 14:45 ` [PATCH v8 1/2] " Abinash Singh
2025-08-22 19:47 ` Bart Van Assche [this message]
2025-08-24 16:29 ` Abinash Singh
2025-08-20 14:45 ` [PATCH v8 2/2] scsi: sd: make sd_revalidate_disk() return void Abinash Singh
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=660498d6-3526-4f1c-99d8-776fa9967747@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=abinashsinghlalotra@gmail.com \
--cc=dlemoal@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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®