Re: [PATCH v2 1/6] rtl8723au: remove declaration of unimplemented functions

2016-09-04 Thread Luca Ceresoli
Dear Kalle,

thanks for your feedback.

On 02/09/2016 18:18, Kalle Valo wrote:
> Luca Ceresoli  writes:
> 
>> These functions have been declared without any implementation since
>> the first commit (364e30ebd2dbaccba430c603da03e68746eb932a) and there
>> has been no mention of them in following commits.
>>
>> Signed-off-by: Luca Ceresoli 
>> Cc: Larry Finger 
>> Cc: Jes Sorensen 
>> Cc: Greg Kroah-Hartman 
>> Cc: linux-wirel...@vger.kernel.org
>> Cc: de...@driverdev.osuosl.org
>> Cc: linux-ker...@vger.kernel.org
>>
>> ---
>>
>> Changes v1 -> v2:
>> - improve the commit message.
>> ---
>>  drivers/staging/rtl8723au/include/recv_osdep.h | 3 ---
>>  1 file changed, 3 deletions(-)
> 
> Please prefix staging drivers with "staging:".

Ok, will fix and resubmit.

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


[PATCH 5/5] drivers: staging: rtl8723au: core: Fix indentation

2016-09-04 Thread Matthias Beyer
Signed-off-by: Matthias Beyer 
Signed-off-by: Manuel Messner 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 1e01d62..1c31774 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1921,17 +1921,17 @@ static int rtw_append_pmkid(struct rtw_adapter 
*Adapter, int iEntry,
struct security_priv *psecuritypriv = &Adapter->securitypriv;
 
if (ie[1] <= 20) {
-   /*  The RSN IE didn't include the PMK ID,
-   append the PMK information */
-   ie[ie_len] = 1;
-   ie_len++;
-   ie[ie_len] = 0; /* PMKID count = 0x0100 */
-   ie_len++;
-   memcpy(&ie[ie_len],
-  &psecuritypriv->PMKIDList[iEntry].PMKID, 16);
-
-   ie_len += 16;
-   ie[1] += 18;/* PMKID length = 2+16 */
+   /* The RSN IE didn't include the PMK ID,
+  append the PMK information */
+   ie[ie_len] = 1;
+   ie_len++;
+   ie[ie_len] = 0; /* PMKID count = 0x0100 */
+   ie_len++;
+   memcpy(&ie[ie_len],
+  &psecuritypriv->PMKIDList[iEntry].PMKID, 16);
+
+   ie_len += 16;
+   ie[1] += 18;/* PMKID length = 2+16 */
}
return ie_len;
 }
-- 
2.9.3

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


[PATCH 4/5] drivers: staging: rtl8723au: core: Fix "space prohibited" warning

2016-09-04 Thread Matthias Beyer
This patch fixes the "space prohibited between function name and open
parenthesis '('" warning from checkpatch.pl

Signed-off-by: Matthias Beyer 
Signed-off-by: Manuel Messner 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 196447b..1e01d62 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -900,15 +900,15 @@ rtw_joinbss_update_stainfo(struct rtw_adapter *padapter,
padapter->securitypriv.dot11PrivacyAlgrthm;
 
memset(&psta->dot118021x_UncstKey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
 
memset(&psta->dot11tkiprxmickey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
memset(&psta->dot11tkiptxmickey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
 
-   memset(&psta->dot11txpn, 0, sizeof (union pn48));
-   memset(&psta->dot11rxpn, 0, sizeof (union pn48));
+   memset(&psta->dot11txpn, 0, sizeof(union pn48));
+   memset(&psta->dot11rxpn, 0, sizeof(union pn48));
}
 
/*  Commented by Albert 2012/07/21 */
-- 
2.9.3

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


[PATCH 3/5] drivers: staging: rtl8723au: core: Refactor pointless branching

2016-09-04 Thread Matthias Beyer
As ether_addr_equal returns a bool, we can simply use the return value
to set the variable.

Signed-off-by: Matthias Beyer 
Signed-off-by: Manuel Messner 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index da9f298..196447b 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1062,11 +1062,8 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter 
*adapter, u8 *pbuf)
 pmlmepriv->assoc_ssid.ssid);
}
 
-   if (ether_addr_equal(pnetwork->network.MacAddress,
-cur_network->network.MacAddress))
-   the_same_macaddr = true;
-   else
-   the_same_macaddr = false;
+   the_same_macaddr = ether_addr_equal(pnetwork->network.MacAddress,
+   cur_network->network.MacAddress);
 
pnetwork->network.Length = get_wlan_bssid_ex_sz(&pnetwork->network);
if (pnetwork->network.Length > sizeof(struct wlan_bssid_ex)) {
-- 
2.9.3

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


[PATCH 2/5] drivers: staging: rtl8723au: core: simplify if-break-else

2016-09-04 Thread Matthias Beyer
As the if statement breaks/continues the loop, the else block is not
useful and can be omitted.

Signed-off-by: Matthias Beyer 
Signed-off-by: Manuel Messner 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 25 +++--
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 8b8b6a9..da9f298 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -244,21 +244,18 @@ static void _rtw_roaming(struct rtw_adapter *padapter,
do_join_r = rtw_do_join(padapter);
if (do_join_r == _SUCCESS)
break;
-   else {
-   DBG_8723A("roaming do_join return %d\n",
- do_join_r);
-   pmlmepriv->to_roaming--;
 
-   if (padapter->mlmepriv.to_roaming > 0)
-   continue;
-   else {
-   DBG_8723A("%s(%d) -to roaming fail, "
- "indicate_disconnect\n",
- __func__, __LINE__);
-   rtw_indicate_disconnect23a(padapter);
-   break;
-   }
-   }
+   DBG_8723A("roaming do_join return %d\n", do_join_r);
+   pmlmepriv->to_roaming--;
+
+   if (padapter->mlmepriv.to_roaming > 0)
+   continue;
+
+   DBG_8723A("%s(%d) -to roaming fail, "
+ "indicate_disconnect\n",
+ __func__, __LINE__);
+   rtw_indicate_disconnect23a(padapter);
+   break;
}
}
 }
-- 
2.9.3

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


[PATCH 1/5] drivers: staging: rtl8723au: core: Fix checkpatch.pl errors

2016-09-04 Thread Matthias Beyer
This patch fixes the ERRORs which are reported from the checkpatch.pl
script for this file.

Signed-off-by: Matthias Beyer 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index a786fc4..8b8b6a9 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1397,7 +1397,7 @@ void rtw23a_join_to_handler (unsigned long data)
do_join_r = rtw_do_join(adapter);
if (do_join_r != _SUCCESS) {
DBG_8723A("%s roaming do_join return "
- "%d\n", __func__ , do_join_r);
+ "%d\n", __func__, do_join_r);
continue;
}
break;
@@ -1546,7 +1546,7 @@ static int rtw_check_join_candidate(struct mlme_priv 
*pmlmepriv,
}
 
if (!*candidate ||
-   (*candidate)->network.Rssinetwork.Rssi) {
+   (*candidate)->network.Rssi < competitor->network.Rssi) {
*candidate = competitor;
updated = true;
}
@@ -1894,7 +1894,7 @@ static int SecIsInPMKIDList(struct rtw_adapter *Adapter, 
u8 *bssid)
 
do {
if (psecuritypriv->PMKIDList[i].bUsed &&
-ether_addr_equal(psecuritypriv->PMKIDList[i].Bssid, 
bssid)) {
+   ether_addr_equal(psecuritypriv->PMKIDList[i].Bssid, bssid)) 
{
break;
} else {
i++;
@@ -2139,7 +2139,7 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter 
*padapter, u8 *in_ie,
out_len = *pout_len;
pframe = rtw_set_ie23a(out_ie + out_len,
   WLAN_EID_HT_OPERATION,
-  p[1], p + 2 , pout_len);
+  p[1], p + 2, pout_len);
}
}
 
-- 
2.9.3

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


[PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c

2016-09-04 Thread Matthias Beyer
This patchset fixes some errors and warnings reported by checkpatch.pl.

Matthias Beyer (5):
  drivers: staging: rtl8723au: core: Fix checkpatch.pl errors
  drivers: staging: rtl8723au: core: simplify if-break-else
  drivers: staging: rtl8723au: core: Refactor pointless branching
  drivers: staging: rtl8723au: core: Fix "space prohibited" warning
  drivers: staging: rtl8723au: core: Fix indentation

 drivers/staging/rtl8723au/core/rtw_mlme.c | 72 ++-
 1 file changed, 33 insertions(+), 39 deletions(-)

-- 
2.9.3

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


[PATCH 2/2] staging: sm750fb: fix block comment style and spelling issues in ddk750_chip.c

2016-09-04 Thread Moshe Green
Fix the following warning types:
 - line length
 - block comment line * prefix
 - trailing */ on a separate line
found by the checkpatch.pl tool in multiple block comments.

Fix a single spelling error in a comment.

Signed-off-by: Moshe Green 
---
 drivers/staging/sm750fb/ddk750_chip.c | 49 +++
 1 file changed, 27 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index 76aaeaa..09fda26 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -144,8 +144,9 @@ static void setMasterClock(unsigned int frequency)
return;
 
if (frequency) {
-   /* Set the frequency to the maximum frequency that the SM750 
engine can
-   run, which is about 190 MHz. */
+   /* Set the frequency to the maximum frequency
+* that the SM750 engine can run, which is about 190 MHz.
+*/
if (frequency > MHz(190))
frequency = MHz(190);
 
@@ -242,9 +243,10 @@ int ddk750_initHw(initchip_param_t *pInitParam)
setMasterClock(MHz(pInitParam->masterClock));
 
 
-   /* Reset the memory controller. If the memory controller is not reset 
in SM750,
-  the system might hang when sw accesses the memory.
-  The memory should be resetted after changing the MXCLK.
+   /* Reset the memory controller.
+* If the memory controller is not reset in SM750,
+* the system might hang when sw accesses the memory.
+* The memory should be resetted after changing the MXCLK.
 */
if (pInitParam->resetMemory == 1) {
reg = PEEK32(MISC_CTRL);
@@ -288,21 +290,22 @@ int ddk750_initHw(initchip_param_t *pInitParam)
 }
 
 /*
-   monk liu @ 4/6/2011:
-  re-write the calculatePLL function of ddk750.
-  the original version function does not use some mathematics 
tricks and shortcut
-  when it doing the calculation of the best N,M,D combination
-  I think this version gives a little upgrade in speed
-
-   750 pll clock formular:
-   Request Clock = (Input Clock * M )/(N * X)
-
-   Input Clock = 14318181 hz
-   X = 2 power D
-   D ={0,1,2,3,4,5,6}
-   M = {1,...,255}
-   N = {2,...,15}
-*/
+ * monk liu @ 4/6/2011:
+ * re-write the calculatePLL function of ddk750.
+ * the original version function does not use
+ * some mathematics tricks and shortcut
+ * when it doing the calculation of the best N,M,D combination
+ * I think this version gives a little upgrade in speed
+ *
+ * 750 pll clock formular:
+ * Request Clock = (Input Clock * M )/(N * X)
+ *
+ * Input Clock = 14318181 hz
+ * X = 2 power D
+ * D ={0,1,2,3,4,5,6}
+ * M = {1,...,255}
+ * N = {2,...,15}
+ */
 unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
 {
/* as sm750 register definition,
@@ -317,8 +320,10 @@ unsigned int calcPllValue(unsigned int request_orig, 
pll_value_t *pll)
int max_d = 6;
 
if (getChipType() == SM750LE) {
-   /* SM750LE don't have prgrammable PLL and M/N values to work on.
-   Just return the requested clock. */
+   /* SM750LE don't have
+* programmable PLL and M/N values to work on.
+* Just return the requested clock.
+*/
return request_orig;
}
 
-- 
2.7.4

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


[PATCH 1/2] staging: sm750fb: fix line length coding style issues in ddk750_chip.c

2016-09-04 Thread Moshe Green
Fix multiple line length warnings found by the checkpatch.pl tool
in ddk750_chip.c.

Signed-off-by: Moshe Green 
---
 drivers/staging/sm750fb/ddk750_chip.c | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index c1356bb..76aaeaa 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -71,7 +71,7 @@ static void setChipClock(unsigned int frequency)
pll.clockType = MXCLK_PLL;
 
/*
-   * Call calcPllValue() to fill up the other fields for PLL 
structure.
+   * Call calcPllValue() to fill the other fields of PLL structure.
* Sometime, the chip cannot set up the exact clock required by 
User.
* Return value from calcPllValue() gives the actual possible 
clock.
*/
@@ -94,8 +94,8 @@ static void setMemoryClock(unsigned int frequency)
 
if (frequency) {
/*
-* Set the frequency to the maximum frequency that the DDR 
Memory can take
-* which is 336MHz.
+* Set the frequency to the maximum frequency
+* that the DDR Memory can take which is 336MHz.
 */
if (frequency > MHz(336))
frequency = MHz(336);
@@ -305,7 +305,9 @@ int ddk750_initHw(initchip_param_t *pInitParam)
 */
 unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
 {
-   /* as sm750 register definition, N located in 2,15 and M located in 
1,255   */
+   /* as sm750 register definition,
+* N located in 2,15 and M located in 1,255
+*/
int N, M, X, d;
int mini_diff;
unsigned int RN, quo, rem, fl_quo;
@@ -325,12 +327,16 @@ unsigned int calcPllValue(unsigned int request_orig, 
pll_value_t *pll)
request = request_orig / 1000;
input = pll->inputFreq / 1000;
 
-   /* for MXCLK register , no POD provided, so need be treated differently 
*/
+   /* for MXCLK register,
+* no POD provided, so need be treated differently
+*/
if (pll->clockType == MXCLK_PLL)
max_d = 3;
 
for (N = 15; N > 1; N--) {
-   /* RN will not exceed maximum long if @request <= 285 MHZ (for 
32bit cpu) */
+   /* RN will not exceed maximum long
+* if @request <= 285 MHZ (for 32bit cpu)
+*/
RN = N * request;
quo = RN / input;
rem = RN % input;/* rem always small than 14318181 */
-- 
2.7.4

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


[PATCH 4/5] Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3

2016-09-04 Thread Claudiu Beznea
This patch removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Signed-off-by: Claudiu Beznea 
---
 drivers/staging/wlan-ng/p80211metadef.h | 4 
 drivers/staging/wlan-ng/p80211req.c | 2 +-
 drivers/staging/wlan-ng/prism2mib.c | 2 +-
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211metadef.h 
b/drivers/staging/wlan-ng/p80211metadef.h
index 33b743c..33de041 100644
--- a/drivers/staging/wlan-ng/p80211metadef.h
+++ b/drivers/staging/wlan-ng/p80211metadef.h
@@ -155,10 +155,6 @@
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4))
-#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3 \
-   (P80211DID_MKSECTION(1) | \
-   P80211DID_MKGROUP(4) | \
-   P80211DID_MKITEM(4) | 0x0c00)
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(_i) \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4) | \
diff --git a/drivers/staging/wlan-ng/p80211req.c 
b/drivers/staging/wlan-ng/p80211req.c
index 27292ea..f755318 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -203,7 +203,7 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev,
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1):
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2):
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3):
-   case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3:
+   case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(4):
if (!isget)
wep_change_key(wlandev,
   P80211DID_ITEM(mibitem->did) - 1,
diff --git a/drivers/staging/wlan-ng/prism2mib.c 
b/drivers/staging/wlan-ng/prism2mib.c
index 56307cc..0c51b7d 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -160,7 +160,7 @@ static struct mibrec mibtab[] = {
 F_STA | F_WRITE,
 HFA384x_RID_CNFWEPDEFAULTKEY2, 0, 0,
 prism2mib_wepdefaultkey},
-   {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3,
+   {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(4),
 F_STA | F_WRITE,
 HFA384x_RID_CNFWEPDEFAULTKEY3, 0, 0,
 prism2mib_wepdefaultkey},
-- 
1.9.1

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


[PATCH 5/5] Staging: wlan-ng: changed definition of DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro

2016-09-04 Thread Claudiu Beznea
This patch changes definition of
DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable instead of
using directly (P80211DID_MKSECTION(1) | P80211DID_MKGROUP(4)).

Signed-off-by: Claudiu Beznea 
---
 drivers/staging/wlan-ng/p80211metadef.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211metadef.h 
b/drivers/staging/wlan-ng/p80211metadef.h
index 33de041..b0d3567 100644
--- a/drivers/staging/wlan-ng/p80211metadef.h
+++ b/drivers/staging/wlan-ng/p80211metadef.h
@@ -156,8 +156,7 @@
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4))
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(_i) \
-   (P80211DID_MKSECTION(1) | \
-   P80211DID_MKGROUP(4) | \
+   (DIDmib_dot11smt_dot11WEPDefaultKeysTable | \
P80211DID_MKITEM(_i) | 0x0c00)
 #define DIDmib_dot11smt_dot11PrivacyTable \
(P80211DID_MKSECTION(1) | \
-- 
1.9.1

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


[PATCH 2/5] Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1

2016-09-04 Thread Claudiu Beznea
This patch removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Signed-off-by: Claudiu Beznea 
---
 drivers/staging/wlan-ng/p80211metadef.h | 4 
 drivers/staging/wlan-ng/p80211req.c | 2 +-
 drivers/staging/wlan-ng/prism2mib.c | 2 +-
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211metadef.h 
b/drivers/staging/wlan-ng/p80211metadef.h
index 9a7fa8e..c15ed08 100644
--- a/drivers/staging/wlan-ng/p80211metadef.h
+++ b/drivers/staging/wlan-ng/p80211metadef.h
@@ -155,10 +155,6 @@
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4))
-#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1 \
-   (P80211DID_MKSECTION(1) | \
-   P80211DID_MKGROUP(4) | \
-   P80211DID_MKITEM(2) | 0x0c00)
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2 \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4) | \
diff --git a/drivers/staging/wlan-ng/p80211req.c 
b/drivers/staging/wlan-ng/p80211req.c
index c7325fa..c1ad57f 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -201,7 +201,7 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev,
 
