linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mt76: mt7915: Fix build error
@ 2020-05-22  3:45 YueHaibing
  2020-05-22 10:11 ` Kalle Valo
  2020-05-22 12:40 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2020-05-22  3:45 UTC (permalink / raw)
  To: nbd, lorenzo.bianconi83, ryder.lee, kvalo, davem, kuba,
	matthias.bgg, shayne.chen, chih-min.chen, yf.luo, yiwei.chung
  Cc: linux-wireless, netdev, YueHaibing, linux-kernel, linux-mediatek,
	linux-arm-kernel

In file included from ./include/linux/firmware.h:6:0,
                 from drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:4:
In function ‘__mt7915_mcu_msg_send’,
    inlined from ‘mt7915_mcu_send_message’ at drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:370:6:
./include/linux/compiler.h:396:38: error: call to ‘__compiletime_assert_545’ declared with attribute error: BUILD_BUG_ON failed: cmd == MCU_EXT_CMD_EFUSE_ACCESS && mcu_txd->set_query != MCU_Q_QUERY
  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
                                      ^
./include/linux/compiler.h:377:4: note: in definition of macro ‘__compiletime_assert’
    prefix ## suffix();    \
    ^~~~~~
./include/linux/compiler.h:396: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/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:280:2: note: in expansion of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(cmd == MCU_EXT_CMD_EFUSE_ACCESS &&
  ^~~~~~~~~~~~

BUILD_BUG_ON is meaningless here, chang it to WARN_ON.

Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index f00ad2b66761..99eeea42478f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -277,8 +277,8 @@ static int __mt7915_mcu_msg_send(struct mt7915_dev *dev, struct sk_buff *skb,
 	}
 
 	mcu_txd->s2d_index = MCU_S2D_H2N;
-	BUILD_BUG_ON(cmd == MCU_EXT_CMD_EFUSE_ACCESS &&
-		     mcu_txd->set_query != MCU_Q_QUERY);
+	WARN_ON(cmd == MCU_EXT_CMD_EFUSE_ACCESS &&
+		mcu_txd->set_query != MCU_Q_QUERY);
 
 exit:
 	if (wait_seq)
-- 
2.17.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] mt76: mt7915: Fix build error
  2020-05-22  3:45 [PATCH -next] mt76: mt7915: Fix build error YueHaibing
@ 2020-05-22 10:11 ` Kalle Valo
       [not found]   ` <cf5a8e36-2fc6-3f3a-823f-a2fac6c11d30@huawei.com>
  2020-05-22 12:40 ` Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2020-05-22 10:11 UTC (permalink / raw)
  To: YueHaibing
  Cc: ryder.lee, linux-wireless, yf.luo, chih-min.chen, linux-kernel,
	matthias.bgg, yiwei.chung, linux-mediatek, netdev,
	lorenzo.bianconi83, kuba, shayne.chen, davem, linux-arm-kernel,
	nbd

YueHaibing <yuehaibing@huawei.com> writes:

> In file included from ./include/linux/firmware.h:6:0,
>                  from drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:4:
> In function ‘__mt7915_mcu_msg_send’,
>     inlined from ‘mt7915_mcu_send_message’ at drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:370:6:
> ./include/linux/compiler.h:396:38: error: call to ‘__compiletime_assert_545’ declared with attribute error: BUILD_BUG_ON failed: cmd == MCU_EXT_CMD_EFUSE_ACCESS && mcu_txd->set_query != MCU_Q_QUERY
>   _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>                                       ^
> ./include/linux/compiler.h:377:4: note: in definition of macro ‘__compiletime_assert’
>     prefix ## suffix();    \
>     ^~~~~~
> ./include/linux/compiler.h:396: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/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
>   BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>   ^~~~~~~~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:280:2: note: in expansion of macro ‘BUILD_BUG_ON’
>   BUILD_BUG_ON(cmd == MCU_EXT_CMD_EFUSE_ACCESS &&
>   ^~~~~~~~~~~~
>
> BUILD_BUG_ON is meaningless here, chang it to WARN_ON.
>
> Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

I'm curious why I don't see this build error? I was about to send a pull
request to Dave, should I hold off the pull request due to this problem?

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] mt76: mt7915: Fix build error
  2020-05-22  3:45 [PATCH -next] mt76: mt7915: Fix build error YueHaibing
  2020-05-22 10:11 ` Kalle Valo
@ 2020-05-22 12:40 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-05-22 12:40 UTC (permalink / raw)
  To: YueHaibing
  Cc: ryder.lee, YueHaibing, linux-wireless, yf.luo, chih-min.chen,
	linux-kernel, matthias.bgg, yiwei.chung, linux-mediatek, netdev,
	lorenzo.bianconi83, kuba, shayne.chen, davem, linux-arm-kernel,
	nbd

YueHaibing <yuehaibing@huawei.com> wrote:

> In file included from ./include/linux/firmware.h:6:0,
>                  from drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:4:
> In function ‘__mt7915_mcu_msg_send’,
>     inlined from ‘mt7915_mcu_send_message’ at drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:370:6:
> ./include/linux/compiler.h:396:38: error: call to ‘__compiletime_assert_545’ declared with attribute error: BUILD_BUG_ON failed: cmd == MCU_EXT_CMD_EFUSE_ACCESS && mcu_txd->set_query != MCU_Q_QUERY
>   _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>                                       ^
> ./include/linux/compiler.h:377:4: note: in definition of macro ‘__compiletime_assert’
>     prefix ## suffix();    \
>     ^~~~~~
> ./include/linux/compiler.h:396: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/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
>   BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>   ^~~~~~~~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:280:2: note: in expansion of macro ‘BUILD_BUG_ON’
>   BUILD_BUG_ON(cmd == MCU_EXT_CMD_EFUSE_ACCESS &&
>   ^~~~~~~~~~~~
> 
> BUILD_BUG_ON is meaningless here, chang it to WARN_ON.
> 
> Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Patch applied to wireless-drivers-next.git, thanks.

472f0a240250 mt76: mt7915: Fix build error

-- 
https://patchwork.kernel.org/patch/11564595/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] mt76: mt7915: Fix build error
       [not found]   ` <cf5a8e36-2fc6-3f3a-823f-a2fac6c11d30@huawei.com>
@ 2020-05-25 10:37     ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-05-25 10:37 UTC (permalink / raw)
  To: Yuehaibing
  Cc: ryder.lee, linux-wireless, yf.luo, chih-min.chen, linux-kernel,
	matthias.bgg, yiwei.chung, linux-mediatek, netdev,
	lorenzo.bianconi83, kuba, shayne.chen, davem, linux-arm-kernel,
	nbd

Yuehaibing <yuehaibing@huawei.com> writes:

> On 2020/5/22 18:11, Kalle Valo wrote:
>> YueHaibing <yuehaibing@huawei.com> writes:
>> 
>>> In file included from ./include/linux/firmware.h:6:0,
>>>                  from drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:4:
>>> In function ‘__mt7915_mcu_msg_send’,
>>>     inlined from ‘mt7915_mcu_send_message’ at drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:370:6:
>>> ./include/linux/compiler.h:396:38: error: call to ‘__compiletime_assert_545’ declared with attribute error: BUILD_BUG_ON failed: cmd == MCU_EXT_CMD_EFUSE_ACCESS && mcu_txd->set_query != MCU_Q_QUERY
>>>   _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>>>                                       ^
>>> ./include/linux/compiler.h:377:4: note: in definition of macro ‘__compiletime_assert’
>>>     prefix ## suffix();    \
>>>     ^~~~~~
>>> ./include/linux/compiler.h:396: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/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
>>>   BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>>>   ^~~~~~~~~~~~~~~~
>>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:280:2: note: in expansion of macro ‘BUILD_BUG_ON’
>>>   BUILD_BUG_ON(cmd == MCU_EXT_CMD_EFUSE_ACCESS &&
>>>   ^~~~~~~~~~~~
>>>
>>> BUILD_BUG_ON is meaningless here, chang it to WARN_ON.
>>>
>>> Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
>>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> 
>> I'm curious why I don't see this build error? I was about to send a pull
>> request to Dave, should I hold off the pull request due to this problem?
>
> The config is attached
>
> gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

Thanks, I was able to reproduce the error with gcc-10 using your config
but didn't have time to investigate what was different in my config and
why I didn't see it.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-25 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-22  3:45 [PATCH -next] mt76: mt7915: Fix build error YueHaibing
2020-05-22 10:11 ` Kalle Valo
     [not found]   ` <cf5a8e36-2fc6-3f3a-823f-a2fac6c11d30@huawei.com>
2020-05-25 10:37     ` Kalle Valo
2020-05-22 12:40 ` Kalle Valo

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).