* [PATCH] ufs: Remove redundant assignment to pointer p
@ 2022-10-10 20:47 Colin Ian King
0 siblings, 0 replies; 2+ messages in thread
From: Colin Ian King @ 2022-10-10 20:47 UTC (permalink / raw)
To: Evgeniy Dushistov; +Cc: kernel-janitors, linux-kernel
The pointer p is being assigned a new value that is never read. The
assignment is redundant and can be removed.
Cleans up clang scan-build warning:
fs/ufs/dir.c:179:2: warning: Value stored to 'p' is never read
[deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/ufs/dir.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/ufs/dir.c b/fs/ufs/dir.c
index 391efaf1d528..bf19cd882965 100644
--- a/fs/ufs/dir.c
+++ b/fs/ufs/dir.c
@@ -176,7 +176,6 @@ static bool ufs_check_page(struct page *page)
rec_len, ufs_get_de_namlen(sb, p));
goto fail;
Eend:
- p = (struct ufs_dir_entry *)(kaddr + offs);
ufs_error(sb, __func__,
"entry in directory #%lu spans the page boundary"
"offset=%lu",
--
2.37.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ufs: remove redundant assignment to pointer p
@ 2021-06-13 13:41 Colin King
0 siblings, 0 replies; 2+ messages in thread
From: Colin King @ 2021-06-13 13:41 UTC (permalink / raw)
To: Evgeniy Dushistov; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointer p is being initialized with a value that is never
read before the function returns. The assignment is redundant
and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/ufs/dir.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/ufs/dir.c b/fs/ufs/dir.c
index b721d0bda5e5..23cb6c8787f3 100644
--- a/fs/ufs/dir.c
+++ b/fs/ufs/dir.c
@@ -176,7 +176,6 @@ static bool ufs_check_page(struct page *page)
rec_len, ufs_get_de_namlen(sb, p));
goto fail;
Eend:
- p = (struct ufs_dir_entry *)(kaddr + offs);
ufs_error(sb, __func__,
"entry in directory #%lu spans the page boundary"
"offset=%lu",
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-10 20:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 20:47 [PATCH] ufs: Remove redundant assignment to pointer p Colin Ian King
-- strict thread matches above, loose matches on Subject: below --
2021-06-13 13:41 [PATCH] ufs: remove " Colin King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).