Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp283727lqp; Wed, 22 May 2024 04:46:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnhVJceD99l4Lh0jEcCc1wT9WY6pkMLKRUQ4fS966nIEYn4oMeYhTxcQeRUgVYXiy4YzhuL198ExmlO9u2fuMzhNKsZkwdXcZyt/oUMQ== X-Google-Smtp-Source: AGHT+IFvsV/HOTqjQvoNQ6W9dkZyicn/Fl135dDlCuJV2vzV5RPlHGwP0zT/3EWXgVggpdhIe2WI X-Received: by 2002:a05:620a:1a12:b0:790:f482:3a69 with SMTP id af79cd13be357-79499439c98mr192750185a.20.1716378400863; Wed, 22 May 2024 04:46:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716378400; cv=pass; d=google.com; s=arc-20160816; b=vQBycVQEnm1AteEyLcCRcz9mk40EtYlsO3YDiWA/1p94Xt2omZYdtMZVifBk5InNA+ 2vkke0KXuPGwJGUtsKqvkFsf1gWYN9vR222oxHpiQoRDu8jKJdMVoxx/Mq4kmAwIhyer fplbeCuQ4gl7z15wKtDwHzQEBDtuvLlDvPd7D4m/PJ3t/hpaHuGfTLE7E99KKlFtOyWf +zYJYjF+JZQjR/U10VjUR8mQ3JTdlsXm1nn5aXiy8jhhx2upGTC5p/4JKXdtQEKPyynE GA5aWUfBissFIyVM1lHzabmnUGK5kWZxR9HkAD1wP0ntcUXbCGJpaQrJvRLHqfddp9/N 3ORA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from; bh=NM02vNBs31qrdU3Nb+unJ3/1mFrb9+gUAxuUl9O2Mc4=; fh=00+glg96JesqULkIv7Si93XktoIxphd6vcwrX207040=; b=VUUhtaiY1K9jnPGDad9UYk9xu27bF3WzjrWI8Qc3yYCq2bkm19GPT5Y3C7/4LEE4W/ 3+Jv/w6txOkYtcUgQlvIpVhGIYeAFl0qdqdyVzI6CwJ29dRRgfhWrHoMCxX71kZMwv6s xUHihRkUGyJw1ugFkQuME0AJ5BRCyvFUoU6boGf0v9EH/MAW/060SJyORpdCip1D92gJ 4zlLdVeFZpF0C2nCg1LTYJdbMW4IAtnefpun+xtaSVth9We9g6UAvGmuQlaj2Kim2OG1 AF5FjvYw857XmewZZPeJnzgaPi33/qY3V/EZGtsXYZVlOngeTTOr9c3mR16uz7i8kC0/ J88Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-186164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794753d95fasi964220285a.711.2024.05.22.04.46.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 04:46:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-186164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 933DB1C2260F for ; Wed, 22 May 2024 11:46:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6E1B13BC11; Wed, 22 May 2024 11:46:34 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (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 AB2FD13B7AB; Wed, 22 May 2024 11:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716378394; cv=none; b=haf5Cic9dvFP6HBMj0rpxUJ5NJvhO532JTUz+/tM42a555X0T3uPFZJPdJz7t0IqKj8F6s1uAboqxUo24CzY/TVaa/zTVA6cxjIcm6ijksyp3egVC/QEauqYTXjiZ6F+6e4MXJs77DYKUKT+QTJ6qoaG8zyYJb4p3oT1y7kDLnk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716378394; c=relaxed/simple; bh=bRm9H4UquR51tvU1Bqm9NuZgpFhBOUcsrWpB5jVm+cQ=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=dj9I6uTYGNvLiHz2u99oxHC0Z32CCaXDeIeIREfSe149kMJ0cNHBpNQBAWNM58W4qNwy4GesZaLrYO/CTyHwhyu/KR+clnkVauK0+UnbNPQL7aVmWv/7m9l4sASbPTM6vhsKa6vB5PFVL9qpip3rsq/twntp06XeURxiJoLxKxE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4VkqDQ4fHdzxNdL; Wed, 22 May 2024 19:42:46 +0800 (CST) Received: from dggpemd100001.china.huawei.com (unknown [7.185.36.94]) by mail.maildlp.com (Postfix) with ESMTPS id 2412B140133; Wed, 22 May 2024 19:46:28 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by dggpemd100001.china.huawei.com (7.185.36.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Wed, 22 May 2024 19:46:27 +0800 From: Xingui Yang To: , CC: , , , , , Subject: [PATCH] driver core: Add log when devtmpfs create node failed Date: Wed, 22 May 2024 11:43:46 +0000 Message-ID: <20240522114346.42951-1-yangxingui@huawei.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemd100001.china.huawei.com (7.185.36.94) Currently, no exception information is output when devtmpfs create node failed, so add log info for it. 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); } /* Notify clients of device addition. This call must come -- 2.17.1