drivers/staging/ks7010/ks_wlan_net.c:1287: suspicious if ?

2016-08-01 Thread David Binderman
Hello there,

drivers/staging/ks7010/ks_wlan_net.c:1287:13: warning: duplicated ‘if’
condition [-Wduplicated-cond]

Source code is

} else if (enabled) {   /* 1 */
if (priv->reg.operation_mode == MODE_INFRASTRUCTURE)
priv->reg.powermgt = POWMGT_SAVE1_MODE;
else
return -EINVAL;
} else if (enabled) {   /* 2 */

I am not sure of a suitable fix for this.

Regards

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


[PATCH] Staging:android: fix alignment match open paranthesis

2016-08-01 Thread ksourav
This is a patch to fix alignment should match open paranthesis
warning given by checkpatch.pl in files sw_sync.c and sync_debug.c

Signed-off-by: ksourav 
---
 drivers/staging/android/sw_sync.c| 6 +++---
 drivers/staging/android/sync_debug.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/android/sw_sync.c 
b/drivers/staging/android/sw_sync.c
index 115c917..ce3f3ec 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -134,7 +134,7 @@ static void sync_timeline_signal(struct sync_timeline *obj, 
unsigned int inc)
  * NULL in case of error.
  */
 static struct sync_pt *sync_pt_create(struct sync_timeline *obj, int size,
-unsigned int value)
+ unsigned int value)
 {
unsigned long flags;
struct sync_pt *pt;
@@ -204,13 +204,13 @@ static bool timeline_fence_enable_signaling(struct fence 
*fence)
 }
 
 static void timeline_fence_value_str(struct fence *fence,
-   char *str, int size)
+char *str, int size)
 {
snprintf(str, size, "%d", fence->seqno);
 }
 
 static void timeline_fence_timeline_value_str(struct fence *fence,
-char *str, int size)
+ char *str, int size)
 {
struct sync_timeline *parent = fence_parent(fence);
 
diff --git a/drivers/staging/android/sync_debug.c 
b/drivers/staging/android/sync_debug.c
index 4c5a855..eaa79b9 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -92,7 +92,7 @@ static void sync_print_fence(struct seq_file *s, struct fence 
*fence, bool show)
}
 
if (fence->ops->timeline_value_str &&
-   fence->ops->fence_value_str) {
+   fence->ops->fence_value_str) {
char value[64];
bool success;
 
@@ -103,7 +103,7 @@ static void sync_print_fence(struct seq_file *s, struct 
fence *fence, bool show)
seq_printf(s, ": %s", value);
 
fence->ops->timeline_value_str(fence, value,
-  sizeof(value));
+   sizeof(value));
 
if (strlen(value))
seq_printf(s, " / %s", value);
@@ -130,7 +130,7 @@ static void sync_print_obj(struct seq_file *s, struct 
sync_timeline *obj)
 }
 
 static void sync_print_sync_file(struct seq_file *s,
- struct sync_file *sync_file)
+struct sync_file *sync_file)
 {
int i;
 
-- 
2.7.4 (Apple Git-66)

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


[PATCH] drivers: wilc1000: remove references to semaphores

2016-08-01 Thread Joshua Houghton
* Update the comments that refer to semaphores
* Remove redundant includes to semphore.h

Signed-off-by: Joshua Houghton 
---
 drivers/staging/wilc1000/TODO | 1 -
 drivers/staging/wilc1000/linux_wlan.c | 1 -
 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +-
 drivers/staging/wilc1000/wilc_wlan.h  | 2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h   | 1 -
 5 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/TODO b/drivers/staging/wilc1000/TODO
index ec93b2e..ae61b55 100644
--- a/drivers/staging/wilc1000/TODO
+++ b/drivers/staging/wilc1000/TODO
@@ -3,7 +3,6 @@ TODO:
 - remove OS wrapper functions
 - remove custom debug and tracing functions
 - rework comments and function headers(also coding style)
-- replace all semaphores with mutexes or completions
 - Move handling for each individual members of 'union message_body' out
   into a separate 'struct work_struct' and completely remove the multiplexer
   that is currently part of host_if_work(), allowing movement of the
diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 3a66255..315ed2e 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -21,7 +21,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 static int dev_state_ev_handler(struct notifier_block *this,
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h 
b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index 5cc6a82..ec6b167 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -131,7 +131,7 @@ struct wilc_priv {
struct wilc_wfi_key *wilc_gtk[MAX_NUM_STA];
struct wilc_wfi_key *wilc_ptk[MAX_NUM_STA];
u8 wilc_groupkey;
-   /* semaphores */
+   /* mutexes */
struct mutex scan_req_lock;
/*  */
bool gbAutoRateAdjusted;
diff --git a/drivers/staging/wilc1000/wilc_wlan.h 
b/drivers/staging/wilc1000/wilc_wlan.h
index 30e5312..739900e 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -192,7 +192,7 @@
 
 #define ENABLE_RX_VMM  (SEL_VMM_TBL1 | EN_VMM)
 #define ENABLE_TX_VMM  (SEL_VMM_TBL0 | EN_VMM)
-/*time for expiring the semaphores of cfg packets*/
+/*time for expiring the completion of cfg packets*/
 #define CFG_PKTS_TIMEOUT   2000
 /
  *
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h 
b/drivers/staging/wilc1000/wilc_wlan_if.h
index 410bfc0..439ac6f 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -10,7 +10,6 @@
 #ifndef WILC_WLAN_IF_H
 #define WILC_WLAN_IF_H
 
-#include 
 #include 
 
 /
-- 
2.9.2


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


[PATCH] staging: fbtft: This patch fixes the checkpatch.pl warning

2016-08-01 Thread Prit Raj
WARNING: Statements should start on a tabstop

Signed-off-by: Prit Raj 
---
 drivers/staging/fbtft/fb_agm1264k-fl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c 
b/drivers/staging/fbtft/fb_agm1264k-fl.c
index 82b46cd..7561385 100644
--- a/drivers/staging/fbtft/fb_agm1264k-fl.c
+++ b/drivers/staging/fbtft/fb_agm1264k-fl.c
@@ -350,8 +350,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, 
size_t len)
}
}
 
-/* 1 string = 2 pages */
-for (y = addr_win.ys_page; y <= addr_win.ye_page; ++y) {
+   /* 1 string = 2 pages */
+   for (y = addr_win.ys_page; y <= addr_win.ye_page; ++y) {
/* left half of display */
if (addr_win.xs < par->info->var.xres / 2) {
construct_line_bitmap(par, buf, convert_buf,
-- 
2.7.4

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