]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
linux-yocto/6.12: yaffs2: silence warnings
authorBruce Ashfield <bruce.ashfield@gmail.com>
Tue, 8 Jul 2025 14:36:31 +0000 (10:36 -0400)
committerSteve Sakoman <steve@sakoman.com>
Mon, 21 Jul 2025 16:43:01 +0000 (09:43 -0700)
commit8e139005a965425c5ca4e1d89b18666dfd26bbd1
tree229dcc7e63d22cef201b132ccaa24f32394b8c1c
parent97b6b985ee531ca84cc1e7a7875ba2c6ff55e4f1
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>
meta/recipes-kernel/linux/linux-yocto-rt_6.12.bb
meta/recipes-kernel/linux/linux-yocto-tiny_6.12.bb
meta/recipes-kernel/linux/linux-yocto_6.12.bb