Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp304650lqp; Wed, 22 May 2024 05:23:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXs/nAhQQrJgsO8fEisvXwxcyKj8HJpyjyNAAHaQC0fMTOxisxSpB1v/bTpapKqQXlEWtb9IQ5qISV6UXimTVMTvMQxI2q0AC1HuDmH6A== X-Google-Smtp-Source: AGHT+IG5CHiC8YW2fHKxvbyuwJgxRD2y3JnmkG9WZDNzlAaH8/LYdfBNHYAbKY8aFdPXpxsC3WeZ X-Received: by 2002:a17:906:916:b0:a59:c23d:85ce with SMTP id a640c23a62f3a-a62281e2423mr166045166b.51.1716380621821; Wed, 22 May 2024 05:23:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716380621; cv=pass; d=google.com; s=arc-20160816; b=LhmpMDYfANUZ1ZsZcEjWuO/IxMayERuTC5wOaCSguSWyMz7rKfNv11XAXrYmMRYURH +W1hHSlJ0gJUbtKTXpsLKCCsfJfGomoSrf2bzo0WkqBAAJ4WZY32KNvXhghFWRWKHpoT el5IDrD8rCZb9uYWCNWewjaXavcxegLFu8leOgx7rDSKssZOkJyuOE8s3EaGTDIK6hj7 fv7GCrnqIgaUVMRVIWJUtcZlp0lXkzoqFRO1usZ3ra+WTjARalZPep9A4PashV+hO9E6 kKAjhA/Q0vdmP+lLo34Q0P+3akc4SrlAp7D9ZNVLVSz17WeTvnNX88UXfDAHwNnsgeN2 XvYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CihWOSZxJ5YBPsN1W0SZZj9QVXokfViEaIjZ7YmBylM=; fh=X4xqBlipHTYLf/RstEoY2Vj1tHVYlPkOaMvRS1sCZyc=; b=0QQXNT3J4N9bqd+bMEoNfKKsvKwYRjPQZpKLG+kKMxx3sVUcdJH+lyNpiNT6RFVvGX lVR+iAqyuu497xmCl6vlXBF6xfLiXRqdfiZr/qr+dUeSebdub+1zvZGpuBMaABKvPKdp vtpk3bH+DxYJVsoy6pEdKIW4CurtS6bxyEXGvIIdAND67DjexbYRWNl3Q56084+52XKK wVBij6ejGxoAhXFny6Ngf6h8p/0f21sLrgtaLZdqKzzjthn3Jm7MPOX2wtGfSsW0QvIg rAQvAitaSXlK0jWvggYWoDHM7Sh73Dc8rjq2qW2KVYKFwoAUZPZRr60NLFjb+fH1iQXz 6aoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N8k7kLlj; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-186210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186210-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2c291si1643980066b.954.2024.05.22.05.23.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 05:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N8k7kLlj; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-186210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186210-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 87ABE1F236E1 for ; Wed, 22 May 2024 12:23:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B554C13D62D; Wed, 22 May 2024 12:23:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="N8k7kLlj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBE848287C; Wed, 22 May 2024 12:23:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716380612; cv=none; b=rPuQYA3v+OTb6xypA81jgooJGiYfACcxDBbNTety5Ee91xBpFL9OBZ+AvG4siAg9nCE8hjim3zjlGtpzukxGHMuFaYsXVu8MaCvJQ40FXbdMv7sMz0mt6ZPjiQuP5ZK4QRPu5L4WnaM8AszgKdE3ty2F45dANsJGS21MLO852CE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716380612; c=relaxed/simple; bh=FjqCLCPKNxX5x8NRyIF9DPo+K51w7Xt7vSUtZB+xj68=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G9mUZjBAFqmOTCowzD9uQ4W6qgeaRhkJhtA4xs0VJVeCuEWEJSR4tFiwmj8WSlpJ/OVaoWme75bTt/Nye20hNIkUOz6nUUD2E0QmxBT0/WiFSrQgtff450jArGPMaBr63ob17nSKXxq9/DBnStEY+HUhPQVdPW3eZNz2ZfJJczA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=N8k7kLlj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2C7FC2BD11; Wed, 22 May 2024 12:23:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716380611; bh=FjqCLCPKNxX5x8NRyIF9DPo+K51w7Xt7vSUtZB+xj68=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=N8k7kLlj1hYg741ysC4LYoD/zhAf5kFI9bAdIU3Pns090H6ENIR6lyzfmKrqZ/QaJ U4mlikxDjUJUeERh0s1cS35dAwHZtUaSR4lPg8IlcyWUI7DevZ0OwDkZ9qZbwDFZMX eSfq2tm/tsBL4ueyyeCTVKmjpIkQVnIv1419eFBM= Date: Wed, 22 May 2024 14:23:28 +0200 From: Greg KH To: Xingui Yang 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 Message-ID: <2024052221-pulverize-worrisome-37fb@gregkh> References: <20240522114346.42951-1-yangxingui@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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