All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] wiphy: fix runtime error from bit shift
@ 2022-07-22 16:34 James Prestwood
  2022-07-22 16:34 ` [PATCH 2/7] scan: make scan_freq_set const in scan_passive James Prestwood
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: James Prestwood @ 2022-07-22 16:34 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

The compiler treated the '1' as an int type which was not big enough
to hold a bit shift of 31. Change this to 1ULL to fix the error:

runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
---
 src/wiphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wiphy.c b/src/wiphy.c
index 09b99fb2..4b9e130a 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -957,7 +957,7 @@ static void wiphy_print_he_capabilities(struct band *band,
 	uint8_t width_set = bit_field(he_cap->he_phy_capa[0], 1, 7);
 
 	for (i = 0; i < 32; i++) {
-		if (!(he_cap->iftypes & (1 << i)))
+		if (!(he_cap->iftypes & (1ULL << i)))
 			continue;
 
 		if (L_WARN_ON(s >= type_buf + sizeof(type_buf)))
-- 
2.34.1


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

end of thread, other threads:[~2022-07-22 18:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 16:34 [PATCH 1/7] wiphy: fix runtime error from bit shift James Prestwood
2022-07-22 16:34 ` [PATCH 2/7] scan: make scan_freq_set const in scan_passive James Prestwood
2022-07-22 16:34 ` [PATCH 3/7] util: add scan_freq_set_remove James Prestwood
2022-07-22 16:34 ` [PATCH 4/7] util: add scan_freq_set_max James Prestwood
2022-07-22 17:41   ` Denis Kenzior
2022-07-22 18:19     ` James Prestwood
2022-07-22 16:34 ` [PATCH 5/7] manager: re-dump wiphy on regulatory change James Prestwood
2022-07-22 17:38   ` Denis Kenzior
2022-07-22 18:18     ` James Prestwood
2022-07-22 16:34 ` [PATCH 6/7] wiphy: track disabled frequencies on multiple dumps James Prestwood
2022-07-22 18:08   ` Denis Kenzior
2022-07-22 16:34 ` [PATCH 7/7] station: do full passive scan if 6GHz is supported but disabled James Prestwood
2022-07-22 17:04 ` [PATCH 1/7] wiphy: fix runtime error from bit shift Denis Kenzior
2022-07-22 18:21   ` James Prestwood

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.