llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: kernel test robot <lkp@intel.com>
Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
	llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Fiona Trahe <fiona.trahe@intel.com>,
	Wojciech Ziemba <wojciech.ziemba@intel.com>
Subject: Re: drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c:102:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer value
Date: Wed, 1 Sep 2021 14:18:17 +0300	[thread overview]
Message-ID: <YS9heetW+E+1Nr1w@smile.fi.intel.com> (raw)
In-Reply-To: <202109010001.5r11IRSX-lkp@intel.com>

On Wed, Sep 01, 2021 at 12:19:08AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b91db6a0b52e019b6bdabea3f1dbe36d85c7e52c
> commit: f9c697c4bfc6002d92e8015b65fe2a79acadb416 crypto: qat - split transport CSR access logic
> date:   10 months ago
> config: i386-randconfig-r012-20210831 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4b1fde8a2b681dad2ce0c082a5d6422caa06b0bc)
> 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
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f9c697c4bfc6002d92e8015b65fe2a79acadb416
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout f9c697c4bfc6002d92e8015b65fe2a79acadb416
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 
> 
> 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 >>):
> 
>    clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
>    In file included from drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c:3:
>    In file included from drivers/crypto/qat/qat_c62xvf/../qat_common/adf_accel_devices.h:5:
>    In file included from include/linux/interrupt.h:11:
>    In file included from include/linux/hardirq.h:5:
>    In file included from include/linux/context_tracking_state.h:5:
>    In file included from include/linux/percpu.h:6:
>    In file included from include/linux/preempt.h:78:
>    In file included from arch/x86/include/asm/preempt.h:7:
>    In file included from include/linux/thread_info.h:38:
>    arch/x86/include/asm/thread_info.h:183:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
>            oldframe = __builtin_frame_address(1);
>                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
>    arch/x86/include/asm/thread_info.h:185:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
>                    frame = __builtin_frame_address(2);

Funny, but it's not related to the reported issue.

>                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c:102:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer value [-Waddress-of-packed-member]
>            adf_gen2_init_hw_csr_ops(&hw_data->csr_ops);
>                                      ^~~~~~~~~~~~~~~~
>    3 warnings generated.


Why on Earth the struct adf_hw_device_data, that contains a lot of pointers,
marked as __packed?! That __packed has to be dropped.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-09-01 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 16:19 drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c:102:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer value kernel test robot
2021-09-01 11:18 ` Andy Shevchenko [this message]
2021-09-01 11:36   ` Giovanni Cabiddu

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=YS9heetW+E+1Nr1w@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=fiona.trahe@intel.com \
    --cc=giovanni.cabiddu@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=wojciech.ziemba@intel.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).