[PATCH] staging: rtl8192u: fix sparse warnings for static declaration

2015-03-18 Thread vibi sreenivasan
This patch fixes following sparse warning
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1924:6: warning: symbol 
'ieee80211_check_auth_response' was not declared. Should it be static?

Signed-off-by: Vibi Sreenivasan vibisreeniva...@linuxmail.org
---
 .../staging/rtl8192u/ieee80211/ieee80211_softmac.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 9d57c65..9342765 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1921,7 +1921,7 @@ static void ieee80211_process_action(struct 
ieee80211_device *ieee,

 }

-void ieee80211_check_auth_response(struct ieee80211_device *ieee,
+static void ieee80211_check_auth_response(struct ieee80211_device *ieee,
   struct sk_buff *skb)
 {
/* default support N mode, disable halfNmode */
--
1.7.9.5
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging/mt29f_spinand: coding style fixes

2014-08-12 Thread vibi sreenivasan

This patch fixes the coding style error :
WARNING: else is not generally useful after a break or return
reported by checkpatch.pl

Signed-off-by: Vibi Sreenivasan vibisreeniva...@linuxmail.org
---
 drivers/staging/mt29f_spinand/mt29f_spinand.c | 26 --
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c 
b/drivers/staging/mt29f_spinand/mt29f_spinand.c
index 3464e0c..3628bcb 100644
--- a/drivers/staging/mt29f_spinand/mt29f_spinand.c
+++ b/drivers/staging/mt29f_spinand/mt29f_spinand.c
@@ -252,15 +252,13 @@ static int spinand_enable_ecc(struct spi_device *spi_nand)
if (retval  0)
return retval;
 
-   if ((otp  OTP_ECC_MASK) == OTP_ECC_MASK) {
+   if ((otp  OTP_ECC_MASK) == OTP_ECC_MASK)
return 0;
-   } else {
-   otp |= OTP_ECC_MASK;
-   retval = spinand_set_otp(spi_nand, otp);
-   if (retval  0)
-   return retval;
-   return spinand_get_otp(spi_nand, otp);
-   }
+   otp |= OTP_ECC_MASK;
+   retval = spinand_set_otp(spi_nand, otp);
+   if (retval  0)
+   return retval;
+   return spinand_get_otp(spi_nand, otp);
 }
 #endif
 
@@ -279,8 +277,8 @@ static int spinand_disable_ecc(struct spi_device *spi_nand)
if (retval  0)
return retval;
return spinand_get_otp(spi_nand, otp);
-   } else
-   return 0;
+   }
+   return 0;
 }
 
 /**
@@ -529,8 +527,8 @@ static int spinand_program_page(struct spi_device *spi_nand,
dev_err(spi_nand-dev,
program error, page %d\n, page_id);
return -1;
-   } else
-   break;
+   }
+   break;
}
}
 #ifdef CONFIG_MTD_SPINAND_ONDIEECC
@@ -605,8 +603,8 @@ static int spinand_erase_block(struct spi_device *spi_nand, 
u16 block_id)
dev_err(spi_nand-dev,
erase error, block %d\n, block_id);
return -1;
-   } else
-   break;
+   }
+   break;
}
}
return 0;
-- 
1.9.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel