From: Ira Weiny <ira.weiny@intel.com>
To: Nathan Chancellor <nathan@kernel.org>, Ira Weiny <ira.weiny@intel.com>
Cc: "Jiang, Dave" <dave.jiang@intel.com>, <llvm@lists.linux.dev>,
<oe-kbuild-all@lists.linux.dev>,
Navneet Singh <navneet.singh@intel.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>, <kees@kernel.org>,
<linux-hardening@vger.kernel.org>
Subject: Re: [weiny2:dcd-v4-2024-10-29 9/28] drivers/cxl/cxlmem.h:755:35: error: use of undeclared identifier 'regions_retunred'
Date: Wed, 30 Oct 2024 13:56:27 -0500 [thread overview]
Message-ID: <6722815b25329_5077a2947e@iweiny-mobl.notmuch> (raw)
In-Reply-To: <20241030162522.GA2228266@thelio-3990X>
Nathan Chancellor wrote:
> On Wed, Oct 30, 2024 at 09:50:42AM -0500, Ira Weiny wrote:
> > [snip]
> >
> > > >> drivers/cxl/cxlmem.h:755:35: error: use of undeclared identifier 'regions_retunred'
> > > 755 | } __packed region[] __counted_by(regions_retunred);
> > > | ^
> > > 16 warnings and 1 error generated.
> > >
> > >
> > > vim +/regions_retunred +755 drivers/cxl/cxlmem.h
> > >
> > > 740
> > > 741 /* See CXL 3.1 Table 8-164 get dynamic capacity config Output Payload */
> > > 742 struct cxl_mbox_get_dc_config_out {
> > > 743 u8 avail_region_count;
> > > 744 u8 regions_returned;
> > > 745 u8 rsvd[6];
> > > 746 /* See CXL 3.1 Table 8-165 */
> > > 747 struct cxl_dc_region_config {
> > > 748 __le64 region_base;
> > > 749 __le64 region_decode_length;
> > > 750 __le64 region_length;
> > > 751 __le64 region_block_size;
> > > 752 __le32 region_dsmad_handle;
> > > 753 u8 flags;
> > > 754 u8 rsvd[3];
> > > > 755 } __packed region[] __counted_by(regions_retunred);
> >
> > I'm not sure why my config/compiler did not catch this typo. I'm looking
> > into it.
>
> You are likely not using a compiler that supports __counted_by, which is
> currently clang 18 (although soon to be 19.1.3 [1]) and GCC 15 (tip of
> tree), in which case, the macro just evaluates to nothing, so there is
> no validation of the value to the macro. It would be nice if there could
> be but nothing immediately comes to mind because of where this macro is
> being placed.
Yes Thanks! That was it. I did not realize counted_by was that new.[2]
Ira
[2] https://lore.kernel.org/all/67225eb59d0ac_483142946d@iweiny-mobl.notmuch/
>
> [1]: https://lore.kernel.org/20241029140036.577804-2-kernel@jfarr.cc/
>
> Cheers,
> Nathan
prev parent reply other threads:[~2024-10-30 18:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 12:15 [weiny2:dcd-v4-2024-10-29 9/28] drivers/cxl/cxlmem.h:755:35: error: use of undeclared identifier 'regions_retunred' kernel test robot
2024-10-30 14:50 ` Ira Weiny
2024-10-30 16:25 ` Nathan Chancellor
2024-10-30 18:56 ` Ira Weiny [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=6722815b25329_5077a2947e@iweiny-mobl.notmuch \
--to=ira.weiny@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=dave.jiang@intel.com \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=navneet.singh@intel.com \
--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 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.