public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Christoph Böhmwalder " <christoph.boehmwalder@linbit.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [linux-next:master 5955/8611] include/linux/drbd_protocol.h:587:2: warning: field  within 'struct p_twopc_request' is less aligned than 'union p_twopc_request::(anonymous at include/linux/drbd_protocol.h:587:2)' and is usually due to 'struct p_twopc_request' being packed, which can le...
Date: Wed, 25 Mar 2026 05:08:54 +0800	[thread overview]
Message-ID: <202603250506.A6rmlvj4-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   85964cdcad0fac9a0eb7b87a0f9d88cc074b854c
commit: 945807e66a140e5ee0f919d04e15eadd4cc294be [5955/8611] drbd: remove BROKEN for DRBD
config: arm-randconfig-002-20260325 (https://download.01.org/0day-ci/archive/20260325/202603250506.A6rmlvj4-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 054e11d1a17e5ba88bb1a8ef32fad3346e80b186)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260325/202603250506.A6rmlvj4-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603250506.A6rmlvj4-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/block/drbd/drbd_receiver.c:31:
   In file included from drivers/block/drbd/drbd_int.h:33:
   In file included from include/linux/drbd_genl_api.h:36:
   In file included from include/linux/drbd_config.h:10:
>> include/linux/drbd_protocol.h:587:2: warning: field  within 'struct p_twopc_request' is less aligned than 'union p_twopc_request::(anonymous at include/linux/drbd_protocol.h:587:2)' and is usually due to 'struct p_twopc_request' being packed, which can lead to unaligned accesses [-Wunaligned-access]
     587 |         union {
         |         ^
   1 warning generated.


vim +587 include/linux/drbd_protocol.h

59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  571  
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  572  struct p_twopc_request {
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  573  	uint32_t tid;  /* transaction identifier */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  574  	union {
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  575  		struct { /* when DRBD_FF_2PC_V2 is set */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  576  			uint32_t flags;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  577  			uint16_t _pad;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  578  			int8_t  s8_initiator_node_id;  /* initiator of the transaction */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  579  			int8_t  s8_target_node_id;  /* target of the transaction (or -1) */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  580  		};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  581  		struct { /* original packet version */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  582  			uint32_t u32_initiator_node_id;  /* initiator of the transaction */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  583  			uint32_t u32_target_node_id;  /* target of the transaction (or -1) */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  584  		};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  585  	};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  586  	uint64_t nodes_to_reach;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16 @587  	union {
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  588  		union { /* TWOPC_STATE_CHANGE */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  589  			struct {    /* P_TWOPC_PREPARE */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  590  				uint64_t _compat_pad;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  591  				uint32_t mask;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  592  				uint32_t val;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  593  			};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  594  			struct { /* P_TWOPC_COMMIT */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  595  				uint64_t primary_nodes;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  596  				uint64_t reachable_nodes; /* when TWOPC_HAS_RECHABLE flag is set */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  597  			};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  598  		};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  599  		union {	 /* TWOPC_RESIZE */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  600  			struct {    /* P_TWOPC_PREP_RSZ */
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  601  				uint64_t user_size;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  602  				uint16_t dds_flags;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  603  			};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  604  			struct {    /* P_TWOPC_COMMIT	*/
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  605  				uint64_t diskful_primary_nodes;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  606  				uint64_t exposed_size;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  607  			};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  608  		};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  609  	};
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  610  } __packed;
59f03ec44e87aaf Christoph Böhmwalder 2025-12-16  611  

:::::: The code at line 587 was first introduced by commit
:::::: 59f03ec44e87aaf5b153440601e62f1c1c5260cb drbd: update and move protocol definitions

:::::: TO: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
:::::: CC: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-03-24 21:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202603250506.A6rmlvj4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christoph.boehmwalder@linbit.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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