All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-stable:linux-4.19.y 359/666] fs/f2fs/file.c:3176:40: warning: taking address of packed member of 'struct f2fs_super_block' may result in an unaligned pointer value
@ 2020-09-12 18:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-12 18:46 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4867 bytes --]

Hi Chao,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git linux-4.19.y
head:   e1712134c01acfde2d20aea490ad3b3581ec8e0a
commit: 2f7cc89b033f4d379139ec47a801a531f4f12f67 [359/666] f2fs: support FS_IOC_{GET,SET}FSLABEL
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 2f7cc89b033f4d379139ec47a801a531f4f12f67
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:10,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from fs/f2fs/file.c:8:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/xtensa/include/asm/page.h:182:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     182 |  ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
         |         ^~
   include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
      77 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   arch/xtensa/include/asm/page.h:190:32: note: in expansion of macro 'pfn_valid'
     190 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
         |                                ^~~~~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   In file included from fs/f2fs/file.c:25:
   fs/f2fs/f2fs.h: In function 'blkaddr_in_node':
   fs/f2fs/f2fs.h:2280:30: warning: taking address of packed member of 'struct f2fs_inode' may result in an unaligned pointer value [-Waddress-of-packed-member]
    2280 |  return RAW_IS_INODE(node) ? node->i.i_addr : node->dn.addr;
         |                              ^~~~
   fs/f2fs/f2fs.h:2280:47: warning: taking address of packed member of 'struct direct_node' may result in an unaligned pointer value [-Waddress-of-packed-member]
    2280 |  return RAW_IS_INODE(node) ? node->i.i_addr : node->dn.addr;
         |                                               ^~~~
   fs/f2fs/file.c: In function 'f2fs_get_volume_name':
>> fs/f2fs/file.c:3176:40: warning: taking address of packed member of 'struct f2fs_super_block' may result in an unaligned pointer value [-Waddress-of-packed-member]
    3176 |  count = utf16s_to_utf8s(sbi->raw_super->volume_name,
         |                          ~~~~~~~~~~~~~~^~~~~~~~~~~~~
   fs/f2fs/file.c: In function 'f2fs_set_volume_name':
   fs/f2fs/file.c:3212:18: warning: taking address of packed member of 'struct f2fs_super_block' may result in an unaligned pointer value [-Waddress-of-packed-member]
    3212 |    sbi->raw_super->volume_name,
         |    ~~~~~~~~~~~~~~^~~~~~~~~~~~~

# https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git/commit/?id=2f7cc89b033f4d379139ec47a801a531f4f12f67
git remote add f2fs-stable https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git
git fetch --no-tags f2fs-stable linux-4.19.y
git checkout 2f7cc89b033f4d379139ec47a801a531f4f12f67
vim +3176 fs/f2fs/file.c

  3162	
  3163	static int f2fs_get_volume_name(struct file *filp, unsigned long arg)
  3164	{
  3165		struct inode *inode = file_inode(filp);
  3166		struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
  3167		char *vbuf;
  3168		int count;
  3169		int err = 0;
  3170	
  3171		vbuf = f2fs_kzalloc(sbi, MAX_VOLUME_NAME, GFP_KERNEL);
  3172		if (!vbuf)
  3173			return -ENOMEM;
  3174	
  3175		down_read(&sbi->sb_lock);
> 3176		count = utf16s_to_utf8s(sbi->raw_super->volume_name,
  3177				ARRAY_SIZE(sbi->raw_super->volume_name),
  3178				UTF16_LITTLE_ENDIAN, vbuf, MAX_VOLUME_NAME);
  3179		up_read(&sbi->sb_lock);
  3180	
  3181		if (copy_to_user((char __user *)arg, vbuf,
  3182					min(FSLABEL_MAX, count)))
  3183			err = -EFAULT;
  3184	
  3185		kvfree(vbuf);
  3186		return err;
  3187	}
  3188	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 55150 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-12 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-12 18:46 [f2fs-stable:linux-4.19.y 359/666] fs/f2fs/file.c:3176:40: warning: taking address of packed member of 'struct f2fs_super_block' may result in an unaligned pointer value kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.