public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Xingui Yang <yangxingui@huawei.com>
Cc: rafael@kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxarm@huawei.com,
	prime.zeng@hisilicon.com, liyihang9@huawei.com,
	kangfenglong@huawei.com
Subject: Re: [PATCH] driver core: Add log when devtmpfs create node failed
Date: Wed, 22 May 2024 14:23:28 +0200	[thread overview]
Message-ID: <2024052221-pulverize-worrisome-37fb@gregkh> (raw)
In-Reply-To: <20240522114346.42951-1-yangxingui@huawei.com>

On Wed, May 22, 2024 at 11:43:46AM +0000, Xingui Yang wrote:
> Currently, no exception information is output when devtmpfs create node
> failed, so add log info for it.

Why?  Who is going to do something with this?

> 
> Signed-off-by: Xingui Yang <yangxingui@huawei.com>
> ---
>  drivers/base/core.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 5f4e03336e68..32a41e0472b2 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -3691,7 +3691,10 @@ int device_add(struct device *dev)
>  		if (error)
>  			goto SysEntryError;
>  
> -		devtmpfs_create_node(dev);
> +		error = devtmpfs_create_node(dev);
> +		if (error)
> +			pr_info("devtmpfs create node for %s failed: %d\n",
> +				dev_name(dev), error);

Why is an error message pr_info()?

And again, why is this needed?  If this needs to be checked, why are you
now checking it but ignoring the error?

What would this help with?

thanks,

greg k-h

  reply	other threads:[~2024-05-22 12:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22 11:43 [PATCH] driver core: Add log when devtmpfs create node failed Xingui Yang
2024-05-22 12:23 ` Greg KH [this message]
2024-05-23  1:50   ` yangxingui
2024-05-23  7:25     ` Greg KH
2024-05-23  9:23       ` yangxingui
2024-05-23  9:35         ` Greg KH
2024-05-23 11:01           ` yangxingui
2024-05-29  2:49 ` kernel test robot

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=2024052221-pulverize-worrisome-37fb@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=kangfenglong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liyihang9@huawei.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=rafael@kernel.org \
    --cc=yangxingui@huawei.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