Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2434036pxb; Fri, 8 Oct 2021 07:44:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyllHS1DWWcJC44PcSMNnFlq1Gf1hduQ3DW+pm7Xj0FUW+I/3yyv8e6szgYMQXmy0T3VNj8 X-Received: by 2002:a50:e14a:: with SMTP id i10mr15691742edl.73.1633704289055; Fri, 08 Oct 2021 07:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633704289; cv=none; d=google.com; s=arc-20160816; b=mWYsxyDWwFCmDQ7L+i5Z1o2fMQ96ofgpTyqpab4UbcL2pjO8dlWuWZbArjNQVti4Bu cH37jIE02F0lHg4ZQW2iKsO7+WOKTLXsK1lEfTlIJLWS0Niic2ZrMz2eWtaRN6A2/y5G 3dzzQ3HAVrTzVwkiaSkuWElRynAEWs5DwpO8VwnBk4dpf3a/EtidtsmKxBPnOHEqyYr7 Wgc66FgVRTQTjreGn6OdT84w3sknGNH6m5g3aBOF/svbJr1m2+xlQiNm3/yisuxeksrc GDmxhBuMVIwsK3y+6w4jg2VphzAswVgiOc1pWSk81oy/lfRrtuiSPaSviBPcfVZyrXPP Wavw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dmarc-filter:sender :dkim-signature; bh=9zDcaEkAkspustVVY2KAKAYV6I1Sut33Nhr4VG24NAw=; b=0TtNAmKV0XmbvlxYlRZK/DYNyEyNYlWCUGR3EZQNJrmo0oZ2s5FJEwQ0IPbEBVrjx2 +vRzu5w/106COJqgKO7q3auch4cT6ddsa70FAPHYFO9OLZyldDndcQ/5KCTE57Nk95Fl omPZnCyBpExRMW4HXaiJjXNIh8wmj8gVf19CAFkK6guusMi8tFpz4HfC7l4Z3n0opolH ff1lWWev8ShP3vAgdw2URi5tAmmAr5VF3RUtx9i6DB4PGz0fA81eHtLfMKxQ0D+wckVe BG6LoCkj/0jqycW67L0SSUMO0xA2kUM422imJrxcdyE/4eBhSVFgiHpRkQJmklIJpqCs t7Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=XjpvTUM2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p15si4236447edj.97.2021.10.08.07.44.29; Fri, 08 Oct 2021 07:44:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=XjpvTUM2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242505AbhJHOpx (ORCPT + 76 others); Fri, 8 Oct 2021 10:45:53 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:25123 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242348AbhJHOpx (ORCPT ); Fri, 8 Oct 2021 10:45:53 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1633704237; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=9zDcaEkAkspustVVY2KAKAYV6I1Sut33Nhr4VG24NAw=; b=XjpvTUM2cZdgNxPknrJlyReGZhYo94FP9vBw7tlLGr8uUSFA9SaGZUB1vW343+pukhsilKEc r7qz53Hcy0tLEgen0Pp9fwT5G8OKVMhbbmzwPf+okcB7Od0LSiWaVtZEL8llRQ/CjUhU/u0N +VCQAhv3qRsnoSwob4yiGBgb+fc= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 61605920f3e5b80f1f06214b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 08 Oct 2021 14:43:44 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 934CFC4360C; Fri, 8 Oct 2021 14:43:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from tykki (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 51711C4338F; Fri, 8 Oct 2021 14:43:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 51711C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Kalle Valo To: Geert Uytterhoeven Cc: Stephen Rothwell , David Miller , Networking , Jouni Malinen , Pradeep Kumar Chitrapu , Linux Kernel Mailing List , Linux Next Mailing List , ath11k@lists.infradead.org, linux-wireless Subject: Re: linux-next: build failure after merge of the net-next tree References: <20211008162103.1921a7a7@canb.auug.org.au> <87tuhs5ah8.fsf@codeaurora.org> Date: Fri, 08 Oct 2021 17:43:39 +0300 In-Reply-To: (Geert Uytterhoeven's message of "Fri, 8 Oct 2021 10:14:25 +0200") Message-ID: <87pmsf60h0.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Geert, Geert Uytterhoeven writes: > On Fri, Oct 8, 2021 at 7:55 AM Kalle Valo wrote: >> Stephen Rothwell writes: >> >> > After merging the net-next tree, today's linux-next build (xtensa, >> > m68k allmodconfig) failed like this: >> > >> > In file included from :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? > > It seems to be related to passing "le16_to_cpu(sta->he_6ghz_capa.capa)". > Probably typeof(le16_to_cpu(sta->he_6ghz_capa.capa)) goes berserk. > le16_to_cpu() is a complex macro on big-endian. I had expected to see > a similar issue on powerpc, but I don't. > Using an intermediate "u16 capa = le16_to_cpu(sta->he_6ghz_capa.capa)" > fixes the problem. > >> 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); >> } > > Thanks, that works, too, so (compile) > Tested-by: Geert Uytterhoeven Thanks Geert, you helped a lot! I now submitted a patch to netdev: https://patchwork.kernel.org/project/netdevbpf/patch/20211008143932.23884-1-kvalo@codeaurora.org/ Dave & Jakub, if you can please take the patch directly to net-next. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches