linux-yocto/6.12: yaffs2: silence warnings
Integrating the following commit(s) to linux-yocto/6.12:
1/4 [
Author: Bin Lan
Email: bin.lan.cn@windriver.com
Subject: fs/yaffs2: fix build warnings in yaffs_vfs.c when running make allyesconfig
Date: Mon, 9 Jun 2025 14:51:47 +0800
When building linux yocto with allyesconfig, some build warnings are found:
fs/yaffs2/yaffs_vfs.c:1292:15: error: no previous prototype for
‘yaffs_get_inode’ [-Werror=missing-prototypes]
1292 | struct inode *yaffs_get_inode(struct super_block *sb, int mode,
int dev,
| ^~~~~~~~~~~~~~~
fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_iterate’:
fs/yaffs2/yaffs_vfs.c:1841:13: error: unused variable ‘i_version’
[-Werror=unused-variable]
1841 | u64 i_version;
| ^~~~~~~~~
fs/yaffs2/yaffs_vfs.c: At top level:
fs/yaffs2/yaffs_vfs.c:2441:16: error: no previous prototype for
‘yaffs2_get_parent’ [-Werror=missing-prototypes]
2441 | struct dentry *yaffs2_get_parent(struct dentry *dentry)
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Inspect the code that the two functions yaffs_get_inode() and
yaffs2_get_parent() are only used in the current file, i_version is not
used in the function yaffs_iterate(). So add the static modifier to the
two functions and remove the variable i_version.
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]
2/4 [
Author: Bin Lan
Email: bin.lan.cn@windriver.com
Subject: fs/yaffs2: fix a build warning in yaffs_tagsmarshall.c when running make allyesconfig
Date: Mon, 9 Jun 2025 14:51:48 +0800
When building linux yocto with allyesconfig, a build warning is found:
fs/yaffs2/yaffs_tagsmarshall.c:188:6: error: no previous prototype for
‘yaffs_tags_marshall_install’ [-Werror=missing-prototypes]
188 | void yaffs_tags_marshall_install(struct yaffs_dev *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Inspect the code that the function yaffs_tags_marshall_install() is
declared in this header file yaffs_tagsmarshall.h. So include the
header file in yaffs_tagsmarshall.c.
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]
3/4 [
Author: Bin Lan
Email: bin.lan.cn@windriver.com
Subject: fs/yaffs2: fix a build warning in yaffs_yaffs2.c when running make allyesconfig
Date: Mon, 9 Jun 2025 14:51:49 +0800
When building linux yocto with allyesconfig, a build warning is
found:
fs/yaffs2/yaffs_yaffs2.c:557:21: error: no previous prototype for
‘yaffs2_do_endian_tnode_copy’ [-Werror=missing-prototypes]
557 | struct yaffs_tnode *yaffs2_do_endian_tnode_copy(struct yaffs_dev
*dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Inspect the code that the function yaffs2_do_endian_tnode_copy() is
only used in the current file. So add the static modifier to it.
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]
4/4 [
Author: Bin Lan
Email: bin.lan.cn@windriver.com
Subject: fs/yaffs2: fix a build warning in yaffs_mtdif.c when running make allyesconfig
Date: Mon, 9 Jun 2025 14:51:50 +0800
When building linux yocto with allyesconfig, a build warning is
found:
fs/yaffs2/yaffs_mtdif.c:48:5: error: no previous prototype for
‘nandmtd_erase_block’ [-Werror=missing-prototypes]
48 | int nandmtd_erase_block(struct yaffs_dev *dev, int block_no)
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Inspect the code that the function nandmtd_erase_block() is
not used by yaffs2. So remove it.
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit
9b877748ef7a789fb75db525fec5568691745fef)
Signed-off-by: Steve Sakoman <steve@sakoman.com>