Message ID | 20230525160827.15285-1-osmtendev@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp498686vqr; Thu, 25 May 2023 09:29:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7B0Zmh5QedIczEZ2rfcFtSvaPiEKAqkVhSN3jFYM9DiIM9DRiwTc1ce4JSfSZYvexOvBSO X-Received: by 2002:a05:6a00:14cb:b0:64c:ecf7:f492 with SMTP id w11-20020a056a0014cb00b0064cecf7f492mr10557451pfu.4.1685032160986; Thu, 25 May 2023 09:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685032160; cv=none; d=google.com; s=arc-20160816; b=xnNpZJV4l1jepz/+2CiJAYf13orYJwtEV8pdX7XBWDU4KsLHa9PMatnEb+pFZJQPUW oGtsUaeKxvuzuE589RiCOXyrPF2/iv4qyzOyKMuhOcORrGDnP1aQNW2gBTQMnkUml0Yi MeT7hCKDYbZdd44JE/ebvHYO8jpwTWCdyROMr5PRniA5p2gduo8aPwz9J+FYQuy+wPDM NKf4fyhF5ZAblO39vedgyBw5mw0cPx1eOqCmV19rOO+h8mzkBgHd7JVxi/KuPHgvbv+h 6NTU1ikC0I84yY7DnCph69FbvPs8i5HlAIYHUrJFJ4khnSZzJD5OZWf38/uvSR9Zm63r J+6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IcWAv44UOzgNnQAtx1ryJsdICiVGnUV50w5gHYxHJdU=; b=NSP5ppK6COn9g0XJlGBVKb+ilFZWd3JkEMz65hgNBMfOZWIE/qyS4HPmSPYqmOY9At JVws7LXwIFB3fM7kiBg6YuNtO560QeT7YZYmJwdeEhVdUTOezIOaCpMruFa4Aadm+y/w AInbXhoqJK80+Z70FnK+NFCCWaBeX0Im4BMU7cMwC41b+TrCJyfJLfbPG5Cm2qkwngSv C6yG3tnTTYtO04GUVI3esWJ21dWuWAvXRxcP1p1sI2OKF6VEqTjcKBtNlsnq4ZyTIuqK Um/yTHkMyDgAObhqyuGjfi+SW0GBfVX0R3vSXMB/2to9g6gw8WdbJzOWweffaXRjOWIf yK4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fbFXoVxP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020aa79912000000b006414f237a50si1881481pff.13.2023.05.25.09.29.08; Thu, 25 May 2023 09:29:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fbFXoVxP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232749AbjEYQJf (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Thu, 25 May 2023 12:09:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231596AbjEYQJc (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 25 May 2023 12:09:32 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 211D910D1; Thu, 25 May 2023 09:09:01 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-50bcb00a4c2so4135568a12.1; Thu, 25 May 2023 09:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685030939; x=1687622939; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IcWAv44UOzgNnQAtx1ryJsdICiVGnUV50w5gHYxHJdU=; b=fbFXoVxPVQEDK7R8QBWEC1K7HGxa802C//fMX4YnZw56/6do6hgNWVtWFd0pT0D7cB MgnUBF1qWGggCG/RHGZeovTjKBygDmm6a4B9CbLVgjnLNDkM1Xsmm+nW4pEZtz6ceD6f hGEea4ie7UGIAJX/jej/kVh75RNnaQv5bfUEnDeCv3aYyUxX58fHipmAVlrjyfvNMLdn I2qywoGy2W5Ly3KvxSmu1cXeNl9q+u/iOkzlgSlJVcMU36SjpovBaAgZA16nefeCqbHh oNj4YPjA39Qk8cKiF7hHabev8Nq35vPVnXxtlzYewwerqQZcFZXxXKasdFB8zO7LmSb5 Y9uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685030939; x=1687622939; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IcWAv44UOzgNnQAtx1ryJsdICiVGnUV50w5gHYxHJdU=; b=J5WZ4xsrUtiGlNT9d3iybEU0LFpNY6oFirVH+IqKfUn1oP94TvIoozgd8aJXFu82ti NuZMUJ+Diyb2BReEr9YFYztreyr7cHqpjDDPvlvYE3JG/leTwEhRKzWgpQ/vA0VNUN9J m+RmjrtXYxsJfvpyPzDtiqOODt4GWirIHQ8etGiUHxqgZBnvzJGiYqoZA/Yq3Qm+RwXw rL8mnnzesETdUi+V5YTMtCuRA8deR2LTdTBxBL71qE2ayGg9vjbgDuutf52z4pXaSW2G OWFOrVP6nC32qBF2m/UXkWe/WKlwFjGpJ7kGd+iS3bcZjOmHZfJYGNzRWLpE8yao93b6 Yj+g== X-Gm-Message-State: AC+VfDzMILB192OXMjkzIy1g+2TGRaQTEiYVEz5prepTkMe6ZoAX2TGp WCuONJbTPivsuVSGOEZO51A= X-Received: by 2002:aa7:d484:0:b0:50d:b7e5:fdde with SMTP id b4-20020aa7d484000000b0050db7e5fddemr4782214edr.19.1685030938612; Thu, 25 May 2023 09:08:58 -0700 (PDT) Received: from Osmten.. ([103.84.150.78]) by smtp.gmail.com with ESMTPSA id a15-20020aa7d90f000000b00510d8e43fe0sm696613edr.7.2023.05.25.09.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 09:08:58 -0700 (PDT) From: Osama Muhammad <osmtendev@gmail.com> To: linux@roeck-us.net, jdelvare@suse.com Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Osama Muhammad <osmtendev@gmail.com> Subject: [PATCH] adm1266.c: Drop error checking for debugfs_create_dir Date: Thu, 25 May 2023 21:08:27 +0500 Message-Id: <20230525160827.15285-1-osmtendev@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766884283290424591?= X-GMAIL-MSGID: =?utf-8?q?1766884283290424591?= |
Series |
adm1266.c: Drop error checking for debugfs_create_dir
|
|
Commit Message
Osama Muhammad
May 25, 2023, 4:08 p.m. UTC
This patch fixes the error checking in adm1266.c.
The DebugFS kernel API is developed in
a way that the caller can safely ignore the errors that
occur during the creation of DebugFS nodes.
Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
---
drivers/hwmon/pmbus/adm1266.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Thu, May 25, 2023 at 09:08:27PM +0500, Osama Muhammad wrote: > This patch fixes the error checking in adm1266.c. > The DebugFS kernel API is developed in > a way that the caller can safely ignore the errors that > occur during the creation of DebugFS nodes. > > Signed-off-by: Osama Muhammad <osmtendev@gmail.com> Confusing. Is this v3 of the patch ? Guenter > --- > drivers/hwmon/pmbus/adm1266.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/hwmon/pmbus/adm1266.c b/drivers/hwmon/pmbus/adm1266.c > index 1ac2b2f4c570..184d75269d2b 100644 > --- a/drivers/hwmon/pmbus/adm1266.c > +++ b/drivers/hwmon/pmbus/adm1266.c > @@ -340,8 +340,6 @@ static void adm1266_init_debugfs(struct adm1266_data *data) > return; > > data->debugfs_dir = debugfs_create_dir(data->client->name, root); > - if (!data->debugfs_dir) > - return; > > debugfs_create_devm_seqfile(&data->client->dev, "sequencer_state", data->debugfs_dir, > adm1266_state_read); > -- > 2.34.1 >
This is the new patch not v3. The patch I sent as v2 was a mistake. Please discard the patch I sent earlier as v2 . Apologies for the confusion.Hope it clarifies. Regards, Osmten On Thu, 25 May 2023 at 23:17, Guenter Roeck <linux@roeck-us.net> wrote: > > On Thu, May 25, 2023 at 09:08:27PM +0500, Osama Muhammad wrote: > > This patch fixes the error checking in adm1266.c. > > The DebugFS kernel API is developed in > > a way that the caller can safely ignore the errors that > > occur during the creation of DebugFS nodes. > > > > Signed-off-by: Osama Muhammad <osmtendev@gmail.com> > > Confusing. Is this v3 of the patch ? > > Guenter > > > --- > > drivers/hwmon/pmbus/adm1266.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/hwmon/pmbus/adm1266.c b/drivers/hwmon/pmbus/adm1266.c > > index 1ac2b2f4c570..184d75269d2b 100644 > > --- a/drivers/hwmon/pmbus/adm1266.c > > +++ b/drivers/hwmon/pmbus/adm1266.c > > @@ -340,8 +340,6 @@ static void adm1266_init_debugfs(struct adm1266_data *data) > > return; > > > > data->debugfs_dir = debugfs_create_dir(data->client->name, root); > > - if (!data->debugfs_dir) > > - return; > > > > debugfs_create_devm_seqfile(&data->client->dev, "sequencer_state", data->debugfs_dir, > > adm1266_state_read); > > -- > > 2.34.1 > >
diff --git a/drivers/hwmon/pmbus/adm1266.c b/drivers/hwmon/pmbus/adm1266.c index 1ac2b2f4c570..184d75269d2b 100644 --- a/drivers/hwmon/pmbus/adm1266.c +++ b/drivers/hwmon/pmbus/adm1266.c @@ -340,8 +340,6 @@ static void adm1266_init_debugfs(struct adm1266_data *data) return; data->debugfs_dir = debugfs_create_dir(data->client->name, root); - if (!data->debugfs_dir) - return; debugfs_create_devm_seqfile(&data->client->dev, "sequencer_state", data->debugfs_dir, adm1266_state_read);