linux-stable/fs/9p
Dominique Martinet cf7c33d332
9p: remove dead stores (variable set again without being read)
The 9p code for some reason used to initialize variables outside of the
declaration, e.g. instead of just initializing the variable like this:

int retval = 0

We would be doing this:

int retval;
retval = 0;

This is perfectly fine and the compiler will just optimize dead stores
anyway, but scan-build seems to think this is a problem and there are
many of these warnings making the output of scan-build full of such
warnings:
fs/9p/vfs_inode.c:916:2: warning: Value stored to 'retval' is never read [deadcode.DeadStores]
        retval = 0;
        ^        ~

I have no strong opinion here, but if we want to regularly run
scan-build we should fix these just to silence the messages.

I've confirmed these all are indeed ok to remove.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
2023-07-20 19:14:50 +00:00
..
acl.c fs: port inode_owner_or_capable() to mnt_idmap 2023-01-19 09:24:29 +01:00
acl.h fs: port ->set_acl() to pass mnt_idmap 2023-01-19 09:24:27 +01:00
cache.c netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context 2022-06-09 13:55:00 -07:00
cache.h fs/9p: Rework cache modes and add new options to Documentation 2023-04-09 21:41:21 +00:00
fid.c fs/9p: remove writeback fid and fix per-file modes 2023-03-27 02:33:48 +00:00
fid.h fs/9p: fix type mismatch in file cache mode helper 2023-07-20 16:15:15 +00:00
Kconfig 9p: Remove INET dependency 2023-05-04 21:46:57 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v9fs.c fs/9p: Rework cache modes and add new options to Documentation 2023-04-09 21:41:21 +00:00
v9fs.h fs/9p: Fix a datatype used with V9FS_DIRECT_IO 2023-07-10 13:04:37 +00:00
v9fs_vfs.h fs/9p: Consolidate file operations and add readahead and writeback 2023-03-27 02:33:39 +00:00
vfs_addr.c Including fixes from netfilter. 2023-05-05 19:12:01 -07:00
vfs_dentry.c 9p: Remove INET dependency 2023-05-04 21:46:57 +01:00
vfs_dir.c 9p: fix ignored return value in v9fs_dir_release 2023-07-20 19:05:52 +00:00
vfs_file.c fs/9p: remove unnecessary invalidate_inode_pages2 2023-07-20 16:15:15 +00:00
vfs_inode.c 9p: remove dead stores (variable set again without being read) 2023-07-20 19:14:50 +00:00
vfs_inode_dotl.c 9p: remove dead stores (variable set again without being read) 2023-07-20 19:14:50 +00:00
vfs_super.c Including fixes from netfilter. 2023-05-05 19:12:01 -07:00
xattr.c v6.4/vfs.acl 2023-04-24 13:35:23 -07:00
xattr.h 9p: use stub posix acl handlers 2022-10-20 10:13:32 +02:00