Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4376643rdb; Thu, 14 Sep 2023 23:22:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNimDi0CrOJDKtttvpZGzVkPGlsE2aMBR7E53RltFvia7cCu/hKZO/zyNy7SyYEeBsLW3S X-Received: by 2002:a17:903:2311:b0:1c3:81b7:2385 with SMTP id d17-20020a170903231100b001c381b72385mr1285763plh.11.1694758919873; Thu, 14 Sep 2023 23:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694758919; cv=none; d=google.com; s=arc-20160816; b=WJy1FCUvmNsZwszRfj6JdO+E+Xs0sVZRdbVR68dUnjhaKFgsRtVw4n0IQL1bJo4z7w uubK6XVI9lNM6x96FBvxDk0NrPKQY7AyrtOPNgRGiXGNDiqq0TajIoaoNHO2YZDGUNPN 7xOObyzM8aZToPejnb2TC7+1Mt915b9NUja1Zu+bby8QaqSY89pfZc/cbnUwEQKqO7jV CBIkwLwbkvNQXZjjxzdYysf4Z5qdbst3b+jpRVMTkWFbbWE340i3WTBqG5H2WslGwzSH McraZIhiOHjAmX1YQxb9lU0LVkdFwWIAylu8oHlyyzvNK9GhsvxPchD7wS3deQUwICNO 9fmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from; bh=d1+k+lWaYbd+tr0e8Qbr4/CCjrypDEmMwvLukAnXgXg=; fh=p6n5X7rr65LswTJ6hfI/v2ClYyOhUHYur8DnYsfL4uE=; b=w4Fer6xsVxppeL3cYy2NYtUBJi6Tp9FLirZ8/8uH0K7w3VuSc64bEp5fHEZzrNC67J X6AbXEEPJi07O3Dkc85YSfm1UPbR/zdzFzMTF5Fj/3Fe2l7EI6JmWxtYIx87MOuj4CRK ccct+QY8LLvsnqEjAhXPach5XxYV9srCs64YnLkKvJn8mXz6rj9cHoqHek67oCFPbeKF G0WIEzlOul3JOSIJDRq2YyuNJD01iCgBmKivc4U49Uzr6J+64FHQKPze+XUVk6thMy64 IwXDrHe5jwDYg0UKtOYW/zHwr9C8R8RfpHIZQCHY0dcqfcQ7xxSFAfizOSLKe+EyOymC Oe+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id x8-20020a170902a38800b001bc63c38e17si2789517pla.244.2023.09.14.23.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 23:21:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0A78A8374321; Thu, 14 Sep 2023 23:21:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232171AbjIOGUv convert rfc822-to-8bit (ORCPT + 57 others); Fri, 15 Sep 2023 02:20:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232148AbjIOGUu (ORCPT ); Fri, 15 Sep 2023 02:20:50 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C83CF196 for ; Thu, 14 Sep 2023 23:20:42 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 38F6JU2j82199273, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.92/5.92) with ESMTPS id 38F6JU2j82199273 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Sep 2023 14:19:30 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Fri, 15 Sep 2023 14:19:30 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 15 Sep 2023 14:19:30 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::7445:d92b:d0b3:f79c]) by RTEXMBS04.realtek.com.tw ([fe80::7445:d92b:d0b3:f79c%5]) with mapi id 15.01.2375.007; Fri, 15 Sep 2023 14:19:30 +0800 From: Ping-Ke Shih To: Jinjie Ruan , "linux-wireless@vger.kernel.org" , Kalle Valo , "Stanislaw Gruszka" , Brian Norris , Yan-Hsuan Chuang Subject: RE: [PATCH] rtw88: debug: Fix Fix the NULL vs IS_ERR() bug for debugfs_create_file() Thread-Topic: [PATCH] rtw88: debug: Fix Fix the NULL vs IS_ERR() bug for debugfs_create_file() Thread-Index: AQHZ5rvGT7BX67mBJUWEvWs679dwq7Aba0sQ Date: Fri, 15 Sep 2023 06:19:30 +0000 Message-ID: <1ce0e303159449779b296be3e68e3bb6@realtek.com> References: <20230914032915.3758138-1-ruanjinjie@huawei.com> In-Reply-To: <20230914032915.3758138-1-ruanjinjie@huawei.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-originating-ip: [172.21.69.25] x-kse-serverinfo: RTEXMBS02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Sep 2023 23:21:13 -0700 (PDT) > -----Original Message----- > From: Jinjie Ruan > Sent: Thursday, September 14, 2023 11:29 AM > To: linux-wireless@vger.kernel.org; Ping-Ke Shih ; Kalle Valo ; > Stanislaw Gruszka ; Brian Norris ; Yan-Hsuan Chuang > > Cc: ruanjinjie@huawei.com > Subject: [PATCH] rtw88: debug: Fix Fix the NULL vs IS_ERR() bug for debugfs_create_file() Excepting to typo "Fix Fix" in subject, patch looks fine to me. > > > Since debugfs_create_file() return ERR_PTR and never return NULL, so use > IS_ERR() to check it instead of checking NULL. > > Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") > Signed-off-by: Jinjie Ruan Acked-by: Ping-Ke Shih > --- > drivers/net/wireless/realtek/rtw88/debug.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c > index f8ba133baff0..35bc37a3c469 100644 > --- a/drivers/net/wireless/realtek/rtw88/debug.c > +++ b/drivers/net/wireless/realtek/rtw88/debug.c > @@ -1233,9 +1233,9 @@ static struct rtw_debugfs_priv rtw_debug_priv_dm_cap = { > #define rtw_debugfs_add_core(name, mode, fopname, parent) \ > do { \ > rtw_debug_priv_ ##name.rtwdev = rtwdev; \ > - if (!debugfs_create_file(#name, mode, \ > + if (IS_ERR(debugfs_create_file(#name, mode, \ > parent, &rtw_debug_priv_ ##name,\ > - &file_ops_ ##fopname)) \ > + &file_ops_ ##fopname))) \ > pr_debug("Unable to initialize debugfs:%s\n", \ > #name); \ > } while (0) > -- > 2.34.1