All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8188eu: Use proper enum in rtl8188eu_config_rf_reg
@ 2018-09-27  0:32 Nathan Chancellor
  0 siblings, 0 replies; only message in thread
From: Nathan Chancellor @ 2018-09-27  0:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Nathan Chancellor

Clang warns when an enumerated type is implicitly converted to another.

drivers/staging/rtl8188eu/hal/rf_cfg.c:180:25: warning: implicit
conversion from enumeration type 'enum rf90_radio_path' to different
enumeration type 'enum rf_radio_path' [-Wenum-conversion]
        rtl_rfreg_delay(adapt, RF90_PATH_A, addr | maskforphyset,
        ~~~~~~~~~~~~~~~        ^~~~~~~~~~~
1 warning generated.

Avoid this by using the equivalent value from the expected type,
rf_radio_path:

RF90_PATH_A = RF_PATH_A = 0

Link: https://github.com/ClangBuiltLinux/linux/issues/164
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/staging/rtl8188eu/hal/rf_cfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/rf_cfg.c b/drivers/staging/rtl8188eu/hal/rf_cfg.c
index 0700d8bd448d..02aeb12c9870 100644
--- a/drivers/staging/rtl8188eu/hal/rf_cfg.c
+++ b/drivers/staging/rtl8188eu/hal/rf_cfg.c
@@ -177,7 +177,7 @@ static void rtl8188e_config_rf_reg(struct adapter *adapt,
 	u32 content = 0x1000; /*RF Content: radio_a_txt*/
 	u32 maskforphyset = content & 0xE000;
 
-	rtl_rfreg_delay(adapt, RF90_PATH_A, addr | maskforphyset,
+	rtl_rfreg_delay(adapt, RF_PATH_A, addr | maskforphyset,
 			RFREG_OFFSET_MASK,
 			data);
 }
-- 
2.19.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-27  0:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-27  0:32 [PATCH] staging: rtl8188eu: Use proper enum in rtl8188eu_config_rf_reg Nathan Chancellor

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.