Re: [PATCH RFC] remove custom Michael MIC implementation

2017-04-02 Thread Kalle Valo
+ linux-wireless

"Tobin C. Harding"  writes:

> On Fri, Mar 31, 2017 at 09:58:51AM +0200, Wolfram Sang wrote:
>> 
>> > The code is untested, I have hardware in the mail.
>> 
>> Cool!
>
> The card I have is a Spectec FCC ID: S2Y-WLAN-11B-G which I believe is
> a SDW-823 and should use the ks7010 driver. I am going to attempt to
> get it running on a Raspberry Pi B+. I ordered the wrong size break
> out board originally so waiting on the new one now.
>
>> 
>> > If any one is interested and has any comments I would really like to
>> > hear them. I am open to all suggestions (even down to trivial coding
>> > style issues).
>> 
>> I'll just repeat that the key move to get this driver out of staging is
>> to get away from the WEXT interface to CFG80211. Otherwise no chance
>> that wireless maintainers will even look at it. This is a huge change
>> but once it is done, features like Michael MIC come with it for free
>> (from what I recall, I am not a wireless expert myself).
>
> That would explain why I could not find more than the Orinoco driver
> using the Michael MIC module directly.

I think cfg80211 and mac80211 got mixed up. mac80211 (the full IEEE
802.11 stack for "softmac" devices) provides Michael MIC implementation,
but cfg80211 (for "hardmac" devices) does not.

>> Without the CFG80211 conversion, replacing the Michael custom
>> implementation with the in-kernel one makes the driver a tad better and
>> is good exercise. However, it will sadly not help to get the driver out
>> of staging.
>
> I'll drop it then. Could you please tell me, is there any thing else
> more I need to do to let LKML know that this RFC is dropped? Or is
> this reply enough. I don't want to use any ones time unnecessarily.
>
>> 
>> But if you want a clean WEXT driver first, this is a step in the right
>> direction.
>
> Let's go for a CFG80211 driver and get out of staging :) So next step
> is I guess study the ath6kl driver, learn how CFG80211 is done and
> implement that interface in ks7010? Oh, and test that it works.

Please keep linux-wireless list in loop so that people on that list can
help.

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


Re: [PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-04-02 Thread Joe Perches
On Mon, 2017-04-03 at 09:43 +0530, Prasant Jalan wrote:
> On Thu, Mar 30, 2017 at 12:03 AM, Prasant Jalan  
> wrote:
> > Checkpatch emits WARNING: Avoid multiple line dereference.
> > 
> > Trivial indentation improvement helps fix the checkpatch warning.
[]
> > diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
> > b/drivers/staging/rtl8712/rtl871x_xmit.c
[]
> > @@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter 
> > *padapter,
> >[10], 6);
> > }
> > if (pqospriv->qos_option == 1)
> > -   priority[0] = (u8)pxmitframe->
> > - attrib.priority;
> > +   priority[0] = 
> > (u8)pxmitframe->attrib.priority;
> > r8712_secmicappend(, [0], 4);
> > payload = pframe;
> > for (curfragnum = 0; curfragnum < pattrib->nr_frags;
> >  curfragnum++) {
> > payload = (u8 *)RND4((addr_t)(payload));
> > -   payload = payload + pattrib->
> > - hdrlen + pattrib->iv_len;
> > +   payload = payload + pattrib->hdrlen +
> > + pattrib->iv_len;

+= would be shorter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-04-02 Thread Prasant Jalan
On Thu, Mar 30, 2017 at 12:03 AM, Prasant Jalan  wrote:
> Checkpatch emits WARNING: Avoid multiple line dereference.
>
> Trivial indentation improvement helps fix the checkpatch warning.
>
> Signed-off-by: Prasant Jalan 
> ---
>  drivers/staging/rtl8712/rtl871x_xmit.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
> b/drivers/staging/rtl8712/rtl871x_xmit.c
> index de88819..10edf00 100644
> --- a/drivers/staging/rtl8712/rtl871x_xmit.c
> +++ b/drivers/staging/rtl8712/rtl871x_xmit.c
> @@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt 
> *pkt,
> if (padapter->pwrctrlpriv.pwr_mode !=
> padapter->registrypriv.power_mgnt) {
> del_timer_sync(>dhcp_timer);
> -   r8712_set_ps_mode(padapter, padapter->registrypriv.
> -   power_mgnt, padapter->registrypriv.smart_ps);
> +   r8712_set_ps_mode(padapter,
> + padapter->registrypriv.power_mgnt,
> + padapter->registrypriv.smart_ps);
> }
> }
>  }
> @@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter *padapter,
>[10], 6);
> }
> if (pqospriv->qos_option == 1)
> -   priority[0] = (u8)pxmitframe->
> - attrib.priority;
> +   priority[0] = (u8)pxmitframe->attrib.priority;
> r8712_secmicappend(, [0], 4);
> payload = pframe;
> for (curfragnum = 0; curfragnum < pattrib->nr_frags;
>  curfragnum++) {
> payload = (u8 *)RND4((addr_t)(payload));
> -   payload = payload + pattrib->
> - hdrlen + pattrib->iv_len;
> +   payload = payload + pattrib->hdrlen +
> + pattrib->iv_len;
> if ((curfragnum + 1) == pattrib->nr_frags) {
> length = pattrib->last_txcmdsz -
>   pattrib->hdrlen -
> --
> 2.7.4
>


Hi all,


A gentle reminder for my small patch. Some comments will be most helpful.


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


[Patch v2 2/3] staging: vt6656: Replace embedded function name with __func__ in rf.c

2017-04-02 Thread Daniel Cashman
From: Dan Cashman 

Change embedded function name in vnt_rf_set_txpower with %s format with
__func__ argument to make it consistent with other part of if-else and
kernel coding style standards as reported by checkpatch.

Signed-off-by: Daniel Cashman 
---
 drivers/staging/vt6656/rf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 1e19579..d157e5c 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -771,7 +771,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, 
u32 rate)
ret &= vnt_rf_write_embedded(priv, 0x015C0800);
} else {
dev_dbg(>usb->dev,
-   " vnt_rf_set_txpower> 11G mode\n");
+   " %s> 11G mode\n", __func__);
 
