All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nilay Shroff <nilay@linux.ibm.com>
To: Maurizio Lombardi <mlombard@arkamax.eu>,
	kbusch@kernel.org, hch@lst.de, hare@suse.de, sagi@grimberg.me,
	chaitanyak@nvidia.com, gjoyce@linux.ibm.com, kuba@kernel.org,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	horms@kernel.org
Cc: linux-nvme@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [RESEND PATCH v2 3/4] nvme: add debugfs helpers for NVMe drivers
Date: Sat, 1 Aug 2026 19:17:55 +0530	[thread overview]
Message-ID: <16986c93-097f-46ec-be40-7e4b6aeb42da@linux.ibm.com> (raw)
In-Reply-To: <DKCLUFJYS7HH.2EBXAQNUPN5B2@arkamax.eu>

On 7/31/26 1:44 PM, Maurizio Lombardi wrote:
> On Fri Jul 31, 2026 at 9:39 AM CEST, Nilay Shroff wrote:
>> +static int nvme_debugfs_open(struct inode *inode, struct file *file)
>> +{
>> +	void *data = inode->i_private;
>> +	struct nvme_debugfs_attr *attr = debugfs_get_aux(file);
>> +	struct nvme_debugfs_ctx *ctx;
>> +	struct seq_file *m;
>> +	int ret;
>> +
>> +	if (attr->get && !attr->get(data))
>> +		return -ENODEV;
>> +
>> +	ctx = kzalloc_obj(*ctx);
>> +	if (WARN_ON_ONCE(!ctx)) {
>> +		ret = -ENOMEM;
>> +		goto out;
>> +	}
> 
> Just a nit, I don't think that raising a warning just because
> kzalloc() returned NULL is a good idea as failures can naturally
> occur under OOM conditions and aren't bugs.
> 

Alright, I'll change it to just return -ENOMEM without producing
a warning, in case kzalloc fails.

Thanks,
--Nilay


  reply	other threads:[~2026-08-01 13:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31  7:39 [RESEND PATCH v2 0/4] nvme-tcp: NIC topology aware I/O queue scaling and queue info export Nilay Shroff
2026-07-31  7:39 ` [RESEND PATCH v2 1/4] net: add helper for device lookup by destination address Nilay Shroff
2026-07-31  7:39 ` [RESEND PATCH v2 2/4] nvme-tcp: limit I/O queue count based on NIC queue count Nilay Shroff
2026-07-31 16:41   ` Stanislav Fomichev
2026-08-01 13:38     ` Nilay Shroff
2026-07-31  7:39 ` [RESEND PATCH v2 3/4] nvme: add debugfs helpers for NVMe drivers Nilay Shroff
2026-07-31  8:14   ` Maurizio Lombardi
2026-08-01 13:47     ` Nilay Shroff [this message]
2026-07-31  7:39 ` [RESEND PATCH v2 4/4] nvme: expose queue information via debugfs Nilay Shroff
2026-07-31 16:39 ` [RESEND PATCH v2 0/4] nvme-tcp: NIC topology aware I/O queue scaling and queue info export Stanislav Fomichev
2026-08-01 13:45   ` Nilay Shroff

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=16986c93-097f-46ec-be40-7e4b6aeb42da@linux.ibm.com \
    --to=nilay@linux.ibm.com \
    --cc=chaitanyak@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gjoyce@linux.ibm.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=horms@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mlombard@arkamax.eu \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sagi@grimberg.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.