linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: David Miller <davem@davemloft.net>,
	Networking <netdev@vger.kernel.org>,
	Jouni Malinen <jouni@codeaurora.org>,
	Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	ath11k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: linux-next: build failure after merge of the net-next tree
Date: Fri, 08 Oct 2021 08:52:51 +0300	[thread overview]
Message-ID: <87tuhs5ah8.fsf@codeaurora.org> (raw)
In-Reply-To: <20211008162103.1921a7a7@canb.auug.org.au> (Stephen Rothwell's message of "Fri, 8 Oct 2021 16:21:03 +1100")

Stephen Rothwell <sfr@canb.auug.org.au> writes:

> After merging the net-next tree, today's linux-next build (xtensa,
> m68k allmodconfig) failed like this:
>
> In file included from <command-line>:0:0:
> In function 'ath11k_peer_assoc_h_smps',
>     inlined from 'ath11k_peer_assoc_prepare' at drivers/net/wireless/ath/ath11k/mac.c:2362:2:
> include/linux/compiler_types.h:317:38: error: call to '__compiletime_assert_650' declared with attribute error: FIELD_GET: type of reg too small for mask
>   _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>                                       ^
> include/linux/compiler_types.h:298:4: note: in definition of macro '__compiletime_assert'
>     prefix ## suffix();    \
>     ^
> include/linux/compiler_types.h:317:2: note: in expansion of macro '_compiletime_assert'
>   _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>   ^
> include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
>  #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>                                      ^
> include/linux/bitfield.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>    BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull,  \
>    ^
> include/linux/bitfield.h:108:3: note: in expansion of macro '__BF_FIELD_CHECK'
>    __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
>    ^
> drivers/net/wireless/ath/ath11k/mac.c:2079:10: note: in expansion of macro 'FIELD_GET'
>    smps = FIELD_GET(IEEE80211_HE_6GHZ_CAP_SM_PS,
>           ^
>
> Caused by commit
>
>   6f4d70308e5e ("ath11k: support SMPS configuration for 6 GHz")

Thanks for the report, weird that I don't see it on x86. I can't look at
this in detail now, maybe later today, but I wonder if the diff below
fixes the issue?

At least it's cleaner than using FIELD_GET(), actually ath11k should be
cleaned up to use xx_get_bits() all over.

Kalle

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index d897020dd52d..3e7e569f284b 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2076,8 +2076,8 @@ static void ath11k_peer_assoc_h_smps(struct ieee80211_sta *sta,
 		smps = ht_cap->cap & IEEE80211_HT_CAP_SM_PS;
 		smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT;
 	} else {
-		smps = FIELD_GET(IEEE80211_HE_6GHZ_CAP_SM_PS,
-				 le16_to_cpu(sta->he_6ghz_capa.capa));
+		smps = le16_get_bits(sta->he_6ghz_capa.capa,
+				     IEEE80211_HE_6GHZ_CAP_SM_PS);
 	}
 
 	switch (smps) {


       reply	other threads:[~2021-10-08  5:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211008162103.1921a7a7@canb.auug.org.au>
2021-10-08  5:52 ` Kalle Valo [this message]
2021-10-08  8:14   ` linux-next: build failure after merge of the net-next tree Geert Uytterhoeven
2021-10-08 14:43     ` Kalle Valo
2021-10-08 15:14       ` David Miller

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=87tuhs5ah8.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=davem@davemloft.net \
    --cc=jouni@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pradeepc@codeaurora.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).