switch (mibitem->did) {
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1):
-   case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1:
+   case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2):
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2:
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3:
if (!isget)
diff --git a/drivers/staging/wlan-ng/prism2mib.c 
b/drivers/staging/wlan-ng/prism2mib.c
index 55eb2bb..faa1176 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -152,7 +152,7 @@ static struct mibrec mibtab[] = {
 F_STA | F_WRITE,
 HFA384x_RID_CNFWEPDEFAULTKEY0, 0, 0,
 prism2mib_wepdefaultkey},
-   {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1,
+   {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2),
 F_STA | F_WRITE,
 HFA384x_RID_CNFWEPDEFAULTKEY1, 0, 0,
 prism2mib_wepdefaultkey},
-- 
1.9.1

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


[PATCH 3/5] Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2

2016-09-04 Thread Claudiu Beznea
This patch removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Signed-off-by: Claudiu Beznea 
---
 drivers/staging/wlan-ng/p80211metadef.h | 4 
 drivers/staging/wlan-ng/p80211req.c | 2 +-
 drivers/staging/wlan-ng/prism2mib.c | 2 +-
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211metadef.h 
b/drivers/staging/wlan-ng/p80211metadef.h
index c15ed08..33b743c 100644
--- a/drivers/staging/wlan-ng/p80211metadef.h
+++ b/drivers/staging/wlan-ng/p80211metadef.h
@@ -155,10 +155,6 @@
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4))
-#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2 \
-   (P80211DID_MKSECTION(1) | \
-   P80211DID_MKGROUP(4) | \
-   P80211DID_MKITEM(3) | 0x0c00)
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3 \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4) | \
diff --git a/drivers/staging/wlan-ng/p80211req.c 
b/drivers/staging/wlan-ng/p80211req.c
index c1ad57f..27292ea 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -202,7 +202,7 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev,
switch (mibitem->did) {
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1):
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2):
-   case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2:
+   case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3):
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3:
if (!isget)
wep_change_key(wlandev,
diff --git a/drivers/staging/wlan-ng/prism2mib.c 
b/drivers/staging/wlan-ng/prism2mib.c
index faa1176..56307cc 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -156,7 +156,7 @@ static struct mibrec mibtab[] = {
 F_STA | F_WRITE,
 HFA384x_RID_CNFWEPDEFAULTKEY1, 0, 0,
 prism2mib_wepdefaultkey},
-   {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2,
+   {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3),
 F_STA | F_WRITE,
 HFA384x_RID_CNFWEPDEFAULTKEY2, 0, 0,
 prism2mib_wepdefaultkey},
-- 
1.9.1

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


[PATCH 0/5] Keep one macro instead of 4 for wep keys

2016-09-04 Thread Claudiu Beznea
This patchset removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey<#>
and uses the new macro DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Claudiu Beznea (5):
  Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() 
   macro instead of
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0
  Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() 
   macro instead of
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1
  Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() 
   macro instead of
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2
  Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() 
   macro instead of
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3
  Staging: wlan-ng: changed definition of
DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro

 drivers/staging/wlan-ng/p80211metadef.h | 19 +--
 drivers/staging/wlan-ng/p80211req.c |  8 
 drivers/staging/wlan-ng/prism2mib.c |  8 
 3 files changed, 9 insertions(+), 26 deletions(-)

-- 
1.9.1

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


[PATCH 1/5] Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0

2016-09-04 Thread Claudiu Beznea
This patch removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Signed-off-by: Claudiu Beznea 
---
 drivers/staging/wlan-ng/p80211metadef.h | 4 
 drivers/staging/wlan-ng/p80211req.c | 2 +-
 drivers/staging/wlan-ng/prism2mib.c | 2 +-
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211metadef.h 
b/drivers/staging/wlan-ng/p80211metadef.h
index 98fda3d..9a7fa8e 100644
--- a/drivers/staging/wlan-ng/p80211metadef.h
+++ b/drivers/staging/wlan-ng/p80211metadef.h
@@ -155,10 +155,6 @@
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4))
-#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0 \
-   (P80211DID_MKSECTION(1) | \
-   P80211DID_MKGROUP(4) | \
-   P80211DID_MKITEM(1) | 0x0c00)
 #define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1 \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4) | \
diff --git a/drivers/staging/wlan-ng/p80211req.c 
b/drivers/staging/wlan-ng/p80211req.c
index 5c2b801..c7325fa 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -200,7 +200,7 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev,
u8 *key = mibitem->data + sizeof(p80211pstrd_t);
 