power_setting = ((0x3f - power) << 20) | (0x7 << 8);
 
-- 
2.7.4

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


[Patch v2 3/3] staging: vt6656: Split arguments to avoid 80-char violation in rf.c

2017-04-02 Thread Daniel Cashman
From: Dan Cashman 

Wrap arguments of call to vnt_control_out() to avoid exceeding 80
character limit, but maintain alignment.

Signed-off-by: Daniel Cashman 
---
 drivers/staging/vt6656/rf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index d157e5c..23581af 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2,
+   length, array);
 
length2 -= length;
value += length;
-- 
2.7.4

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


[Patch v2 1/3] staging: vt6656: convert spaces to tabs for rf.c

2017-04-02 Thread Daniel Cashman
From: Dan Cashman 

Address checkpatch errors encountered in rf.c by removing use of spaces
and replacing with properly aligned tabs.

Signed-off-by: Daniel Cashman 
---
 drivers/staging/vt6656/rf.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..1e19579 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
 
length2 -= length;
value += length;
-- 
2.7.4

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


[Patch v2 0/3] staging: vt6656: Fix checkpatch style violations.

2017-04-02 Thread Daniel Cashman
From: Dan Cashman 

This patchset fixes the checkpatch-reported kernel style guide violations for
rf.c in the vt6656 staging area.  Specifically, the first patch fixes the
errors, which are all spaces -> tabs conversions, and the second and third fix 
the warnings, which are an embedded function name in a debug statement and an
exceeded 80-char line, respectively.

Signed-off-by: Daniel Cashman 


Dan Cashman (3):
  staging: vt6656: convert spaces to tabs for rf.c
  staging: vt6656: Replace embedded function name with __func__ in rf.c
  staging: vt6656: Split arguments to avoid 80-char violation in rf.c

 drivers/staging/vt6656/rf.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

-- 
2.7.4

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


[PATCH] staging: lustre: fixed ../include/lustre_debug.h is included more than once.

2017-04-02 Thread Darryl T. Agostinelli
$ make includecheck
./drivers/staging/lustre/lustre/ptlrpc/layout.c: ../include/lustre_debug.h is 
included more than once.

Signed-off-by: Darryl T. Agostinelli 
---
 drivers/staging/lustre/lustre/ptlrpc/layout.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c 
b/drivers/staging/lustre/lustre/ptlrpc/layout.c
index 356d735..8177e1a 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
@@ -58,7 +58,6 @@
 /* struct ptlrpc_request, lustre_msg* */
 #include "../include/lustre_req_layout.h"
 #include "../include/lustre_acl.h"
-#include "../include/lustre_debug.h"
 
 /*
  * RQFs (see below) refer to two struct req_msg_field arrays describing the
-- 
2.9.3

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


[PATCH 3/6] staging:r8188eu: remove sw_decrypt member of security_priv struct

2017-04-02 Thread Ivan Safonov
sw_decrypt always is 0, so replace it with 0.

Signed-off-by: Ivan Safonov 
---
 drivers/staging/rtl8188eu/core/rtw_recv.c| 4 ++--
 drivers/staging/rtl8188eu/include/rtw_security.h | 1 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c  | 1 -
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c 
b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 96526fe..c6c4404 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -392,7 +392,7 @@ static struct recv_frame *decryptor(struct adapter 
*padapter,
}
}
 
-   if ((prxattrib->encrypt > 0) && ((prxattrib->bdecrypted == 0) || 
(psecuritypriv->sw_decrypt))) {
+   if ((prxattrib->encrypt > 0) && (prxattrib->bdecrypted == 0)) {
psecuritypriv->hw_decrypted = false;
 
switch (prxattrib->encrypt) {
@@ -1979,7 +1979,7 @@ static int recv_func(struct adapter *padapter, struct 
recv_frame *rframe)
/* check if need to enqueue into uc_swdec_pending_queue*/
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
!IS_MCAST(prxattrib->ra) && prxattrib->encrypt > 0 &&
-   (prxattrib->bdecrypted == 0 || psecuritypriv->sw_decrypt) &&
+   prxattrib->bdecrypted == 0 &&
!is_wep_enc(psecuritypriv->dot11PrivacyAlgrthm) &&
!psecuritypriv->busetkipkey) {
rtw_enqueue_recvframe(rframe, 
>recvpriv.uc_swdec_pending_queue);
diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h 
b/drivers/staging/rtl8188eu/include/rtw_security.h
index 7100d6b..2eda677 100644
--- a/drivers/staging/rtl8188eu/include/rtw_security.h
+++ b/drivers/staging/rtl8188eu/include/rtw_security.h
@@ -134,7 +134,6 @@ struct security_priv {
u8  bcheck_grpkey;
u8  bgrpkey_handshake;
s32 sw_encrypt;/* from registry_priv */
-   s32 sw_decrypt;/* from registry_priv */
s32 hw_decrypted;/* if the rx packets is hw_decrypted==false,i
  * it means the hw has not been ready. */
 
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 451deb0..8fee58f 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -392,7 +392,6 @@ static u8 rtw_init_default_value(struct adapter *padapter)
/* security_priv */
psecuritypriv->binstallGrpkey = _FAIL;
psecuritypriv->sw_encrypt = pregistrypriv->software_encrypt;
-   psecuritypriv->sw_decrypt = 0;
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
psecuritypriv->dot11PrivacyKeyIndex = 0;
-- 
2.10.2

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


[PATCH 5/6] staging:r8188eu: remove software_encrypt member of registry_priv struct

2017-04-02 Thread Ivan Safonov
Value of this variable does not changed after initialization.
Replace software_encrypt with its default value.

Signed-off-by: Ivan Safonov 
---
 drivers/staging/rtl8188eu/include/drv_types.h | 1 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/drv_types.h 
b/drivers/staging/rtl8188eu/include/drv_types.h
index 8bcb170..c3517c0 100644
--- a/drivers/staging/rtl8188eu/include/drv_types.h
+++ b/drivers/staging/rtl8188eu/include/drv_types.h
@@ -65,7 +65,6 @@ struct registry_priv {
u8  ips_mode;
u8  smart_ps;
u8  mp_mode;
-   u8  software_encrypt;
u8  acm_method;
  /* UAPSD */
u8  wmm_enable;
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index ccae39f..fecbedd 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -163,7 +163,6 @@ static void loadparam(struct adapter *padapter, struct 
net_device *pnetdev)
registry_par->power_mgnt = (u8)rtw_power_mgnt;
registry_par->ips_mode = (u8)rtw_ips_mode;
registry_par->mp_mode = 0;
-   registry_par->software_encrypt = 0;
registry_par->acm_method = (u8)rtw_acm_method;
 
 /* UAPSD */
@@ -389,7 +388,7 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 
/* security_priv */
psecuritypriv->binstallGrpkey = _FAIL;
-   psecuritypriv->sw_encrypt = pregistrypriv->software_encrypt;
+   psecuritypriv->sw_encrypt = 0;
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
psecuritypriv->dot11PrivacyKeyIndex = 0;
-- 
2.10.2

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


[PATCH 6/6] staging:r8188eu: remove sw_encrypt member of security_priv struct

2017-04-02 Thread Ivan Safonov
sw_encrypt always is 0. Replace sw_encrypt with 0.

Signed-off-by: Ivan Safonov 
---
 drivers/staging/rtl8188eu/core/rtw_xmit.c| 10 --
 drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c   |  3 +--
 drivers/staging/rtl8188eu/include/rtw_security.h |  1 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c  |  1 -
 4 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c 
b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index 1dcb4eb..1470a2e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -587,15 +587,13 @@ static s32 update_attrib(struct adapter *padapter, struct 
sk_buff *pkt, struct p
}
 
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_,
-("update_attrib: encrypt=%d  securitypriv.sw_encrypt=%d\n",
- pattrib->encrypt, padapter->securitypriv.sw_encrypt));
+("update_attrib: encrypt=%d\n", pattrib->encrypt));
 
-   if (pattrib->encrypt &&
-   (padapter->securitypriv.sw_encrypt || 
!psecuritypriv->hw_decrypted)) {
+   if (pattrib->encrypt && !psecuritypriv->hw_decrypted) {
pattrib->bswenc = true;
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_,
-("update_attrib: encrypt=%d 
securitypriv.hw_decrypted=%d bswenc = true\n",
- pattrib->encrypt, padapter->securitypriv.sw_encrypt));
+("update_attrib: encrypt=%d bswenc = true\n",
+ pattrib->encrypt));
} else {
pattrib->bswenc = false;
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("update_attrib: 
bswenc = false\n"));
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c 
b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
index c7e1955..a9912b6 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
@@ -346,7 +346,6 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct 
xmit_frame *pxmitframe)
struct xmit_buf *pxmitbuf = pxmitframe->pxmitbuf;
struct pkt_attrib *pattrib = >attrib;
struct xmit_priv *pxmitpriv = >xmitpriv;
-   struct security_priv *psecuritypriv = >securitypriv;
 
if ((pxmitframe->frame_tag == DATA_FRAMETAG) &&
(pxmitframe->attrib.ether_type != 0x0806) &&
@@ -366,7 +365,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct 
xmit_frame *pxmitframe)
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, 
("pattrib->nr_frags=%d\n", pattrib->nr_frags));
 
sz = pxmitpriv->frag_len;
-   sz = sz - 4 - (psecuritypriv->sw_encrypt ? 0 : 
pattrib->icv_len);
+   sz = sz - 4 - pattrib->icv_len;
} else {
/* no frag */
sz = pattrib->last_txcmdsz;
diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h 
b/drivers/staging/rtl8188eu/include/rtw_security.h
index 2eda677..74fe664 100644
--- a/drivers/staging/rtl8188eu/include/rtw_security.h
+++ b/drivers/staging/rtl8188eu/include/rtw_security.h
@@ -133,7 +133,6 @@ struct security_priv {
u8  busetkipkey;
u8  bcheck_grpkey;
u8  bgrpkey_handshake;
-   s32 sw_encrypt;/* from registry_priv */
s32 hw_decrypted;/* if the rx packets is hw_decrypted==false,i
  * it means the hw has not been ready. */
 
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index fecbedd..add1ba0 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -388,7 +388,6 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 
/* security_priv */
psecuritypriv->binstallGrpkey = _FAIL;
-   psecuritypriv->sw_encrypt = 0;
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
psecuritypriv->dot11PrivacyKeyIndex = 0;
-- 
2.10.2

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


[PATCH 4/6] staging:r8188eu: replace rtw_software_encrypt with its default value

2017-04-02 Thread Ivan Safonov
rtw_software_encrypt used only once and does not changed.
Replace it with 0.

Signed-off-by: Ivan Safonov 
---
 drivers/staging/rtl8188eu/os_dep/os_intfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 8fee58f..ccae39f 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -49,8 +49,6 @@ MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 
 static int rtw_debug = 1;
 
-static int rtw_software_encrypt;
-
 static int rtw_acm_method;/*  0:By SW 1:By HW. */
 
 static int rtw_wmm_enable = 1;/*  default is set to enable the wmm. */
@@ -165,7 +163,7 @@ static void loadparam(struct adapter *padapter, struct 
net_device *pnetdev)
registry_par->power_mgnt = (u8)rtw_power_mgnt;
registry_par->ips_mode = (u8)rtw_ips_mode;
registry_par->mp_mode = 0;
-   registry_par->software_encrypt = (u8)rtw_software_encrypt;
+   registry_par->software_encrypt = 0;
registry_par->acm_method = (u8)rtw_acm_method;
 
 /* UAPSD */
-- 
2.10.2

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


[PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value

2017-04-02 Thread Ivan Safonov
rtw_software_decrypt used only once and does not changed.
Replace it with 0.

Signed-off-by: Ivan Safonov 
---
 drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 5f6a245..f1c8bbc 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -50,7 +50,6 @@ MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 static int rtw_debug = 1;
 
 static int rtw_software_encrypt;
-static int rtw_software_decrypt;
 
 static int rtw_acm_method;/*  0:By SW 1:By HW. */
 
@@ -167,7 +166,7 @@ static void loadparam(struct adapter *padapter, struct 
net_device *pnetdev)
registry_par->ips_mode = (u8)rtw_ips_mode;
registry_par->mp_mode = 0;
registry_par->software_encrypt = (u8)rtw_software_encrypt;
-   registry_par->software_decrypt = (u8)rtw_software_decrypt;
+   registry_par->software_decrypt = 0;
registry_par->acm_method = (u8)rtw_acm_method;
 
 /* UAPSD */
-- 
2.10.2

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


[PATCH 2/6] staging:r8188eu: remove software_decrypt member of registry_priv struct

2017-04-02 Thread Ivan Safonov
Value of this variable has no changes, and used once.
Replace software_decrypt with its value.

Signed-off-by: Ivan Safonov 
---
 drivers/staging/rtl8188eu/include/drv_types.h | 1 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/drv_types.h 
b/drivers/staging/rtl8188eu/include/drv_types.h
index 0fd2a2d..8bcb170 100644
--- a/drivers/staging/rtl8188eu/include/drv_types.h
+++ b/drivers/staging/rtl8188eu/include/drv_types.h
@@ -66,7 +66,6 @@ struct registry_priv {
u8  smart_ps;
u8  mp_mode;
u8  software_encrypt;
-   u8  software_decrypt;
u8  acm_method;
  /* UAPSD */
u8  wmm_enable;
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index f1c8bbc..451deb0 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -166,7 +166,6 @@ static void loadparam(struct adapter *padapter, struct 
net_device *pnetdev)
registry_par->ips_mode = (u8)rtw_ips_mode;
registry_par->mp_mode = 0;
registry_par->software_encrypt = (u8)rtw_software_encrypt;
-   registry_par->software_decrypt = 0;
registry_par->acm_method = (u8)rtw_acm_method;
 
 /* UAPSD */
@@ -393,7 +392,7 @@ static u8 rtw_init_default_value(struct adapter *padapter)
/* security_priv */
psecuritypriv->binstallGrpkey = _FAIL;
psecuritypriv->sw_encrypt = pregistrypriv->software_encrypt;
-   psecuritypriv->sw_decrypt = pregistrypriv->software_decrypt;
+   psecuritypriv->sw_decrypt = 0;
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
psecuritypriv->dot11PrivacyKeyIndex = 0;
-- 
2.10.2

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


Re: [PATCH] staging:iio:accel:adis16029 fixed checkpatch issue - drop braces around single if statement

2017-04-02 Thread Jonathan Cameron
See patch title. Check the part number...

On 29/03/17 09:36, Andrea della Porta wrote:
> Fixed the followinf checkpatch warning:
> WARNING: braces {} are not necessary for single statement blocks
> #258: FILE: drivers/staging/iio/accel/adis16209.c:258:
> + if (ret) {
> + return ret;
> + }
> 
> Signed-off-by: Andrea della Porta 
Was fixed about a week ago by Mark Stenglein.

Patch has made it through the IIO tree to staging yet though.
Should be heading that way this afternoon (depending on how
long Greg's backlog of emails still is ;)

Jonathan
> ---
>  drivers/staging/iio/accel/adis16209.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16209.c 
> b/drivers/staging/iio/accel/adis16209.c
> index 52fa2e0..159a687 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -255,9 +255,9 @@ static int adis16209_read_raw(struct iio_dev *indio_dev,
>   }
>   addr = adis16209_addresses[chan->scan_index][0];
>   ret = adis_read_reg_16(st, addr, );
> - if (ret) {
> + if (ret)
>   return ret;
> - }
> +
>   val16 &= (1 << bits) - 1;
>   val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
>   *val = val16;
> 

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


Re: [PATCH] staging: iio: ad9832: use 4-digit octal permissions

2017-04-02 Thread Jonathan Cameron
On 30/03/17 10:55, Guru Das Srinagesh wrote:
> This fixes the coding style issue of using S_IWUSR in place of 4-digit
> octal numbers.
> 
> Issue detected by checkpatch.
> 
> Signed-off-by: Guru Das Srinagesh 
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Most of these if not all should go away when this driver gets properly
cleaned up, but in the meantime I guess it's just about worth making this
change.

Jonathan
> ---
>  drivers/staging/iio/frequency/ad9832.c | 20 ++--
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/iio/frequency/ad9832.c 
> b/drivers/staging/iio/frequency/ad9832.c
> index 425b8ab..6da46ed 100644
> --- a/drivers/staging/iio/frequency/ad9832.c
> +++ b/drivers/staging/iio/frequency/ad9832.c
> @@ -250,22 +250,22 @@ static ssize_t ad9832_write(struct device *dev, struct 
> device_attribute *attr,
>   * see dds.h for further information
>   */
>  
> -static IIO_DEV_ATTR_FREQ(0, 0, S_IWUSR, NULL, ad9832_write, AD9832_FREQ0HM);
> -static IIO_DEV_ATTR_FREQ(0, 1, S_IWUSR, NULL, ad9832_write, AD9832_FREQ1HM);
> -static IIO_DEV_ATTR_FREQSYMBOL(0, S_IWUSR, NULL, ad9832_write, 
> AD9832_FREQ_SYM);
> +static IIO_DEV_ATTR_FREQ(0, 0, 0200, NULL, ad9832_write, AD9832_FREQ0HM);
> +static IIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);
> +static IIO_DEV_ATTR_FREQSYMBOL(0, 0200, NULL, ad9832_write, AD9832_FREQ_SYM);
>  static IIO_CONST_ATTR_FREQ_SCALE(0, "1"); /* 1Hz */
>  
> -static IIO_DEV_ATTR_PHASE(0, 0, S_IWUSR, NULL, ad9832_write, AD9832_PHASE0H);
> -static IIO_DEV_ATTR_PHASE(0, 1, S_IWUSR, NULL, ad9832_write, AD9832_PHASE1H);
> -static IIO_DEV_ATTR_PHASE(0, 2, S_IWUSR, NULL, ad9832_write, AD9832_PHASE2H);
> -static IIO_DEV_ATTR_PHASE(0, 3, S_IWUSR, NULL, ad9832_write, AD9832_PHASE3H);
> -static IIO_DEV_ATTR_PHASESYMBOL(0, S_IWUSR, NULL,
> +static IIO_DEV_ATTR_PHASE(0, 0, 0200, NULL, ad9832_write, AD9832_PHASE0H);
> +static IIO_DEV_ATTR_PHASE(0, 1, 0200, NULL, ad9832_write, AD9832_PHASE1H);
> +static IIO_DEV_ATTR_PHASE(0, 2, 0200, NULL, ad9832_write, AD9832_PHASE2H);
> +static IIO_DEV_ATTR_PHASE(0, 3, 0200, NULL, ad9832_write, AD9832_PHASE3H);
> +static IIO_DEV_ATTR_PHASESYMBOL(0, 0200, NULL,
>   ad9832_write, AD9832_PHASE_SYM);
>  static IIO_CONST_ATTR_PHASE_SCALE(0, "0.0015339808"); /* 2PI/2^12 rad*/
>  
> -static IIO_DEV_ATTR_PINCONTROL_EN(0, S_IWUSR, NULL,
> +static IIO_DEV_ATTR_PINCONTROL_EN(0, 0200, NULL,
>   ad9832_write, AD9832_PINCTRL_EN);
> -static IIO_DEV_ATTR_OUT_ENABLE(0, S_IWUSR, NULL,
> +static IIO_DEV_ATTR_OUT_ENABLE(0, 0200, NULL,
>   ad9832_write, AD9832_OUTPUT_EN);
>  
>  static struct attribute *ad9832_attributes[] = {
> 

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


Re: [PATCH] staging: iio: meter: Replace mlock with driver private buf_lock

2017-04-02 Thread Jonathan Cameron
On 31/03/17 03:47, Arushi Singhal wrote:
> The driver needs to insure atomicity during frequency
> changes of bus and device. The iiodev->mlock as used
> was not doing that. Replace it with the drivers existing
> buffer lock and execute spi_write directly.
> 
> Signed-off-by: Arushi Singhal 
Firstly please put the driver name in the title when a patch only
effects one driver.

Secondly, please see final version of Gargi Sharma's patch for
the ade7754.

As with that one, the basic principle is fine, but I didn't
like the V2 version which did the local copy of spi_write as
you have here.

Introduced an unlocked version of the ade7759_spi_write_reg_16
function and call it both from ade7759_spi_write_reg_16 and
directly here.

Puts the _WRITE_REG magic all in one place.

Otherwise, looks good!

Jonathan
> ---
>  drivers/staging/iio/meter/ade7759.c | 9 ++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/meter/ade7759.c 
> b/drivers/staging/iio/meter/ade7759.c
> index 0b65f1847510..a5ee4501d30a 100644
> --- a/drivers/staging/iio/meter/ade7759.c
> +++ b/drivers/staging/iio/meter/ade7759.c
> @@ -429,7 +429,7 @@ static ssize_t ade7759_write_frequency(struct device *dev,
>   if (!val)
>   return -EINVAL;
>  
> - mutex_lock(_dev->mlock);
> + mutex_lock(>buf_lock);
>  
>   t = 27900 / val;
>   if (t > 0)
> @@ -447,10 +447,13 @@ static ssize_t ade7759_write_frequency(struct device 
> *dev,
>   reg &= ~(3 << 13);
>   reg |= t << 13;
>  
> - ret = ade7759_spi_write_reg_16(dev, ADE7759_MODE, reg);
> + st->tx[0] = ADE7759_WRITE_REG(ADE7759_MODE);
> + st->tx[1] = reg;
> +
> + ret = spi_write(st->us, st->tx, 2);
>  
>  out:
> - mutex_unlock(_dev->mlock);
> + mutex_unlock(>buf_lock);
>  
>   return ret ? ret : len;
>  }
> 

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


Re: [PATCH 2/3] staging: iio: frequency: Remove useless type conversion

2017-04-02 Thread Jonathan Cameron
On 31/03/17 16:08, simran singhal wrote:
> Some type conversions like casting a pointer to a pointer of same type,
> casting to the original type using addressof(&) operator etc. are not
> needed. Therefore, remove them. Done using coccinelle:
> 
> @@
> type t;
> t *p;
> t a;
> @@
> (
> - (t)(a)
> + a
> |
> - (t *)(p)
> + p
> |
> - (t *)()
> + 
> )
> 
> Signed-off-by: simran singhal 
driver name in title please, plus a patch description rather more tailored
to the patch. 

> ---
>  drivers/staging/iio/frequency/ad9832.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/frequency/ad9832.c 
> b/drivers/staging/iio/frequency/ad9832.c
> index 425b8ab..01bdf8e 100644
> --- a/drivers/staging/iio/frequency/ad9832.c
> +++ b/drivers/staging/iio/frequency/ad9832.c
> @@ -119,7 +119,7 @@ struct ad9832_state {
>  static unsigned long ad9832_calc_freqreg(unsigned long mclk, unsigned long 
> fout)
>  {
>   unsigned long long freqreg = (u64)fout *
> -  (u64)((u64)1L << AD9832_FREQ_BITS);
> +  (u64)1L << AD9832_FREQ_BITS;
>   do_div(freqreg, mclk);
>   return freqreg;
>  }
> 

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


Re: [PATCH 3/3] staging: iio: light: Remove useless type conversion

2017-04-02 Thread Jonathan Cameron
On 31/03/17 16:08, simran singhal wrote:
> Some type conversions like casting a pointer to a pointer of same type,
> casting to the original type using addressof(&) operator etc. are not
> needed. Therefore, remove them. Done using coccinelle:
> 
> @@
> type t;
> t *p;
> t a;
> @@
> (
> - (t)(a)
> + a
> |
> - (t *)(p)
> + p
> |
> - (t *)()
> + 
> )
> 
Description is largely irrelevant.  Please tailor it to the patch.
Also if only effecting one driver, the title should include the name of
the driver.
> Signed-off-by: simran singhal 
> ---
>  drivers/staging/iio/light/tsl2x7x_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2x7x_core.c 
> b/drivers/staging/iio/light/tsl2x7x_core.c
> index ea15bc1..0490c1d 100644
> --- a/drivers/staging/iio/light/tsl2x7x_core.c
> +++ b/drivers/staging/iio/light/tsl2x7x_core.c
> @@ -624,7 +624,7 @@ static int tsl2x7x_als_calibrate(struct iio_dev 
> *indio_dev)
>   dev_info(>client->dev,
>"%s als_calibrate completed\n", chip->client->name);
>  
> - return (int)gain_trim_val;
> + return gain_trim_val;
>  }
>  
>  static int tsl2x7x_chip_on(struct iio_dev *indio_dev)
> 

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


Re: [PATCH 1/3] staging: iio: accel: Remove useless type conversion

2017-04-02 Thread Jonathan Cameron
On 31/03/17 16:08, simran singhal wrote:
> Some type conversions like casting a pointer to a pointer of same type,
> casting to the original type using addressof(&) operator etc. are not
> needed. Therefore, remove them. Done using coccinelle:
Please write a more specific commit message.  No where in here
for example is that particular case relevant as we aren't ever looking
at pointers.

More stuff below.  There's a better way of improving this code!
> 
> @@
> type t;
> t *p;
> t a;
> @@
> (
> - (t)(a)
> + a
> |
> - (t *)(p)
> + p
> |
> - (t *)()
> + 
> )
> 
> Signed-off-by: simran singhal 
> ---
>  drivers/staging/iio/accel/adis16201.c | 2 +-
>  drivers/staging/iio/accel/adis16203.c | 2 +-
>  drivers/staging/iio/accel/adis16209.c | 2 +-
>  drivers/staging/iio/accel/adis16240.c | 6 +++---
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16201.c 
> b/drivers/staging/iio/accel/adis16201.c
> index fbc2406..b7381d3 100644
> --- a/drivers/staging/iio/accel/adis16201.c
> +++ b/drivers/staging/iio/accel/adis16201.c
> @@ -228,7 +228,7 @@ static int adis16201_read_raw(struct iio_dev *indio_dev,
>   if (ret)
>   return ret;
>   val16 &= (1 << bits) - 1;
> - val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> + val16 = val16 << (16 - bits) >> (16 - bits);
hmm. bits is integer and val16 an s16
*looks up type promotion rules*

Hohum. I hope someone else will check I get this right.

Both instances of 16-bits will be signed integers.
val16 will get promoted to a signed integer as well.

Had it been a u16 value this would all have been necessary
to ensure that the final right shift was pulling in ones.

So all in all this looks like the cast is probably there to suppress
a warning if the compiler isn't clever enough to figure out it will never
truncate unecessarily.

However, the fun thing about this is to take a look at what it is
actually doing.  It's doing sign extension to an s16, then just below
assigns it to an int.

So how could you do that better?

search for sign_extend32 and see what you can do with it.

It's actually a more recent introduction to the kernel than this driver
(IIRC) so not surprising it isn't already being used here.
 
>   *val = val16;
>   return IIO_VAL_INT;
>   }
> diff --git a/drivers/staging/iio/accel/adis16203.c 
> b/drivers/staging/iio/accel/adis16203.c
> index b59755a..25e5e52 100644
> --- a/drivers/staging/iio/accel/adis16203.c
> +++ b/drivers/staging/iio/accel/adis16203.c
> @@ -211,7 +211,7 @@ static int adis16203_read_raw(struct iio_dev *indio_dev,
>   return ret;
>   }
>   val16 &= (1 << bits) - 1;
> - val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> + val16 = val16 << (16 - bits) >> (16 - bits);
>   *val = val16;
>   mutex_unlock(_dev->mlock);
>   return IIO_VAL_INT;
> diff --git a/drivers/staging/iio/accel/adis16209.c 
> b/drivers/staging/iio/accel/adis16209.c
> index 52fa2e0..7aac310 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -259,7 +259,7 @@ static int adis16209_read_raw(struct iio_dev *indio_dev,
>   return ret;
>   }
>   val16 &= (1 << bits) - 1;
> - val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> + val16 = val16 << (16 - bits) >> (16 - bits);
>   *val = val16;
>   return IIO_VAL_INT;
>   }
> diff --git a/drivers/staging/iio/accel/adis16240.c 
> b/drivers/staging/iio/accel/adis16240.c
> index 6e3c95c..2c55b65 100644
> --- a/drivers/staging/iio/accel/adis16240.c
> +++ b/drivers/staging/iio/accel/adis16240.c
> @@ -220,7 +220,7 @@ static ssize_t adis16240_spi_read_signed(struct device 
> *dev,
>   if (val & ADIS16240_ERROR_ACTIVE)
>   adis_check_status(st);
>  
> - val = (s16)(val << shift) >> shift;
> + val = val << shift >> shift;
>   return sprintf(buf, "%d\n", val);
>  }
>  
> @@ -294,7 +294,7 @@ static int adis16240_read_raw(struct iio_dev *indio_dev,
>   return ret;
>   }
>   val16 &= (1 << bits) - 1;
> - val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> + val16 = val16 << (16 - bits) >> (16 - bits);
>   *val = val16;
>   return IIO_VAL_INT;
>   case IIO_CHAN_INFO_PEAK:
> @@ -305,7 +305,7 @@ static int adis16240_read_raw(struct iio_dev *indio_dev,
>   return ret;
>   }
>   val16 &= (1 << bits) - 1;
> - val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> + val16 = val16 << (16 - bits) >> (16 - bits);
>   *val = val16;
>   return IIO_VAL_INT;
>   }
> 

___
devel mailing 

Re: [PATCH v2] iio: gyro: adis16060: Change the name of function.

2017-04-02 Thread Jonathan Cameron
On 31/03/17 11:21, simran singhal wrote:
> Change the name of function from adis16060_spi_write_than_read()
> to adis16060_spi_write_then_read(). change "than" to "then" as
> its time depended.
> 
> Signed-off-by: simran singhal 
Applied.
> ---
> 
>  v2:
>-Change the subject.
>-Add signed-off-by.
> 
>  drivers/staging/iio/gyro/adis16060_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/gyro/adis16060_core.c 
> b/drivers/staging/iio/gyro/adis16060_core.c
> index 8115962..9675245 100644
> --- a/drivers/staging/iio/gyro/adis16060_core.c
> +++ b/drivers/staging/iio/gyro/adis16060_core.c
> @@ -40,7 +40,7 @@ struct adis16060_state {
>  
>  static struct iio_dev *adis16060_iio_dev;
>  
> -static int adis16060_spi_write_than_read(struct iio_dev *indio_dev,
> +static int adis16060_spi_write_then_read(struct iio_dev *indio_dev,
>u8 conf, u16 *val)
>  {
>   int ret;
> @@ -81,7 +81,7 @@ static int adis16060_read_raw(struct iio_dev *indio_dev,
>  
>   switch (mask) {
>   case IIO_CHAN_INFO_RAW:
> - ret = adis16060_spi_write_than_read(indio_dev,
> + ret = adis16060_spi_write_then_read(indio_dev,
>   chan->address, );
>   if (ret < 0)
>   return ret;
> 

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


Re: [PATCH] staging: vt6656: Fix spaces, char limit and embedded func name in print.

2017-04-02 Thread Greg KH
On Sat, Apr 01, 2017 at 08:29:00PM -0700, Daniel Cashman wrote:
> From: Dan Cashman 
> 
> Address errors and warning found in rf.c by checkpatch kernel style script.
> Specifically, change spaces to tabs, split function arguments across a new
> line to avoid 80 character limit, and remove use of embedded function name
> in a dev_dbg() call.

That's a lot of different things all in one patch, please break this up
into doing only one type of thing per patch.

thanks,

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