From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 09/12] fs: squashfs: remove dead stores for xattr_id
Date: Wed, 30 Sep 2020 09:20:02 +0200 [thread overview]
Message-ID: <20200930072005.1407-9-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20200930072005.1407-1-a.fatoum@pengutronix.de>
barebox doesn't do extended attributes in SquashFS. Remove the left-over
xattr_id that's never read.
Reported-by: clang-analyzer-10
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
fs/squashfs/inode.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c
index 64155d47dbf4..f702f6c0a2d9 100644
--- a/fs/squashfs/inode.c
+++ b/fs/squashfs/inode.c
@@ -108,7 +108,6 @@ int squashfs_read_inode(struct inode *inode, long long ino)
int err, type, offset = SQUASHFS_INODE_OFFSET(ino);
union squashfs_inode squashfs_ino;
struct squashfs_base_inode *sqshb_ino = &squashfs_ino.base;
- int xattr_id = SQUASHFS_INVALID_XATTR;
TRACE("Entered squashfs_read_inode: %lld\n", ino);
@@ -197,7 +196,6 @@ int squashfs_read_inode(struct inode *inode, long long ino)
frag_offset = 0;
}
- xattr_id = le32_to_cpu(sqsh_ino->xattr);
inode->i_size = le64_to_cpu(sqsh_ino->file_size);
inode->i_op = &squashfs_inode_ops;
inode->i_mode |= S_IFREG;
@@ -249,7 +247,6 @@ int squashfs_read_inode(struct inode *inode, long long ino)
if (err < 0)
goto failed_read;
- xattr_id = le32_to_cpu(sqsh_ino->xattr);
inode->i_size = le32_to_cpu(sqsh_ino->file_size);
inode->i_op = &squashfs_dir_inode_ops;
inode->i_fop = &squashfs_dir_ops;
@@ -294,7 +291,6 @@ int squashfs_read_inode(struct inode *inode, long long ino)
&offset, sizeof(xattr));
if (err < 0)
goto failed_read;
- xattr_id = le32_to_cpu(xattr);
}
TRACE("Symbolic link inode %x:%x, start_block %llx, offset "
@@ -338,7 +334,6 @@ int squashfs_read_inode(struct inode *inode, long long ino)
inode->i_mode |= S_IFCHR;
else
inode->i_mode |= S_IFBLK;
- xattr_id = le32_to_cpu(sqsh_ino->xattr);
rdev = le32_to_cpu(sqsh_ino->rdev);
TRACE("Device inode %x:%x, rdev %x\n",
@@ -375,7 +370,6 @@ int squashfs_read_inode(struct inode *inode, long long ino)
inode->i_mode |= S_IFIFO;
else
inode->i_mode |= S_IFSOCK;
- xattr_id = le32_to_cpu(sqsh_ino->xattr);
break;
}
default:
--
2.28.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-09-30 7:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 7:19 [PATCH 01/12] hw_random: mxc-rngc: fix read of uninitialized variable Ahmad Fatoum
2020-09-30 7:19 ` [PATCH 02/12] globalvar: fix uninitialized read of variable when no nvvars exist Ahmad Fatoum
2020-09-30 7:19 ` [PATCH 03/12] commands: uimage: fix indeterminate exit code of command Ahmad Fatoum
2020-09-30 7:19 ` [PATCH 04/12] watchdog: fix division-by-zero when clock rate == 0 Ahmad Fatoum
2020-09-30 7:19 ` [PATCH 05/12] net: usb: asix: propagate errors from MDIO accessors Ahmad Fatoum
2020-09-30 7:24 ` [PATCH] fixup! " Ahmad Fatoum
2020-10-02 4:04 ` Sascha Hauer
2020-09-30 7:19 ` [PATCH 06/12] digest: sha: remove no-op "erase" of automatic variables Ahmad Fatoum
2020-09-30 7:20 ` [PATCH 07/12] common: memsize: eliminate dead store Ahmad Fatoum
2020-09-30 7:20 ` [PATCH 08/12] USB: musb: remove dead stores Ahmad Fatoum
2020-09-30 7:20 ` Ahmad Fatoum [this message]
2020-09-30 7:20 ` [PATCH 10/12] reset: remove dead initialization Ahmad Fatoum
2020-09-30 7:20 ` [PATCH 11/12] sandbox: fix behavior with images >= 4G on 32-bit Ahmad Fatoum
2020-09-30 7:20 ` [PATCH 12/12] blspec: fix dead assignment Ahmad Fatoum
2020-10-02 4:04 ` [PATCH 01/12] hw_random: mxc-rngc: fix read of uninitialized variable Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200930072005.1407-9-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox