Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp181142imu; Tue, 22 Jan 2019 16:29:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN6ldcP6bg65AcUMLu/eyf42TJYRWzo2tYQzVE2QH54wNh6IAV9VtBze9DHsYxI0nasSeBFn X-Received: by 2002:a63:a84a:: with SMTP id i10mr68710pgp.263.1548203359565; Tue, 22 Jan 2019 16:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548203359; cv=none; d=google.com; s=arc-20160816; b=oJAestK3ZANSCifGO4wEGbqGd8mND+uI0mQVNpaw07y6kGb4E97+v9S4qkTgoj0kDQ vGPGCnkt1D8uIpT7w5DT7n4Sz5Eqo6aHnk+3/nR7c+p4Df0TDE+MlObSO+5C1FyUTvVb dFrIuhOcRJF0y2nm44TpK2BhAIfKjEmFr497+H7JECOG/sjKzCUshaz07/wPCGIdn5Yc 51AUw7Pbd1u97BK1ZNqiQr2ggCQyiJG/qO+yjMDnVEr0ZKEDj1R6VeUcu0Tl4Z784eQZ /5zmdut330IbWuB+4glmSfP3fM2qSZRDAXVz61SDcOQ9fKLZZq2/yksdfwMFOHjk5m4B KuHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=zV5HDsLxc5t50d3/+OmMjjMKwrxfT9GYUNNb7ZKiSzE=; b=xTgbBHX08VnSBO9CbSLvd4ldu/0f/DYO1dzR5G9UneGnkmVVApDRTO1GpTKXlfNTdg ESvSVko/wlHCq0aelIn10BdGvFVorQSFFz6rXB+Gf7+me73SbLNvsIxWunnZVsq7xC+1 6d4p9pRserkv9K9QxGvVvWKBI1iTcAYI6EygXZB7Z3/uxhWt2K5JxSwxhZqPVfMSA8TT 84mP10b+ng83dSenf3FMlQxW4HcE3tETofuYm5dsOJLfYoqBT7nK9hPs9ONMOgfmSGpl BEEPpw4446kvmfUO6opaQ8i9mzcins3EXM4QEZvtUPEj2upwnWmO8s+B+72VxyOj1Vkp 2bAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=IMtI7D8W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si16980713plq.336.2019.01.22.16.29.03; Tue, 22 Jan 2019 16:29:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=IMtI7D8W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726957AbfAWA00 (ORCPT + 99 others); Tue, 22 Jan 2019 19:26:26 -0500 Received: from rcdn-iport-5.cisco.com ([173.37.86.76]:1249 "EHLO rcdn-iport-5.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbfAWA00 (ORCPT ); Tue, 22 Jan 2019 19:26:26 -0500 X-Greylist: delayed 571 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jan 2019 19:26:25 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2884; q=dns/txt; s=iport; t=1548203185; x=1549412785; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=UXIDgAFCzv7M9D2qKTtl0eSw7BN4HelhTYI3g6MwBPM=; b=IMtI7D8WqgUQeUX4g2niLXOa0/zR1nyFtFoWY901xOItDki2JI+r6Ql1 YLG5+UYMscMJNd/QWGlaq7WTF1VP6xBi1jQacY9ZsFhB/W0A5uV+ySgUT Lb64CkwaM0B2hEsOtxBfwLi1tb+0nb39LEQAMPbGvfonWhQR92fBaVToD g=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ADAADtsUdc/49dJa1jGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAQGBUQQBAQEBAQsBggOBaCcKjBGLbYINmAGBewsBAYRsAoJ?= =?us-ascii?q?tIjQJDQEDAQECAQECbSiFSgEBAQECAScTPwULAgEIGB4QMiUCBA4FgyKBegi?= =?us-ascii?q?uXTOKMIxBF4FAP4ERJx+CTIUBgzqCJgKJWwqBe4YCkD4JApIZGJIULZpJAhE?= =?us-ascii?q?UgScfOIFWcBVlAYJBgicXE44LQTGJeIEfAQE?= X-IronPort-AV: E=Sophos;i="5.56,508,1539648000"; d="scan'208";a="290294756" Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by rcdn-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2019 00:16:54 +0000 Received: from XCH-RCD-020.cisco.com (xch-rcd-020.cisco.com [173.37.102.30]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id x0N0Grs2020024 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 23 Jan 2019 00:16:53 GMT Received: from xch-rcd-018.cisco.com (173.37.102.28) by XCH-RCD-020.cisco.com (173.37.102.30) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 22 Jan 2019 18:16:53 -0600 Received: from xch-rcd-018.cisco.com ([173.37.102.28]) by XCH-RCD-018.cisco.com ([173.37.102.28]) with mapi id 15.00.1395.000; Tue, 22 Jan 2019 18:16:53 -0600 From: "Parvi Kaustubhi (pkaustub)" To: Greg Kroah-Hartman CC: Doug Ledford , Jason Gunthorpe , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "Christian Benvenuti (benve)" , "Nelson Escobar (neescoba)" Subject: Re: [PATCH 7/8] infiniband: usnic: no need to check return value of debugfs_create functions Thread-Topic: [PATCH 7/8] infiniband: usnic: no need to check return value of debugfs_create functions Thread-Index: AQHUsmW8RX8zdsvpDkSafppKoQ9GC6W8YaoA Date: Wed, 23 Jan 2019 00:16:53 +0000 Message-ID: References: <20190122151800.15092-1-gregkh@linuxfoundation.org> <20190122151800.15092-8-gregkh@linuxfoundation.org> In-Reply-To: <20190122151800.15092-8-gregkh@linuxfoundation.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.155.164.169] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Outbound-SMTP-Client: 173.37.102.30, xch-rcd-020.cisco.com X-Outbound-Node: rcdn-core-7.cisco.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org usnic driver was tested with this change. Acked-by: Parvi Kaustubhi > On Jan 22, 2019, at 7:17 AM, Greg Kroah-Hartman wrote: >=20 > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. >=20 > Cc: Christian Benvenuti > Cc: Nelson Escobar > Cc: Parvi Kaustubhi > Cc: Doug Ledford > Cc: Jason Gunthorpe > Cc: linux-rdma@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- > drivers/infiniband/hw/usnic/usnic_debugfs.c | 26 --------------------- > 1 file changed, 26 deletions(-) >=20 > diff --git a/drivers/infiniband/hw/usnic/usnic_debugfs.c b/drivers/infini= band/hw/usnic/usnic_debugfs.c > index a3115709fb03..e5a3f02fb078 100644 > --- a/drivers/infiniband/hw/usnic/usnic_debugfs.c > +++ b/drivers/infiniband/hw/usnic/usnic_debugfs.c > @@ -113,42 +113,21 @@ static const struct file_operations flowinfo_ops = =3D { > void usnic_debugfs_init(void) > { > debugfs_root =3D debugfs_create_dir(DRV_NAME, NULL); > - if (IS_ERR(debugfs_root)) { > - usnic_err("Failed to create debugfs root dir, check if debugfs is enab= led in kernel configuration\n"); > - goto out_clear_root; > - } >=20 > flows_dentry =3D debugfs_create_dir("flows", debugfs_root); > - if (IS_ERR_OR_NULL(flows_dentry)) { > - usnic_err("Failed to create debugfs flow dir with err %ld\n", > - PTR_ERR(flows_dentry)); > - goto out_free_root; > - } >=20 > debugfs_create_file("build-info", S_IRUGO, debugfs_root, > NULL, &usnic_debugfs_buildinfo_ops); > - return; > - > -out_free_root: > - debugfs_remove_recursive(debugfs_root); > -out_clear_root: > - debugfs_root =3D NULL; > } >=20 > void usnic_debugfs_exit(void) > { > - if (!debugfs_root) > - return; > - > debugfs_remove_recursive(debugfs_root); > debugfs_root =3D NULL; > } >=20 > void usnic_debugfs_flow_add(struct usnic_ib_qp_grp_flow *qp_flow) > { > - if (IS_ERR_OR_NULL(flows_dentry)) > - return; > - > scnprintf(qp_flow->dentry_name, sizeof(qp_flow->dentry_name), > "%u", qp_flow->flow->flow_id); > qp_flow->dbgfs_dentry =3D debugfs_create_file(qp_flow->dentry_name, > @@ -156,11 +135,6 @@ void usnic_debugfs_flow_add(struct usnic_ib_qp_grp_f= low *qp_flow) > flows_dentry, > qp_flow, > &flowinfo_ops); > - if (IS_ERR_OR_NULL(qp_flow->dbgfs_dentry)) { > - usnic_err("Failed to create dbg fs entry for flow %u with error %ld\n"= , > - qp_flow->flow->flow_id, > - PTR_ERR(qp_flow->dbgfs_dentry)); > - } > } >=20 > void usnic_debugfs_flow_remove(struct usnic_ib_qp_grp_flow *qp_flow) > --=20 > 2.20.1 >=20