From patchwork Thu Feb 4 15:38:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 376284 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp1391432jah; Thu, 4 Feb 2021 07:40:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrr3QvFxlNKMQBxby6NtZMIXG3RL5xQPNsoAI6zZw2G/B1OPvyTICSE97cBR899z+3h4/m X-Received: by 2002:a17:906:24d1:: with SMTP id f17mr8385642ejb.503.1612453207733; Thu, 04 Feb 2021 07:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612453207; cv=none; d=google.com; s=arc-20160816; b=fBj1VYhZcsty7dFMG4YYHU82JEaIXUDCdeTNEPhNw+mFeiKMXgZ4D0rsCrip0jnj0i t1pX+DF2viyiA8zRgsPMF4uizKTHDbEjdmX0SlVLUHJ6Ifc9PMVf+j+5RgPBzH1l5FgL vH4nDy0J62TUaRZS5z1BvU1BNOdRsyWfNiQ8vaMtPsMduhIIJhbdZkTWlN5Jd7PcuKRY 8FLOZm+qn9Wz3qx8XmHJybDwuVebx/OOBROJgXphQ+CQvaU3nPis8m8ZxYqb6q4g1KJP V0BHI5yuXTNySrrxox3u8/YRhpS/BdQXz1WYh+Y2tCANvoRgke/uZkkSxx4aMPIKHHOj C5wA== 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=kSLU46XWlJXFRgzvZ+I0JvCu1C1PV/yuXjd/m/dbOWE=; b=kEaYwZxPaEAvogfSSOIhPgBNOIo7XcE9yN9enQMdvuynHOe83cJmge2pI99JsGtVip lVniQsSCWQmDP7tigmOvw+bNhab70PWKpKkWCYJljo5HH0gLELPSIMB7j9MdaQ9AipDe dGDPm/gvPKu7Y0KiLmVaoj4M5TOEAxMv50sUxn5uML7yL9QATGpKpghGzocktqVxUPzZ jI4EOJ/a57mrPF2pDogISh9R6hN9jVsZh2D8cr3yc1asVkmqujZgxlLpa1qgQykuxZgs 96xH/vLs2wigQmxNFbiynF6IytlHiCR7xd5hGpDhF/1Ac1PbE+M2UXT5M3R3TRLa9Q2N Y4Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kemxjGic; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w1si3304524ejc.6.2021.02.04.07.40.07; Thu, 04 Feb 2021 07:40:07 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kemxjGic; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237450AbhBDPkE (ORCPT + 7 others); Thu, 4 Feb 2021 10:40:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:60190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237407AbhBDPi7 (ORCPT ); Thu, 4 Feb 2021 10:38:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E026D64F44; Thu, 4 Feb 2021 15:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612453098; bh=Za7/JigMay2H08zCfoFaKH8zh1lEWxdc4RaDwMpdQ7I=; h=From:To:Cc:Subject:Date:From; b=kemxjGicQXB92hwsg4Zbdb9VO+WIvTBz89JBR9RjL2Ja4B/jzb2jbe2eS5v+4QTU8 YtZAuHmDjYWGgXzl4bqSdy2ATeZSXJZGG6y1VIfT2nmwPi2+qUiN9+vr5e8MzSfuNI 5EXN+9B5lXijENQjFr3I1G803hYukok+eb/yGahk3ozXEQtqQvz0Ep/zy3sexbfRb7 pOFqph1mxON9pYoZSq9f/Q3j/jJUF1FOFE7lqOSJozoZYuZP5Pio9+FWx4Elgamu9Q c4LWHikKPTTzumMmftTTlAzodyPsoc95fUji+KbtvowHMRxg2IoCIHuzHRcCm1Uq8E U20M9ESkV+1KA== From: Arnd Bergmann To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Jakub Kicinski , Nathan Chancellor , Nick Desaulniers , Guangbin Huang , Huazhong Tan Cc: Arnd Bergmann , Yufeng Mo , Jian Shen , Yonglong Liu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] net: hns3: avoid -Wpointer-bool-conversion warning Date: Thu, 4 Feb 2021 16:38:06 +0100 Message-Id: <20210204153813.1520736-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann clang points out a redundant sanity check: drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:497:28: error: address of array 'filp->f_path.dentry->d_iname' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] This can never fail, so just remove the check. Fixes: 04987ca1b9b6 ("net: hns3: add debugfs support for tm nodes, priority and qset info") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 3 --- 1 file changed, 3 deletions(-) -- 2.29.2 Reviewed-by: Nathan Chancellor diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c index 6978304f1ac5..c5958754f939 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c @@ -494,9 +494,6 @@ static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer, ssize_t size = 0; int ret = 0; - if (!filp->f_path.dentry->d_iname) - return -EINVAL; - read_buf = kzalloc(HNS3_DBG_READ_LEN, GFP_KERNEL); if (!read_buf) return -ENOMEM;