From: Nathan Chancellor <nathan@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Jeff Layton <jlayton@kernel.org>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [jlayton:mgtime 4/5] fs/inode.c:73:15: error: '__section__' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties
Date: Tue, 28 May 2024 13:10:35 -0700 [thread overview]
Message-ID: <20240528201035.GA2680415@thelio-3990X> (raw)
In-Reply-To: <202405281321.aRVc7usN-lkp@intel.com>
On Tue, May 28, 2024 at 01:22:40PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git mgtime
> head: 05aa6b03b8c3451d4aac5fb47e9e99c6e00ee304
> commit: 05ca0fa7e195e028694f41de279dec33ada93d21 [4/5] fs: add infrastructure for multigrain timestamps
> config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240528/202405281321.aRVc7usN-lkp@intel.com/config)
> compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240528/202405281321.aRVc7usN-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/202405281321.aRVc7usN-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> fs/inode.c:73:15: error: '__section__' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties
> 73 | static struct __cacheline_aligned_in_smp ctime_floor_val ctime_floor;
> | ^
The message is slightly obtuse but this attribute shouldn't be splitting
the type, otherwise it is parsed as a type attribute.
static struct ctime_floor_val ctime_floor __cacheline_aligned_in_smp;
or
static __cacheline_aligned_in_smp struct ctime_floor_val ctime_floor;
should work.
> include/linux/cache.h:60:36: note: expanded from macro '__cacheline_aligned_in_smp'
> 60 | #define __cacheline_aligned_in_smp __cacheline_aligned
> | ^
> include/linux/cache.h:55:4: note: expanded from macro '__cacheline_aligned'
> 55 | __section__(".data..cacheline_aligned")))
> | ^
> fs/inode.c:73:15: warning: attribute declaration must precede definition [-Wignored-attributes]
> include/linux/cache.h:60:36: note: expanded from macro '__cacheline_aligned_in_smp'
> 60 | #define __cacheline_aligned_in_smp __cacheline_aligned
> | ^
> include/linux/cache.h:54:18: note: expanded from macro '__cacheline_aligned'
> 54 | __attribute__((__aligned__(SMP_CACHE_BYTES), \
> | ^
> fs/inode.c:64:8: note: previous definition is here
> 64 | struct ctime_floor_val {
> | ^
> 1 warning and 1 error generated.
>
>
> vim +/__section__ +73 fs/inode.c
>
> 62
> 63 /* Floor value for all ctime stamps */
> 64 struct ctime_floor_val {
> 65 union {
> 66 struct {
> 67 ktime_t coarse;
> 68 ktime_t floor;
> 69 };
> 70 u128 full;
> 71 };
> 72 };
> > 73 static struct __cacheline_aligned_in_smp ctime_floor_val ctime_floor;
> 74
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
prev parent reply other threads:[~2024-05-28 20:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 5:22 [jlayton:mgtime 4/5] fs/inode.c:73:15: error: '__section__' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties kernel test robot
2024-05-28 20:10 ` Nathan Chancellor [this message]
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=20240528201035.GA2680415@thelio-3990X \
--to=nathan@kernel.org \
--cc=jlayton@kernel.org \
--cc=lkp@intel.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