[PATCH] staging: rtl8723au: remove unnecessary le32_to_cpu

2015-09-01 Thread Michał Bartoszkiewicz
The values passed to le32_to_cpu are already in the correct byte order.
This fixes four "cast to restricted __le32" sparse warnings.

Signed-off-by: Michał Bartoszkiewicz 
---
 drivers/staging/rtl8723au/core/rtw_security.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_security.c 
b/drivers/staging/rtl8723au/core/rtw_security.c
index 3d40bab..9d1cce1 100644
--- a/drivers/staging/rtl8723au/core/rtw_security.c
+++ b/drivers/staging/rtl8723au/core/rtw_security.c
@@ -245,8 +245,8 @@ void rtw_wep_decrypt23a(struct rtw_adapter *padapter,
arcfour_encrypt(&mycontext, payload, payload, length);
 
/* calculate icv and compare the icv */
-   actual_crc = le32_to_cpu(getcrc32(payload, length - 4));
-   expected_crc = le32_to_cpu(get_unaligned_le32(&payload[length - 4]));
+   actual_crc = getcrc32(payload, length - 4);
+   expected_crc = get_unaligned_le32(&payload[length - 4]);
 
if (actual_crc != expected_crc) {
RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
@@ -773,8 +773,8 @@ int rtw_tkip_decrypt23a(struct rtw_adapter *padapter,
arcfour_init(&mycontext, rc4key, 16);
arcfour_encrypt(&mycontext, payload, payload, length);
 
-   actual_crc = le32_to_cpu(getcrc32(payload, length - 4));
-   expected_crc = le32_to_cpu(get_unaligned_le32(&payload[length - 4]));
+   actual_crc = getcrc32(payload, length - 4);
+   expected_crc = get_unaligned_le32(&payload[length - 4]);
 
if (actual_crc != expected_crc) {
RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: most: make helper functions static

2015-08-24 Thread Michał Bartoszkiewicz
This fixes two "symbol was not declared. Should it be static?" sparse
warnings.

Signed-off-by: Michał Bartoszkiewicz 
---
 drivers/staging/most/aim-sound/sound.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/aim-sound/sound.c 
b/drivers/staging/most/aim-sound/sound.c
index 860302e..27449d2 100644
--- a/drivers/staging/most/aim-sound/sound.c
+++ b/drivers/staging/most/aim-sound/sound.c
@@ -486,7 +486,7 @@ static struct snd_pcm_ops pcm_ops = {
 };
 
 
-int split_arg_list(char *buf, char **card_name, char **pcm_format)
+static int split_arg_list(char *buf, char **card_name, char **pcm_format)
 {
*card_name = strsep(&buf, ".");
if (!*card_name)
@@ -497,7 +497,8 @@ int split_arg_list(char *buf, char **card_name, char 
**pcm_format)
return 0;
 }
 
-int audio_set_pcm_format(char *pcm_format, struct most_channel_config *cfg)
+static int audio_set_pcm_format(char *pcm_format,
+   struct most_channel_config *cfg)
 {
if (!strcmp(pcm_format, "1x8")) {
if (cfg->subbuffer_size != 1)
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: gs_fpgaboot: remove unnecessary return statements

2014-09-04 Thread Michał Bartoszkiewicz
This fixes "void function return statements are not generally useful"
warnings from checkpatch.pl.

Signed-off-by: Michał Bartoszkiewicz 
---
 drivers/staging/gs_fpgaboot/io.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/gs_fpgaboot/io.c b/drivers/staging/gs_fpgaboot/io.c
index 23c12f4..f5cd33b 100644
--- a/drivers/staging/gs_fpgaboot/io.c
+++ b/drivers/staging/gs_fpgaboot/io.c
@@ -251,17 +251,14 @@ int xl_init_io(void)
 
 void xl_program_b(int32_t i)
 {
-   return;
 }
 
 void xl_rdwr_b(int32_t i)
 {
-   return;
 }
 
 void xl_csi_b(int32_t i)
 {
-   return;
 }
 
 int xl_get_init_b(void)
@@ -276,17 +273,14 @@ int xl_get_done_b(void)
 
 static inline void byte0_out(unsigned char data)
 {
-   return;
 }
 
 static inline void byte1_out(unsigned char data)
 {
-   return;
 }
 
 static inline void xl_cclk_b(int32_t i)
 {
-   return;
 }
 
 /*
-- 
2.1.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel