All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer value
@ 2021-09-03  7:26 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-09-03  7:26 UTC (permalink / raw)
  To: Giovanni Cabiddu
  Cc: llvm, kbuild-all, linux-kernel, Herbert Xu, Fiona Trahe,
	Wojciech Ziemba, Andy Shevchenko

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a9c9a6f741cdaa2fa9ba24a790db8d07295761e3
commit: f9c697c4bfc6002d92e8015b65fe2a79acadb416 crypto: qat - split transport CSR access logic
date:   10 months ago
config: i386-buildonly-randconfig-r002-20210903 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c9948e9254fbb6ea00f66c7b4542311d21e060be)
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_dh895xcc/adf_dh895xcc_hw_data.c:3:
   In file included from drivers/crypto/qat/qat_dh895xcc/../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);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229: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.


vim +229 drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c

   190	
   191	void adf_init_hw_data_dh895xcc(struct adf_hw_device_data *hw_data)
   192	{
   193		hw_data->dev_class = &dh895xcc_class;
   194		hw_data->instance_id = dh895xcc_class.instances++;
   195		hw_data->num_banks = ADF_DH895XCC_ETR_MAX_BANKS;
   196		hw_data->num_rings_per_bank = ADF_ETR_MAX_RINGS_PER_BANK;
   197		hw_data->num_accel = ADF_DH895XCC_MAX_ACCELERATORS;
   198		hw_data->num_logical_accel = 1;
   199		hw_data->num_engines = ADF_DH895XCC_MAX_ACCELENGINES;
   200		hw_data->tx_rx_gap = ADF_DH895XCC_RX_RINGS_OFFSET;
   201		hw_data->tx_rings_mask = ADF_DH895XCC_TX_RINGS_MASK;
   202		hw_data->alloc_irq = adf_isr_resource_alloc;
   203		hw_data->free_irq = adf_isr_resource_free;
   204		hw_data->enable_error_correction = adf_enable_error_correction;
   205		hw_data->get_accel_mask = get_accel_mask;
   206		hw_data->get_ae_mask = get_ae_mask;
   207		hw_data->get_num_accels = get_num_accels;
   208		hw_data->get_num_aes = get_num_aes;
   209		hw_data->get_etr_bar_id = get_etr_bar_id;
   210		hw_data->get_misc_bar_id = get_misc_bar_id;
   211		hw_data->get_pf2vf_offset = get_pf2vf_offset;
   212		hw_data->get_vintmsk_offset = get_vintmsk_offset;
   213		hw_data->get_sram_bar_id = get_sram_bar_id;
   214		hw_data->get_sku = get_sku;
   215		hw_data->fw_name = ADF_DH895XCC_FW;
   216		hw_data->fw_mmp_name = ADF_DH895XCC_MMP;
   217		hw_data->init_admin_comms = adf_init_admin_comms;
   218		hw_data->exit_admin_comms = adf_exit_admin_comms;
   219		hw_data->configure_iov_threads = configure_iov_threads;
   220		hw_data->disable_iov = adf_disable_sriov;
   221		hw_data->send_admin_init = adf_send_admin_init;
   222		hw_data->init_arb = adf_init_arb;
   223		hw_data->exit_arb = adf_exit_arb;
   224		hw_data->get_arb_mapping = adf_get_arbiter_mapping;
   225		hw_data->enable_ints = adf_enable_ints;
   226		hw_data->enable_vf2pf_comms = adf_pf_enable_vf2pf_comms;
   227		hw_data->reset_device = adf_reset_sbr;
   228		hw_data->min_iov_compat_ver = ADF_PFVF_COMPATIBILITY_VERSION;
 > 229		adf_gen2_init_hw_csr_ops(&hw_data->csr_ops);
   230	}
   231	

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer value
@ 2021-09-03  7:26 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-09-03  7:26 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a9c9a6f741cdaa2fa9ba24a790db8d07295761e3
commit: f9c697c4bfc6002d92e8015b65fe2a79acadb416 crypto: qat - split transport CSR access logic
date:   10 months ago
config: i386-buildonly-randconfig-r002-20210903 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c9948e9254fbb6ea00f66c7b4542311d21e060be)
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_dh895xcc/adf_dh895xcc_hw_data.c:3:
   In file included from drivers/crypto/qat/qat_dh895xcc/../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);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229: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.