switch (mibitem->did) {
-   case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0:
+   case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1):
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1:
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2:
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3:
diff --git a/drivers/staging/wlan-ng/prism2mib.c 
b/drivers/staging/wlan-ng/prism2mib.c
index fe914b1..55eb2bb 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -148,7 +148,7 @@ static int prism2mib_priv(struct mibrec *mib,
 static struct mibrec mibtab[] = {
 
/* dot11smt MIB's */
-   {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0,
+   {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1),
 F_STA | F_WRITE,
 HFA384x_RID_CNFWEPDEFAULTKEY0, 0, 0,
 prism2mib_wepdefaultkey},
-- 
1.9.1

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


[PATCH] Staging: rtl8188eu: ioctl_linux: Clean up if function returned NULL on failure.

2016-09-04 Thread Amit Ghadge
Clean some all functions to return NULL on failure.
Used !x instead of x==NULL.

Signed-off-by: Amit Ghadge 
---
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 5672f01..40e7fd0 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -400,7 +400,7 @@ static int wpa_set_encryption(struct net_device *dev, 
struct ieee_param *param,
wep_key_len = wep_key_len <= 5 ? 5 : 13;
wep_total_len = wep_key_len + offsetof(struct 
ndis_802_11_wep, KeyMaterial);
pwep = (struct ndis_802_11_wep 
*)rtw_malloc(wep_total_len);
-   if (pwep == NULL) {
+   if (!pwep) {
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_, 
(" wpa_set_encryption: pwep allocate fail !!!\n"));
goto exit;
}
@@ -441,7 +441,7 @@ static int wpa_set_encryption(struct net_device *dev, 
struct ieee_param *param,
 
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | 
WIFI_MP_STATE)) { /* sta mode */
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
-   if (psta == NULL) {
+   if (!psta) {
;
} else {
if (strcmp(param->u.crypt.alg, "none") != 0)
@@ -476,7 +476,7 @@ static int wpa_set_encryption(struct net_device *dev, 
struct ieee_param *param,
}
}
pbcmc_sta = rtw_get_bcmc_stainfo(padapter);
-   if (pbcmc_sta == NULL) {
+   if (!pbcmc_sta) {
;
} else {
/* Jeff: don't disable ieee8021x_blocked while 
clearing key */
@@ -502,9 +502,9 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char 
*pie, unsigned short ie
int group_cipher = 0, pairwise_cipher = 0;
int ret = 0;
 
-   if ((ielen > MAX_WPA_IE_LEN) || (pie == NULL)) {
+   if ((ielen > MAX_WPA_IE_LEN) || (!pie)) {
_clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS);
-   if (pie == NULL)
+   if (!pie)
return ret;
else
return -EINVAL;
@@ -512,7 +512,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char 
*pie, unsigned short ie
 
if (ielen) {
buf = kmemdup(pie, ielen, GFP_KERNEL);
-   if (buf == NULL) {
+   if (!buf) {
ret =  -ENOMEM;
goto exit;
}
@@ -1049,7 +1049,7 @@ static int rtw_wx_set_mlme(struct net_device *dev,
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct iw_mlme *mlme = (struct iw_mlme *)extra;
 
-   if (mlme == NULL)
+   if (!mlme)
return -1;
 
DBG_88E("%s\n", __func__);
@@ -1896,7 +1896,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
 
param_len = sizeof(struct ieee_param) + pext->key_len;
param = (struct ieee_param *)rtw_malloc(param_len);
-   if (param == NULL)
+   if (!param)
return -1;
 
memset(param, 0, param_len);
@@ -2061,7 +2061,7 @@ static int wpa_supplicant_ioctl(struct net_device *dev, 
struct iw_point *p)
}
 
param = (struct ieee_param *)rtw_malloc(p->length);
-   if (param == NULL) {
+   if (!param) {
ret = -ENOMEM;
goto out;
}
@@ -2254,13 +2254,13 @@ static int rtw_set_encryption(struct net_device *dev, 
struct ieee_param *param,
}
}
 
-   if (strcmp(param->u.crypt.alg, "none") == 0 && (psta == NULL)) {
+   if (strcmp(param->u.crypt.alg, "none") == 0 && (!psta)) {
/* todo:clear default encryption keys */
 
DBG_88E("clear default encryption keys, keyid =%d\n", 
param->u.crypt.idx);
goto exit;
}
-   if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta == NULL)) {
+   if (strcmp(param->u.crypt.alg, "WEP") == 0 && (!psta)) {
DBG_88E("r871x_set_encryption, crypt.alg = WEP\n");
wep_key_idx = param->u.crypt.idx;
wep_key_len = param->u.crypt.key_len;
@@ -2274,7 +2274,7 @@ static int rtw_set_encryption(struct net_device *dev, 
struct ieee_param *param,
wep_key_len = wep_key_len <= 5 ? 5 : 13;
wep_total_len = wep_key_len + offsetof(struct 
ndis_802_11_wep, KeyMaterial);
pwep = (struct ndis_802_11_wep 
*)rtw_malloc(wep_total_

[PATCH] Staging: comedi: das08_cs: Fix block comments use * on subsequent lines.

2016-09-04 Thread Amit Ghadge
Fixes checkpatch warning in das08_cs.c file:

WARNING: Block comments use * on subsequent lines

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/das08_cs.c | 70 +++
 1 file changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das08_cs.c 
b/drivers/staging/comedi/drivers/das08_cs.c
index 9c02b17..1c5a0d8 100644
--- a/drivers/staging/comedi/drivers/das08_cs.c
+++ b/drivers/staging/comedi/drivers/das08_cs.c
@@ -1,43 +1,43 @@
 /*
-comedi/drivers/das08_cs.c
-DAS08 driver
-
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 2000 David A. Schleef 
-Copyright (C) 2001,2002,2003 Frank Mori Hess 
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-PCMCIA support code for this driver is adapted from the dummy_cs.c
-driver of the Linux PCMCIA Card Services package.
-
-The initial developer of the original code is David A. Hinds
-.  Portions created by David A. Hinds
-are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
-*/
+ * comedi/drivers/das08_cs.c
+ * DAS08 driver
+
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2000 David A. Schleef 
+ * Copyright (C) 2001,2002,2003 Frank Mori Hess 
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * PCMCIA support code for this driver is adapted from the dummy_cs.c
+ * driver of the Linux PCMCIA Card Services package.
+
+ * The initial developer of the original code is David A. Hinds
+ * .  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ */
 /*
-Driver: das08_cs
-Description: DAS-08 PCMCIA boards
-Author: Warren Jasper, ds, Frank Hess
-Devices: [ComputerBoards] PCM-DAS08 (pcm-das08)
-Status: works
+ * Driver: das08_cs
+ * Description: DAS-08 PCMCIA boards
+ * Author: Warren Jasper, ds, Frank Hess
+ * Devices: [ComputerBoards] PCM-DAS08 (pcm-das08)
+ * Status: works
 
-This is the PCMCIA-specific support split off from the
-das08 driver.
+ * This is the PCMCIA-specific support split off from the
+ * das08 driver.
 
-Options (for pcm-das08):
-   NONE
+ * Options (for pcm-das08):
+ * NONE
 
-Command support does not exist, but could be added for this board.
-*/
+ * Command support does not exist, but could be added for this board.
+ */
 
 #include 
 
-- 
2.5.5

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


Re: [PATCH] staging/android: mark sync_timeline_create() static

2016-09-04 Thread Sudip Mukherjee
On Sat, Sep 03, 2016 at 02:34:13PM +0800, Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/staging/android/sw_sync.c:56:23: warning: no previous prototype for 
> 'sync_timeline_create' [-Wmissing-prototypes]
> 
> In fact, this function is only used in the file in which it is
> declared and don't need a declaration, but can be made static.
> so this patch marks this function with 'static'.
> 
> Signed-off-by: Baoyou Xie 
> ---
>  drivers/staging/android/sw_sync.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

which tree are you using?

This file has been removed from staging by:
35538d7822e8 ("dma-buf/sw_sync: de-stage SW_SYNC")

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


Re: [PATCH] staging: rtl8712: fixed comment style and space indent

2016-09-04 Thread Sudip Mukherjee
On Fri, Sep 02, 2016 at 09:14:15PM +0800, Louie Lu wrote:
> fixed comment style and space indent report from checkpatch
> in rtl8712/rtl871x_ioctl_linux.c:
> 
> * WARNING: Statements should start on a tabstop
> * WARNING: Block comments use * on subsequent lines
> * WARNING: suspect code indent for conditional statements (16, 32)
> 
> Signed-off-by: Louie Lu 
> ---

That becomes 3 different changes in a single patch.
You should be doing a single type of change in a patch.
please break them into separate patches.

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


Re: [PATCH] staging:ks7010:Fix warning about coding style spacing issue around asterisk in ks_wlan_net.c

2016-09-04 Thread Sudip Mukherjee
On Wed, Aug 31, 2016 at 08:20:10PM -0400, Nicholas Krause wrote:
> This fixes warning around a asterisk used in ks_wlan_net.c
> for the define statement used for this driver's transmit
> queue timeout value as defined by the marco, TX_TIMEOUT.
> Signed-off-by: Nicholas Krause 
> ---

Please keep a blank line between your commit message and your
Signed-off-by line.

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


Re: [PATCH v2 1/1] drivers: staging: rtl8723au: hal: Remove pointless test

2016-09-04 Thread Sudip Mukherjee
On Sun, Sep 04, 2016 at 01:01:20PM +0200, Matthias Beyer wrote:
> This patch removes the pointless `else if` test.
> 
> Signed-off-by: Matthias Beyer 
> Reported-by: David Binderman 
> ---

looks like Greg has already applied your first patch.
db0c12744f8d ("drivers: staging: rtl8723au: hal: Remove pointless test")

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


[PATCH 2/2 RESEND] staging: ks7010: fix memory leak

2016-09-04 Thread Sudip Mukherjee
If the firmware request failed we were just returning but we missed
freeing the memory and releasing the MMC Host.

Signed-off-by: Sudip Mukherjee 
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 7bcf1ea..86cdebe 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -791,7 +791,7 @@ static int ks7010_upload_firmware(struct ks_wlan_private 
*priv,
 
retval = request_firmware(&fw_entry, ROM_FILE, 
&priv->ks_wlan_hw.sdio_card->func->dev);
if (retval)
-   return retval;
+   goto error_out0;
 
length = fw_entry->size;
 
-- 
1.9.1

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


[PATCH 1/2 RESEND] staging: ks7010: return on failure

2016-09-04 Thread Sudip Mukherjee
On failure we were jumping to error_out0 where we were trying
sdio_release_host() but at this point of execution we still have not
done sdio_claim_host() and as a result host->claimed can still be 0.
And if host->claimed is 0 then WARN_ON(!host->claimed) will give
a warning.
Moreover, if it is still not claimed then mmc_host->claim_cnt will be 0
and mmc_release_host() will do "if (--host->claim_cnt)" and thus the
condition will become true.
Lets just return the value on allocation failure instead of trying to
release the host before claiming it.

Signed-off-by: Sudip Mukherjee 
---

resending both as GregKH asked to add the maintainers email. Though
MAINTAINERS is not having an entry for this.

 drivers/staging/ks7010/ks7010_sdio.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 47b69cb..7bcf1ea 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -776,10 +776,8 @@ static int ks7010_upload_firmware(struct ks_wlan_private 
*priv,
 
/* buffer allocate */
rom_buf = kmalloc(ROM_BUFF_SIZE, GFP_KERNEL);
-   if (!rom_buf) {
-   rc = 3;
-   goto error_out0;
-   }
+   if (!rom_buf)
+   return 3;
 
sdio_claim_host(card->func);
 
-- 
1.9.1

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


Re: [PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread kbuild test robot
Hi Amit,

[auto build test WARNING on v4.8-rc4]
[cannot apply to staging/staging-testing next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:
https://github.com/0day-ci/linux/commits/Amit-Ghadge/Staging-comedi-ni_daq_dio24-c-Fix-block-comments-use-on-subsequent-lines/20160904-170303
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   include/linux/compiler.h:230:8: sparse: attribute 'no_sanitize_address': 
unknown attribute
   drivers/staging/comedi/range.c:35:49: sparse: undefined identifier 'RANGE_mA'
>> drivers/staging/comedi/range.c:35:57: sparse: not a function 
   drivers/staging/comedi/range.c:37:49: sparse: undefined identifier 'RANGE_mA'
   drivers/staging/comedi/range.c:37:57: sparse: not a function 
   drivers/staging/comedi/range.c:39:49: sparse: undefined identifier 'RANGE_mA'
   drivers/staging/comedi/range.c:39:57: sparse: not a function 
   drivers/staging/comedi/range.c:35:49: error: implicit declaration of 
function 'RANGE_mA' [-Werror=implicit-function-declaration]
const struct comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
^~~~
   drivers/staging/comedi/range.c:35:49: error: initializer element is not 
constant
   drivers/staging/comedi/range.c:35:49: note: (near initialization for 
'range_0_20mA.range[0].min')
   drivers/staging/comedi/range.c:37:49: error: initializer element is not 
constant
const struct comedi_lrange range_4_20mA = { 1, {RANGE_mA(4, 20)} };
^~~~
   drivers/staging/comedi/range.c:37:49: note: (near initialization for 
'range_4_20mA.range[0].min')
   drivers/staging/comedi/range.c:39:49: error: initializer element is not 
constant
const struct comedi_lrange range_0_32mA = { 1, {RANGE_mA(0, 32)} };
^~~~
   drivers/staging/comedi/range.c:39:49: note: (near initialization for 
'range_0_32mA.range[0].min')
   cc1: some warnings being treated as errors
--
   include/linux/compiler.h:230:8: sparse: attribute 'no_sanitize_address': 
unknown attribute
   drivers/staging/comedi/drivers/dac02.c:66:17: sparse: undefined identifier 
'RANGE_mA'
>> drivers/staging/comedi/drivers/dac02.c:66:25: sparse: not a function 
>> 
   drivers/staging/comedi/drivers/dac02.c:66:3: error: implicit declaration of 
function 'RANGE_mA' [-Werror=implicit-function-declaration]
  RANGE_mA(4, 20),
  ^~~~
   drivers/staging/comedi/drivers/dac02.c:66:3: error: initializer element is 
not constant
   drivers/staging/comedi/drivers/dac02.c:66:3: note: (near initialization for 
'das02_ao_ranges.range[4].min')
   drivers/staging/comedi/drivers/dac02.c:67:3: warning: braces around scalar 
initializer
  RANGE_ext(0, 1)
  ^
   drivers/staging/comedi/drivers/dac02.c:67:3: note: (near initialization for 
'das02_ao_ranges.range[4].max')
   In file included from drivers/staging/comedi/drivers/dac02.c:38:0:
   drivers/staging/comedi/drivers/../comedidev.h:584:38: warning: excess 
elements in scalar initializer
#define RANGE_ext(a, b)  {(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
 ^
   drivers/staging/comedi/drivers/dac02.c:67:3: note: in expansion of macro 
'RANGE_ext'
  RANGE_ext(0, 1)
  ^
   drivers/staging/comedi/drivers/../comedidev.h:584:38: note: (near 
initialization for 'das02_ao_ranges.range[4].max')
#define RANGE_ext(a, b)  {(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
 ^
   drivers/staging/comedi/drivers/dac02.c:67:3: note: in expansion of macro 
'RANGE_ext'
  RANGE_ext(0, 1)
  ^
   In file included from drivers/staging/comedi/drivers/../comedidev.h:28:0,
from drivers/staging/comedi/drivers/dac02.c:38:
   drivers/staging/comedi/drivers/../comedi.h:897:22: warning: excess elements 
in scalar initializer
#define RF_EXTERNAL  0x100
 ^
   drivers/staging/comedi/drivers/../comedidev.h:584:49: note: in expansion of 
macro 'RF_EXTERNAL'
#define RANGE_ext(a, b)  {(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
^~~
   drivers/staging/comedi/drivers/dac02.c:67:3: note: in expansion of macro 
'RANGE_ext'
  RANGE_ext(0, 1)
  ^
   drivers/staging/comedi/drivers/../comedi.h:8

Re: [PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread Amit Ghadge
On Sep 4, 2016 5:19 PM, "kbuild test robot"  wrote:
>
> Hi Amit,
>
> [auto build test ERROR on v4.8-rc4]
> [cannot apply to staging/staging-testing next-20160825]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
> [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
> convenience) to record what (public, well-known) commit your patch series was 
> built on]
> [Check https://git-scm.com/docs/git-format-patch for more information]
>
> url:
> https://github.com/0day-ci/linux/commits/Amit-Ghadge/Staging-comedi-ni_daq_dio24-c-Fix-block-comments-use-on-subsequent-lines/20160904-170303
> config: i386-allmodconfig (attached as .config)
> compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
>
> All error/warnings (new ones prefixed by >>):
>
> >> drivers/staging/comedi/range.c:35:49: error: implicit declaration of 
> >> function 'RANGE_mA' [-Werror=implicit-function-declaration]
> const struct comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
> ^~~~
> >> drivers/staging/comedi/range.c:35:49: error: initializer element is not 
> >> constant
>drivers/staging/comedi/range.c:35:49: note: (near initialization for 
> 'range_0_20mA.range[0].min')
>drivers/staging/comedi/range.c:37:49: error: initializer element is not 
> constant
> const struct comedi_lrange range_4_20mA = { 1, {RANGE_mA(4, 20)} };
> ^~~~
>drivers/staging/comedi/range.c:37:49: note: (near initialization for 
> 'range_4_20mA.range[0].min')
>drivers/staging/comedi/range.c:39:49: error: initializer element is not 
> constant
> const struct comedi_lrange range_0_32mA = { 1, {RANGE_mA(0, 32)} };
> ^~~~
>drivers/staging/comedi/range.c:39:49: note: (near initialization for 
> 'range_0_32mA.range[0].min')
>cc1: some warnings being treated as errors
> --
> >> drivers/staging/comedi/drivers/pcl726.c:82:3: error: 'range_4_20mA' 
> >> undeclared here (not in a function)
>  &range_4_20mA,
>   ^~~~
> >> drivers/staging/comedi/drivers/pcl726.c:90:2: error: initializer element 
> >> is not constant
>  &range_4_20mA
>  ^
>drivers/staging/comedi/drivers/pcl726.c:90:2: note: (near initialization 
> for 'rangelist_727[3]')
>drivers/staging/comedi/drivers/pcl726.c:98:2: error: initializer element 
> is not constant
>  &range_4_20mA,
>  ^
>drivers/staging/comedi/drivers/pcl726.c:98:2: note: (near initialization 
> for 'rangelist_728[4]')
> >> drivers/staging/comedi/drivers/pcl726.c:99:3: error: 'range_0_20mA' 
> >> undeclared here (not in a function)
>  &range_0_20mA
>   ^~~~
>drivers/staging/comedi/drivers/pcl726.c:99:2: error: initializer element 
> is not constant
>  &range_0_20mA
>  ^
>drivers/staging/comedi/drivers/pcl726.c:99:2: note: (near initialization 
> for 'rangelist_728[5]')
> --
> >> drivers/staging/comedi/drivers/dac02.c:66:3: error: implicit declaration 
> >> of function 'RANGE_mA' [-Werror=implicit-function-declaration]
>   RANGE_mA(4, 20),
>   ^~~~
> >> drivers/staging/comedi/drivers/dac02.c:66:3: error: initializer element is 
> >> not constant
>drivers/staging/comedi/drivers/dac02.c:66:3: note: (near initialization 
> for 'das02_ao_ranges.range[4].min')
> >> drivers/staging/comedi/drivers/dac02.c:67:3: warning: braces around scalar 
> >> initializer
>   RANGE_ext(0, 1)
>   ^
>drivers/staging/comedi/drivers/dac02.c:67:3: note: (near initialization 
> for 'das02_ao_ranges.range[4].max')
>In file included from drivers/staging/comedi/drivers/dac02.c:38:0:
> >> drivers/staging/comedi/drivers/../comedidev.h:584:38: warning: excess 
> >> elements in scalar initializer
> #define RANGE_ext(a, b)  {(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
>  ^
> >> drivers/staging/comedi/drivers/dac02.c:67:3: note: in expansion of macro 
> >> 'RANGE_ext'
>   RANGE_ext(0, 1)
>   ^
>drivers/staging/comedi/drivers/../comedidev.h:584:38: note: (near 
> initialization for 'das02_ao_ranges.range[4].max')
> #define RANGE_ext(a, b)  {(a) * 1e6, (b) * 1e6, RF_EXTERNAL}

Re: [PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread kbuild test robot
Hi Amit,

[auto build test ERROR on v4.8-rc4]
[cannot apply to staging/staging-testing next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:
https://github.com/0day-ci/linux/commits/Amit-Ghadge/Staging-comedi-ni_daq_dio24-c-Fix-block-comments-use-on-subsequent-lines/20160904-170303
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All error/warnings (new ones prefixed by >>):

>> drivers/staging/comedi/range.c:35:49: error: implicit declaration of 
>> function 'RANGE_mA' [-Werror=implicit-function-declaration]
const struct comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
^~~~
>> drivers/staging/comedi/range.c:35:49: error: initializer element is not 
>> constant
   drivers/staging/comedi/range.c:35:49: note: (near initialization for 
'range_0_20mA.range[0].min')
   drivers/staging/comedi/range.c:37:49: error: initializer element is not 
constant
const struct comedi_lrange range_4_20mA = { 1, {RANGE_mA(4, 20)} };
^~~~
   drivers/staging/comedi/range.c:37:49: note: (near initialization for 
'range_4_20mA.range[0].min')
   drivers/staging/comedi/range.c:39:49: error: initializer element is not 
constant
const struct comedi_lrange range_0_32mA = { 1, {RANGE_mA(0, 32)} };
^~~~
   drivers/staging/comedi/range.c:39:49: note: (near initialization for 
'range_0_32mA.range[0].min')
   cc1: some warnings being treated as errors
--
>> drivers/staging/comedi/drivers/pcl726.c:82:3: error: 'range_4_20mA' 
>> undeclared here (not in a function)
 &range_4_20mA,
  ^~~~
>> drivers/staging/comedi/drivers/pcl726.c:90:2: error: initializer element is 
>> not constant
 &range_4_20mA
 ^
   drivers/staging/comedi/drivers/pcl726.c:90:2: note: (near initialization for 
'rangelist_727[3]')
   drivers/staging/comedi/drivers/pcl726.c:98:2: error: initializer element is 
not constant
 &range_4_20mA,
 ^
   drivers/staging/comedi/drivers/pcl726.c:98:2: note: (near initialization for 
'rangelist_728[4]')
>> drivers/staging/comedi/drivers/pcl726.c:99:3: error: 'range_0_20mA' 
>> undeclared here (not in a function)
 &range_0_20mA
  ^~~~
   drivers/staging/comedi/drivers/pcl726.c:99:2: error: initializer element is 
not constant
 &range_0_20mA
 ^
   drivers/staging/comedi/drivers/pcl726.c:99:2: note: (near initialization for 
'rangelist_728[5]')
--
>> drivers/staging/comedi/drivers/dac02.c:66:3: error: implicit declaration of 
>> function 'RANGE_mA' [-Werror=implicit-function-declaration]
  RANGE_mA(4, 20),
  ^~~~
>> drivers/staging/comedi/drivers/dac02.c:66:3: error: initializer element is 
>> not constant
   drivers/staging/comedi/drivers/dac02.c:66:3: note: (near initialization for 
'das02_ao_ranges.range[4].min')
>> drivers/staging/comedi/drivers/dac02.c:67:3: warning: braces around scalar 
>> initializer
  RANGE_ext(0, 1)
  ^
   drivers/staging/comedi/drivers/dac02.c:67:3: note: (near initialization for 
'das02_ao_ranges.range[4].max')
   In file included from drivers/staging/comedi/drivers/dac02.c:38:0:
>> drivers/staging/comedi/drivers/../comedidev.h:584:38: warning: excess 
>> elements in scalar initializer
#define RANGE_ext(a, b)  {(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
 ^
>> drivers/staging/comedi/drivers/dac02.c:67:3: note: in expansion of macro 
>> 'RANGE_ext'
  RANGE_ext(0, 1)
  ^
   drivers/staging/comedi/drivers/../comedidev.h:584:38: note: (near 
initialization for 'das02_ao_ranges.range[4].max')
#define RANGE_ext(a, b)  {(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
 ^
>> drivers/staging/comedi/drivers/dac02.c:67:3: note: in expansion of macro 
>> 'RANGE_ext'
  RANGE_ext(0, 1)
  ^
   In file included from drivers/staging/comedi/drivers/../comedidev.h:28:0,
from drivers/staging/comedi/drivers/dac02.c:38:
>> drivers/staging/comedi/drivers/../comedi.h:897:22: warning: excess elements 
>> in scalar initializer
#define RF_EXTERNAL  0x100
 ^
>> drivers/stag

Re: [PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread kbuild test robot
Hi Amit,

[auto build test WARNING on v4.8-rc4]
[cannot apply to staging/staging-testing next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:
https://github.com/0day-ci/linux/commits/Amit-Ghadge/Staging-comedi-ni_daq_dio24-c-Fix-block-comments-use-on-subsequent-lines/20160904-170303
config: i386-randconfig-i0-201636 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/staging/comedi/drivers/adv_pci1724.c:76:3: error: implicit 
declaration of function 'RANGE_mA' [-Werror=implicit-function-declaration]
  RANGE_mA(0, 20),
  ^
   drivers/staging/comedi/drivers/adv_pci1724.c:76:3: warning: missing braces 
around initializer [-Wmissing-braces]
   drivers/staging/comedi/drivers/adv_pci1724.c:76:3: warning: (near 
initialization for 'adv_pci1724_ao_ranges.range[1]') [-Wmissing-braces]
   drivers/staging/comedi/drivers/adv_pci1724.c:76:3: error: initializer 
element is not constant
   drivers/staging/comedi/drivers/adv_pci1724.c:76:3: error: (near 
initialization for 'adv_pci1724_ao_ranges.range[1].min')
   drivers/staging/comedi/drivers/adv_pci1724.c:77:3: error: initializer 
element is not constant
  RANGE_mA(4, 20),
  ^
   drivers/staging/comedi/drivers/adv_pci1724.c:77:3: error: (near 
initialization for 'adv_pci1724_ao_ranges.range[1].max')
   drivers/staging/comedi/drivers/adv_pci1724.c:78:3: warning: braces around 
scalar initializer [enabled by default]
  RANGE_unitless(0, 1)
  ^
   drivers/staging/comedi/drivers/adv_pci1724.c:78:3: warning: (near 
initialization for 'adv_pci1724_ao_ranges.range[1].flags') [enabled by default]
>> drivers/staging/comedi/drivers/adv_pci1724.c:78:3: warning: excess elements 
>> in scalar initializer [enabled by default]
   drivers/staging/comedi/drivers/adv_pci1724.c:78:3: warning: (near 
initialization for 'adv_pci1724_ao_ranges.range[1].flags') [enabled by default]
>> drivers/staging/comedi/drivers/adv_pci1724.c:78:3: warning: excess elements 
>> in scalar initializer [enabled by default]
   drivers/staging/comedi/drivers/adv_pci1724.c:78:3: warning: (near 
initialization for 'adv_pci1724_ao_ranges.range[1].flags') [enabled by default]
   cc1: some warnings being treated as errors

vim +78 drivers/staging/comedi/drivers/adv_pci1724.c

c2edc021 H Hartley Sweeten 2014-11-20  70  #define PCI1724_BOARD_ID_REG 
0x10
70adf763 H Hartley Sweeten 2014-11-20  71  #define PCI1724_BOARD_ID_MASK
(0xf << 0)
f165d815 Frank Mori Hess   2013-03-12  72  
474bfe5f H Hartley Sweeten 2014-11-20  73  static const struct comedi_lrange 
adv_pci1724_ao_ranges = {
348dc03e H Hartley Sweeten 2013-12-09  74   4, {
f165d815 Frank Mori Hess   2013-03-12  75   BIP_RANGE(10),
f165d815 Frank Mori Hess   2013-03-12 @76   RANGE_mA(0, 20),
f165d815 Frank Mori Hess   2013-03-12  77   RANGE_mA(4, 20),
f165d815 Frank Mori Hess   2013-03-12 @78   RANGE_unitless(0, 1)
f165d815 Frank Mori Hess   2013-03-12  79   }
f165d815 Frank Mori Hess   2013-03-12  80  };
f165d815 Frank Mori Hess   2013-03-12  81  

:: The code at line 78 was first introduced by commit
:: f165d815d50f158be43aa12c5c800fd27bbecad3 staging: comedi: adv_pci1724: 
new driver

:: TO: Frank Mori Hess 
:: CC: Greg Kroah-Hartman 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread kbuild test robot
Hi Amit,

[auto build test WARNING on v4.8-rc4]
[cannot apply to staging/staging-testing next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:
https://github.com/0day-ci/linux/commits/Amit-Ghadge/Staging-comedi-ni_daq_dio24-c-Fix-block-comments-use-on-subsequent-lines/20160904-170303
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/staging/comedi/drivers/dac02.c:66:3: error: implicit declaration of 
function 'RANGE_mA' [-Werror=implicit-function-declaration]
  RANGE_mA(4, 20),
  ^~~~
   drivers/staging/comedi/drivers/dac02.c:66:3: error: initializer element is 
not constant
   drivers/staging/comedi/drivers/dac02.c:66:3: note: (near initialization for 
'das02_ao_ranges.range[4].min')
   drivers/staging/comedi/drivers/dac02.c:67:3: warning: braces around scalar 
initializer
  RANGE_ext(0, 1)
  ^
   drivers/staging/comedi/drivers/dac02.c:67:3: note: (near initialization for 
'das02_ao_ranges.range[4].max')
>> drivers/staging/comedi/drivers/dac02.c:67:15: warning: excess elements in 
>> scalar initializer
  RANGE_ext(0, 1)
  ^
   drivers/staging/comedi/drivers/dac02.c:67:15: note: (near initialization for 
'das02_ao_ranges.range[4].max')
   drivers/staging/comedi/drivers/dac02.c:67:26: warning: excess elements in 
scalar initializer
  RANGE_ext(0, 1)
 ^
   drivers/staging/comedi/drivers/dac02.c:67:26: note: (near initialization for 
'das02_ao_ranges.range[4].max')
   drivers/staging/comedi/drivers/dac02.c:61:5: warning: missing braces around 
initializer [-Wmissing-braces]
 6, {
^
   drivers/staging/comedi/drivers/dac02.c:61:5: note: (near initialization for 
'das02_ao_ranges.range')
   drivers/staging/comedi/drivers/dac02.c:60:53: warning: missing braces around 
initializer [-Wmissing-braces]
static const struct comedi_lrange das02_ao_ranges = {
^
   drivers/staging/comedi/drivers/dac02.c:60:53: note: (near initialization for 
'das02_ao_ranges')
   cc1: some warnings being treated as errors

vim +67 drivers/staging/comedi/drivers/dac02.c

9e27 H Hartley Sweeten 2014-03-11  60  static const struct comedi_lrange 
das02_ao_ranges = {
9e27 H Hartley Sweeten 2014-03-11  61   6, {
9e27 H Hartley Sweeten 2014-03-11  62   UNI_RANGE(5),
9e27 H Hartley Sweeten 2014-03-11  63   UNI_RANGE(10),
9e27 H Hartley Sweeten 2014-03-11  64   BIP_RANGE(5),
9e27 H Hartley Sweeten 2014-03-11  65   BIP_RANGE(10),
9e27 H Hartley Sweeten 2014-03-11 @66   RANGE_mA(4, 20),
9e27 H Hartley Sweeten 2014-03-11 @67   RANGE_ext(0, 1)
9e27 H Hartley Sweeten 2014-03-11  68   }
9e27 H Hartley Sweeten 2014-03-11  69  };
9e27 H Hartley Sweeten 2014-03-11  70  

:: The code at line 67 was first introduced by commit
:: 9e27475c9cbed2d59ac33f1d6f21bf9e260d staging: comedi: dac02: 
introduce comedi driver for DAC02 boards

:: TO: H Hartley Sweeten 
:: CC: Greg Kroah-Hartman 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 1/1] drivers: staging: rtl8723au: hal: Remove pointless test

2016-09-04 Thread Matthias Beyer
This patch removes the pointless `else if` test.

Signed-off-by: Matthias Beyer 
Reported-by: David Binderman 
---
 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index 6989580..47e8d69 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -3530,7 +3530,7 @@ bthci_CmdLinkStatusNotify(
pBtMgnt->ExtConfig.linkInfo[i].BTProfile,
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec));
pTriple += 4;
-   } else if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
+   } else {
pBtMgnt->ExtConfig.linkInfo[i].ConnectHandle = *((u16 
*)&pTriple[0]);
pBtMgnt->ExtConfig.linkInfo[i].BTProfile = pTriple[2];
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec = pTriple[3];
-- 
2.9.3

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


[PATCH v2 0/1] Remove pointless test

2016-09-04 Thread Matthias Beyer
Re-sending as

On 01-09-2016 17:54:47, Greg KH wrote:
> There is no patch here :(

8<

As reported by David Binderman, this test is useless as of

if (a < 3) {
/* ... */
} else if (a >= 3) {
/* ... */
}

so this patch removes the second check.

Matthias Beyer (1):
  drivers: staging: rtl8723au: hal: Remove pointless test

 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.3

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


Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.

2016-09-04 Thread Amit Ghadge
I will be send individual patches.

I was try,
 make M=drivers/staging/comedi/

No issue generated, Is there have any other option to test these changes?


Amit G

On Sun, Sep 4, 2016 at 2:05 PM, Greg KH  wrote:
> On Sun, Sep 04, 2016 at 01:41:03AM +0530, Amit Ghadge wrote:
>> Fixes checkpatch warning:
>> WARNING: Block comments use * on subsequent lines
>>
>> Replace (1<<7) by BIT(7) in the file ni_670x.c to get rid
>> of checkpatch.pl "CHECK" output "Prefer using the BIT macro".
>> Replace Avoid CamelCase range_0_20mA to range_0_20ma.
>
> That's multiple things in the same patch, and you didn't even test build
> your change :(
>
> Please do better than this in the future.
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread Amit Ghadge
On Sun, Sep 4, 2016 at 3:12 PM, Giedrius Statkevičius
 wrote:
> On Sun, Sep 4, 2016 at 12:08 PM, Amit Ghadge  wrote:
>> This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
>> WARNING: Block comments use * on subsequent lines
>>
>> Signed-off-by: Amit Ghadge 
>> ---
> [...]
>
> Why are you sending so many copies of the same patch?

Accidentally I used same git branch and try to send multiple patches
but other patch has some issue, So I have exclude the other patch.


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


Re: [PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread Giedrius Statkevičius
On Sun, Sep 4, 2016 at 12:08 PM, Amit Ghadge  wrote:
> This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
> WARNING: Block comments use * on subsequent lines
>
> Signed-off-by: Amit Ghadge 
> ---
[...]

Why are you sending so many copies of the same patch?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread Amit Ghadge
This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
WARNING: Block comments use * on subsequent lines

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/ni_daq_dio24.c | 52 +--
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c 
b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index d9de83a..ff3716c 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -1,35 +1,35 @@
 /*
-comedi/drivers/ni_daq_dio24.c
-Driver for National Instruments PCMCIA DAQ-Card DIO-24
-Copyright (C) 2002 Daniel Vecino Castel 
+ * comedi/drivers/ni_daq_dio24.c
+ * Driver for National Instruments PCMCIA DAQ-Card DIO-24
+ * Copyright (C) 2002 Daniel Vecino Castel 
 
-PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
-2001/08/24 12:13:13 from the pcmcia package.
-The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
-.  Portions created by David A. Hinds
-are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
+ * 2001/08/24 12:13:13 from the pcmcia package.
+ * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
+ * .  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 /*
-Driver: ni_daq_dio24
-Description: National Instruments PCMCIA DAQ-Card DIO-24
-Author: Daniel Vecino Castel 
-Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
-Status: ?
-Updated: Thu, 07 Nov 2002 21:53:06 -0800
+ * Driver: ni_daq_dio24
+ * Description: National Instruments PCMCIA DAQ-Card DIO-24
+ * Author: Daniel Vecino Castel 
+ * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
+ * Status: ?
+ * Updated: Thu, 07 Nov 2002 21:53:06 -0800
 
-This is just a wrapper around the 8255.o driver to properly handle
-the PCMCIA interface.
-*/
+ * This is just a wrapper around the 8255.o driver to properly handle
+ * the PCMCIA interface.
+ */
 
 #include 
 #include "../comedi_pcmcia.h"
-- 
2.5.5

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


Re: [PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread Amit Ghadge
On Sun, Sep 4, 2016 at 2:30 PM, Amit Ghadge  wrote:
> This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
>
> WARNING: Block comments use * on subsequent lines
>
> Signed-off-by: Amit Ghadge 
> ---
>  drivers/staging/comedi/comedidev.h|  8 ++---
>  drivers/staging/comedi/drivers/ni_daq_dio24.c | 52 
> +--
>  2 files changed, 30 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedidev.h 
> b/drivers/staging/comedi/comedidev.h
> index dcb6376..612a844 100644
> --- a/drivers/staging/comedi/comedidev.h
> +++ b/drivers/staging/comedi/comedidev.h
> @@ -582,7 +582,7 @@ int comedi_check_chanlist(struct comedi_subdevice *s,
>
>  #define RANGE(a, b){(a) * 1e6, (b) * 1e6, 0}
>  #define RANGE_ext(a, b){(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
> -#define RANGE_mA(a, b) {(a) * 1e6, (b) * 1e6, UNIT_mA}
> +#define RANGE_MA(a, b) {(a) * 1e6, (b) * 1e6, UNIT_MA}
>  #define RANGE_unitless(a, b)   {(a) * 1e6, (b) * 1e6, 0}
>  #define BIP_RANGE(a)   {-(a) * 1e6, (a) * 1e6, 0}
>  #define UNI_RANGE(a)   {0, (a) * 1e6, 0}
> @@ -593,9 +593,9 @@ extern const struct comedi_lrange range_bipolar2_5;
>  extern const struct comedi_lrange range_unipolar10;
>  extern const struct comedi_lrange range_unipolar5;
>  extern const struct comedi_lrange range_unipolar2_5;
> -extern const struct comedi_lrange range_0_20mA;
> -extern const struct comedi_lrange range_4_20mA;
> -extern const struct comedi_lrange range_0_32mA;
> +extern const struct comedi_lrange range_0_20ma;
> +extern const struct comedi_lrange range_4_20ma;
> +extern const struct comedi_lrange range_0_32ma;
>  extern const struct comedi_lrange range_unknown;
>
>  #define range_digital  range_unipolar5
> diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c 
> b/drivers/staging/comedi/drivers/ni_daq_dio24.c
> index d9de83a..ff3716c 100644
> --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
> +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
> @@ -1,35 +1,35 @@
>  /*
> -comedi/drivers/ni_daq_dio24.c
> -Driver for National Instruments PCMCIA DAQ-Card DIO-24
> -Copyright (C) 2002 Daniel Vecino Castel 
> + * comedi/drivers/ni_daq_dio24.c
> + * Driver for National Instruments PCMCIA DAQ-Card DIO-24
> + * Copyright (C) 2002 Daniel Vecino Castel 
>
> -PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
> -2001/08/24 12:13:13 from the pcmcia package.
> -The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
> -.  Portions created by David A. Hinds
> -are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
> + * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
> + * 2001/08/24 12:13:13 from the pcmcia package.
> + * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
> + * .  Portions created by David A. Hinds
> + * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
>
> -This program is free software; you can redistribute it and/or modify
> -it under the terms of the GNU General Public License as published by
> -the Free Software Foundation; either version 2 of the License, or
> -(at your option) any later version.
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
>
> -This program is distributed in the hope that it will be useful,
> -but WITHOUT ANY WARRANTY; without even the implied warranty of
> -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -GNU General Public License for more details.
> -*/
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
>  /*
> -Driver: ni_daq_dio24
> -Description: National Instruments PCMCIA DAQ-Card DIO-24
> -Author: Daniel Vecino Castel 
> -Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
> -Status: ?
> -Updated: Thu, 07 Nov 2002 21:53:06 -0800
> + * Driver: ni_daq_dio24
> + * Description: National Instruments PCMCIA DAQ-Card DIO-24
> + * Author: Daniel Vecino Castel 
> + * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
> + * Status: ?
> + * Updated: Thu, 07 Nov 2002 21:53:06 -0800
>
> -This is just a wrapper around the 8255.o driver to properly handle
> -the PCMCIA interface.
> -*/
> + * This is just a wrapper around the 8255.o driver to properly handle
> + * the PCMCIA interface.
> + */
>
>  #include 
>  #include "../comedi_pcmcia.h"
> --
> 2.5.5
>


Please ignore this patch.


Amit
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverpro

[PATCH] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-04 Thread Amit Ghadge
This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:

WARNING: Block comments use * on subsequent lines

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/comedidev.h|  8 ++---
 drivers/staging/comedi/drivers/ni_daq_dio24.c | 52 +--
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index dcb6376..612a844 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -582,7 +582,7 @@ int comedi_check_chanlist(struct comedi_subdevice *s,
 
 #define RANGE(a, b){(a) * 1e6, (b) * 1e6, 0}
 #define RANGE_ext(a, b){(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
-#define RANGE_mA(a, b) {(a) * 1e6, (b) * 1e6, UNIT_mA}
+#define RANGE_MA(a, b) {(a) * 1e6, (b) * 1e6, UNIT_MA}
 #define RANGE_unitless(a, b)   {(a) * 1e6, (b) * 1e6, 0}
 #define BIP_RANGE(a)   {-(a) * 1e6, (a) * 1e6, 0}
 #define UNI_RANGE(a)   {0, (a) * 1e6, 0}
@@ -593,9 +593,9 @@ extern const struct comedi_lrange range_bipolar2_5;
 extern const struct comedi_lrange range_unipolar10;
 extern const struct comedi_lrange range_unipolar5;
 extern const struct comedi_lrange range_unipolar2_5;
-extern const struct comedi_lrange range_0_20mA;
-extern const struct comedi_lrange range_4_20mA;
-extern const struct comedi_lrange range_0_32mA;
+extern const struct comedi_lrange range_0_20ma;
+extern const struct comedi_lrange range_4_20ma;
+extern const struct comedi_lrange range_0_32ma;
 extern const struct comedi_lrange range_unknown;
 
 #define range_digital  range_unipolar5
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c 
b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index d9de83a..ff3716c 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -1,35 +1,35 @@
 /*
-comedi/drivers/ni_daq_dio24.c
-Driver for National Instruments PCMCIA DAQ-Card DIO-24
-Copyright (C) 2002 Daniel Vecino Castel 
+ * comedi/drivers/ni_daq_dio24.c
+ * Driver for National Instruments PCMCIA DAQ-Card DIO-24
+ * Copyright (C) 2002 Daniel Vecino Castel 
 
-PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
-2001/08/24 12:13:13 from the pcmcia package.
-The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
-.  Portions created by David A. Hinds
-are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
+ * 2001/08/24 12:13:13 from the pcmcia package.
+ * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
+ * .  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 /*
-Driver: ni_daq_dio24
-Description: National Instruments PCMCIA DAQ-Card DIO-24
-Author: Daniel Vecino Castel 
-Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
-Status: ?
-Updated: Thu, 07 Nov 2002 21:53:06 -0800
+ * Driver: ni_daq_dio24
+ * Description: National Instruments PCMCIA DAQ-Card DIO-24
+ * Author: Daniel Vecino Castel 
+ * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
+ * Status: ?
+ * Updated: Thu, 07 Nov 2002 21:53:06 -0800
 
-This is just a wrapper around the 8255.o driver to properly handle
-the PCMCIA interface.
-*/
+ * This is just a wrapper around the 8255.o driver to properly handle
+ * the PCMCIA interface.
+ */
 
 #include 
 #include "../comedi_pcmcia.h"
-- 
2.5.5

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


Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.

2016-09-04 Thread Greg KH
On Sun, Sep 04, 2016 at 01:41:03AM +0530, Amit Ghadge wrote:
> Fixes checkpatch warning:
> WARNING: Block comments use * on subsequent lines
> 
> Replace (1<<7) by BIT(7) in the file ni_670x.c to get rid
> of checkpatch.pl "CHECK" output "Prefer using the BIT macro".
> Replace Avoid CamelCase range_0_20mA to range_0_20ma.

That's multiple things in the same patch, and you didn't even test build
your change :(

Please do better than this in the future.

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