From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Vegard Nossum <vegard.nossum@oracle.com>
Cc: kernel test robot <lkp@intel.com>,
Sasha Levin <sashal@kernel.org>,
oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Daniel Santos <daniel.santos@pobox.com>,
Ryder Lee <ryder.lee@mediatek.com>, Felix Fietkau <nbd@nbd.name>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [linux-stable-rc:queue/5.4 4610/23441] include/linux/compiler.h:350:45: error: call to '__compiletime_assert_215' declared with attribute error: FIELD_GET: mask is not constant
Date: Fri, 26 May 2023 19:58:42 +0100 [thread overview]
Message-ID: <2023052621-raisin-clergyman-47ff@gregkh> (raw)
In-Reply-To: <e542a9ea-8276-16c7-9319-0bf835f923df@oracle.com>
On Tue, May 23, 2023 at 03:45:29PM +0200, Vegard Nossum wrote:
>
> On 5/23/23 15:37, Vegard Nossum wrote:
> >
> > On 5/21/23 02:12, kernel test robot wrote:
> > > Hi Vegard,
> > >
> > > FYI, the error/warning still remains.
> > >
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> > > queue/5.4
> > > head: 9b5924fbde0d84c8b30d7ee297a08ca441a760de
> > > commit: 3910babeac1ab031f4e178042cbd1af9a9a0ec51 [4610/23441]
> > > compiler.h: fix error in BUILD_BUG_ON() reporting
> > > config: sparc64-randconfig-c44-20230521
> > > compiler: sparc64-linux-gcc (GCC) 12.1.0
> [...]
>
> > I'm not sure why this flags my patch as the culprit.
> >
> > I just tried this (with the supplied config):
> >
> > git checkout stable/linux-5.4.y
> > git revert 3910babeac1ab031f4e178042cbd1af9a9a0ec51 # revert my patch
> > make drivers/net/wireless/mediatek/mt76/mt7615/mac.o
> >
> > and it still outputs the same error.
> >
> > The FIELD_GET() call was added in bf92e76851009 and seems to have been
> > broken from the start as far as I can tell? If I checkout bf92e76851009^
> > then it builds, if I checkout bf92e76851009 then it fails.
> >
> > Should we just redefine to_rssi() as a macro so it actually passes the
> > field as a literal/constant?
>
> Ah, there is a mainline patch that fixes this, doing exactly that:
>
> commit f53300fdaa84dc02f96ab9446b5bac4d20016c43
> Author: Pablo Greco <pgreco@centosproject.org>
> Date: Sun Dec 1 15:17:10 2019 -0300
>
> mt76: mt7615: Fix build with older compilers
> [...]
>
> -static inline s8 to_rssi(u32 field, u32 rxv)
> -{
> - return (FIELD_GET(field, rxv) - 220) / 2;
> -}
> +#define to_rssi(field, rxv) ((FIELD_GET(field, rxv) - 220) / 2)
>
> Greg, Sasha, does it make sense to pick that for 5.4 (as it doesn't seem
> to be in there) to shut up the kernel test robot?
>
> If so, should we add this to the changelog as well?
The changelog says it already, so now queued up :)
thanks,
greg k-h
prev parent reply other threads:[~2023-05-26 18:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-21 0:12 kernel test robot
2023-05-23 13:37 ` Vegard Nossum
2023-05-23 13:45 ` Vegard Nossum
2023-05-26 18:58 ` Greg Kroah-Hartman [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=2023052621-raisin-clergyman-47ff@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=daniel.santos@pobox.com \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=nbd@nbd.name \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ryder.lee@mediatek.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=vegard.nossum@oracle.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