vim +229 drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c

   190	
   191	void adf_init_hw_data_dh895xcc(struct adf_hw_device_data *hw_data)
   192	{
   193		hw_data->dev_class = &dh895xcc_class;
   194		hw_data->instance_id = dh895xcc_class.instances++;
   195		hw_data->num_banks = ADF_DH895XCC_ETR_MAX_BANKS;
   196		hw_data->num_rings_per_bank = ADF_ETR_MAX_RINGS_PER_BANK;
   197		hw_data->num_accel = ADF_DH895XCC_MAX_ACCELERATORS;
   198		hw_data->num_logical_accel = 1;
   199		hw_data->num_engines = ADF_DH895XCC_MAX_ACCELENGINES;
   200		hw_data->tx_rx_gap = ADF_DH895XCC_RX_RINGS_OFFSET;
   201		hw_data->tx_rings_mask = ADF_DH895XCC_TX_RINGS_MASK;
   202		hw_data->alloc_irq = adf_isr_resource_alloc;
   203		hw_data->free_irq = adf_isr_resource_free;
   204		hw_data->enable_error_correction = adf_enable_error_correction;
   205		hw_data->get_accel_mask = get_accel_mask;
   206		hw_data->get_ae_mask = get_ae_mask;
   207		hw_data->get_num_accels = get_num_accels;
   208		hw_data->get_num_aes = get_num_aes;
   209		hw_data->get_etr_bar_id = get_etr_bar_id;
   210		hw_data->get_misc_bar_id = get_misc_bar_id;
   211		hw_data->get_pf2vf_offset = get_pf2vf_offset;
   212		hw_data->get_vintmsk_offset = get_vintmsk_offset;
   213		hw_data->get_sram_bar_id = get_sram_bar_id;
   214		hw_data->get_sku = get_sku;
   215		hw_data->fw_name = ADF_DH895XCC_FW;
   216		hw_data->fw_mmp_name = ADF_DH895XCC_MMP;
   217		hw_data->init_admin_comms = adf_init_admin_comms;
   218		hw_data->exit_admin_comms = adf_exit_admin_comms;
   219		hw_data->configure_iov_threads = configure_iov_threads;
   220		hw_data->disable_iov = adf_disable_sriov;
   221		hw_data->send_admin_init = adf_send_admin_init;
   222		hw_data->init_arb = adf_init_arb;
   223		hw_data->exit_arb = adf_exit_arb;
   224		hw_data->get_arb_mapping = adf_get_arbiter_mapping;
   225		hw_data->enable_ints = adf_enable_ints;
   226		hw_data->enable_vf2pf_comms = adf_pf_enable_vf2pf_comms;
   227		hw_data->reset_device = adf_reset_sbr;
   228		hw_data->min_iov_compat_ver = ADF_PFVF_COMPATIBILITY_VERSION;
 > 229		adf_gen2_init_hw_csr_ops(&hw_data->csr_ops);
   230	}
   231	

---
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: 38734 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer value
  2021-09-03  7:26 ` kernel test robot
@ 2021-09-03  8:54   ` Giovanni Cabiddu
  -1 siblings, 0 replies; 4+ messages in thread
From: Giovanni Cabiddu @ 2021-09-03  8:54 UTC (permalink / raw)
  To: kernel test robot
  Cc: llvm, kbuild-all, linux-kernel, Herbert Xu, Fiona Trahe,
	Wojciech Ziemba, Andy Shevchenko

On Fri, Sep 03, 2021 at 03:26:45PM +0800, kernel test robot wrote:
> >> drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229: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.
I already sent a fix to resolve such warnings:
https://patchwork.kernel.org/project/linux-crypto/patch/20210902083459.238983-1-giovanni.cabiddu@intel.com/

Regards,

-- 
Giovanni

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer value
@ 2021-09-03  8:54   ` Giovanni Cabiddu
  0 siblings, 0 replies; 4+ messages in thread
From: Giovanni Cabiddu @ 2021-09-03  8:54 UTC (permalink / raw)
  To: kbuild-all

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

On Fri, Sep 03, 2021 at 03:26:45PM +0800, kernel test robot wrote:
> >> drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229: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.
I already sent a fix to resolve such warnings:
https://patchwork.kernel.org/project/linux-crypto/patch/20210902083459.238983-1-giovanni.cabiddu(a)intel.com/

Regards,

-- 
Giovanni

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-03  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03  7:26 drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c:229: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-03  7:26 ` kernel test robot
2021-09-03  8:54 ` Giovanni Cabiddu
2021-09-03  8:54   ` Giovanni Cabiddu

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.