From: Andy Shevchenko <andy.shevchenko@gmail.com> To: kernel test robot <lkp@intel.com>, Nick Desaulniers <nick.desaulniers@gmail.com> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>, clang-built-linux <clang-built-linux@googlegroups.com>, kbuild-all@lists.01.org, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Petr Mladek <pmladek@suse.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Subject: Re: drivers/media/v4l2-core/v4l2-ioctl.c:303:28: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value Date: Wed, 14 Jul 2021 22:45:26 +0300 [thread overview] Message-ID: <CAHp75Vfu1rhUV+SOq2ikFWd2G6x9j3BT6OLPhPcf8VZE5Umeqw@mail.gmail.com> (raw) In-Reply-To: <202107150148.RpWnKapX-lkp@intel.com> +Cc: Nick. Nick, any recommendations on how to fix this in the best possible way? On Wed, Jul 14, 2021 at 8:58 PM kernel test robot <lkp@intel.com> wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 8096acd7442e613fad0354fc8dfdb2003cceea0b > commit: e927e1e0f0dd3e353d5556503a71484008692c82 v4l: ioctl: Use %p4cc printk modifier to print FourCC codes > date: 5 months ago > config: mips-randconfig-r004-20210714 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe) > 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 > # install mips cross compiling tool for clang build > # apt-get install binutils-mips-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e927e1e0f0dd3e353d5556503a71484008692c82 > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > git fetch --no-tags linus master > git checkout e927e1e0f0dd3e353d5556503a71484008692c82 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips > > 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 >>): > > >> drivers/media/v4l2-core/v4l2-ioctl.c:303:28: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value [-Waddress-of-packed-member] > mp->width, mp->height, &mp->pixelformat, This seems unsolvable without copying a value. > >> drivers/media/v4l2-core/v4l2-ioctl.c:347:37: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_sdr_format' may result in an unaligned pointer value [-Waddress-of-packed-member] Why is it packed in the first place? Is it used on unaligned addresses in other structures? But even so, why should it matter? > >> drivers/media/v4l2-core/v4l2-ioctl.c:353:5: warning: taking address of packed member 'dataformat' of class or structure 'v4l2_meta_format' may result in an unaligned pointer value [-Waddress-of-packed-member] > &meta->dataformat, meta->buffersize); Ditto. -- With Best Regards, Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com> To: kbuild-all@lists.01.org Subject: Re: drivers/media/v4l2-core/v4l2-ioctl.c:303:28: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value Date: Wed, 14 Jul 2021 22:45:26 +0300 [thread overview] Message-ID: <CAHp75Vfu1rhUV+SOq2ikFWd2G6x9j3BT6OLPhPcf8VZE5Umeqw@mail.gmail.com> (raw) In-Reply-To: <202107150148.RpWnKapX-lkp@intel.com> [-- Attachment #1: Type: text/plain, Size: 2587 bytes --] +Cc: Nick. Nick, any recommendations on how to fix this in the best possible way? On Wed, Jul 14, 2021 at 8:58 PM kernel test robot <lkp@intel.com> wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 8096acd7442e613fad0354fc8dfdb2003cceea0b > commit: e927e1e0f0dd3e353d5556503a71484008692c82 v4l: ioctl: Use %p4cc printk modifier to print FourCC codes > date: 5 months ago > config: mips-randconfig-r004-20210714 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe) > 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 > # install mips cross compiling tool for clang build > # apt-get install binutils-mips-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e927e1e0f0dd3e353d5556503a71484008692c82 > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > git fetch --no-tags linus master > git checkout e927e1e0f0dd3e353d5556503a71484008692c82 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips > > 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 >>): > > >> drivers/media/v4l2-core/v4l2-ioctl.c:303:28: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value [-Waddress-of-packed-member] > mp->width, mp->height, &mp->pixelformat, This seems unsolvable without copying a value. > >> drivers/media/v4l2-core/v4l2-ioctl.c:347:37: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_sdr_format' may result in an unaligned pointer value [-Waddress-of-packed-member] Why is it packed in the first place? Is it used on unaligned addresses in other structures? But even so, why should it matter? > >> drivers/media/v4l2-core/v4l2-ioctl.c:353:5: warning: taking address of packed member 'dataformat' of class or structure 'v4l2_meta_format' may result in an unaligned pointer value [-Waddress-of-packed-member] > &meta->dataformat, meta->buffersize); Ditto. -- With Best Regards, Andy Shevchenko
next prev parent reply other threads:[~2021-07-14 20:03 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-14 17:55 drivers/media/v4l2-core/v4l2-ioctl.c:303:28: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value kernel test robot 2021-07-14 17:55 ` kernel test robot 2021-07-14 19:45 ` Andy Shevchenko [this message] 2021-07-14 19:45 ` Andy Shevchenko 2021-07-16 11:41 ` Sakari Ailus 2021-07-16 11:41 ` Sakari Ailus 2021-07-16 12:12 ` Andy Shevchenko 2021-07-16 12:12 ` Andy Shevchenko 2021-08-19 8:10 ` Sakari Ailus 2021-08-19 8:10 ` Sakari Ailus 2021-08-26 13:22 ` Petr Mladek 2021-08-26 13:22 ` Petr Mladek 2021-11-04 22:21 kernel test robot 2021-11-04 22:21 ` kernel test robot 2021-11-05 10:21 ` Andy Shevchenko 2021-11-05 10:21 ` Andy Shevchenko 2022-01-08 10:33 kernel test robot 2022-01-08 10:33 ` kernel test robot 2022-01-09 14:26 ` Andy Shevchenko 2022-01-09 14:26 ` Andy Shevchenko 2022-01-10 19:44 ` Nick Desaulniers 2022-01-10 19:44 ` Nick Desaulniers 2022-01-10 20:49 ` Andy Shevchenko 2022-01-10 20:49 ` Andy Shevchenko 2022-01-10 21:22 ` Nick Desaulniers 2022-01-10 21:22 ` Nick Desaulniers 2022-01-17 3:40 kernel test robot 2022-01-17 3:40 ` kernel test robot
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=CAHp75Vfu1rhUV+SOq2ikFWd2G6x9j3BT6OLPhPcf8VZE5Umeqw@mail.gmail.com \ --to=andy.shevchenko@gmail.com \ --cc=andriy.shevchenko@linux.intel.com \ --cc=clang-built-linux@googlegroups.com \ --cc=kbuild-all@lists.01.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lkp@intel.com \ --cc=nick.desaulniers@gmail.com \ --cc=pmladek@suse.com \ --cc=sakari.ailus@linux.intel.com \ --cc=tzimmermann@suse.de \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.