Message ID | 20210204153813.1520736-1-arnd@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 8f8a42ff003aaa3c1424923154c9a92f3bd4c634 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: hns3: avoid -Wpointer-bool-conversion warning | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | warning | 1 maintainers not CCed: natechancellor@gmail.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 9 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Thu, Feb 04, 2021 at 04:38:06PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > 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 <arnd@arndb.de> Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 3 --- > 1 file changed, 3 deletions(-) > > 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; > -- > 2.29.2 >
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 4 Feb 2021 16:38:06 +0100 you wrote: > From: Arnd Bergmann <arnd@arndb.de> > > 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. > > [...] Here is the summary with links: - net: hns3: avoid -Wpointer-bool-conversion warning https://git.kernel.org/netdev/net-next/c/8f8a42ff003a You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
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;