[PATCH] staging: rts5139: Make variables inside #ifdef CONFIG_PM

2014-04-06 Thread Geert Uytterhoeven
If CONFIG_PM=n:

drivers/staging/rts5139/rts51x_transport.c:649: warning: ‘media_not_present’ 
defined but not used
drivers/staging/rts5139/rts51x_transport.c:651: warning: ‘invalid_cmd_field’ 
defined but not used

Move the variables inside the #ifdef CONFIG_PM, and make them const while
we're at it.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 drivers/staging/rts5139/rts51x_transport.c |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rts5139/rts51x_transport.c 
b/drivers/staging/rts5139/rts51x_transport.c
index 74588d249b32..0db1345df94e 100644
--- a/drivers/staging/rts5139/rts51x_transport.c
+++ b/drivers/staging/rts5139/rts51x_transport.c
@@ -646,16 +646,18 @@ int rts51x_get_epc_status(struct rts51x_chip *chip, u16 
*status)
chip-usb-intr_urb-actual_length);
 }
 
-static u8 media_not_present[] = {
-   0x70, 0, 0x02, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0x3A, 0, 0, 0, 0, 0 };
-static u8 invalid_cmd_field[] = {
-   0x70, 0, 0x05, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0x24, 0, 0, 0, 0, 0 };
-
 void rts51x_invoke_transport(struct scsi_cmnd *srb, struct rts51x_chip *chip)
 {
int result;
 
 #ifdef CONFIG_PM
+   static const u8 media_not_present[] = {
+   0x70, 0, 0x02, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0x3A, 0, 0, 0, 0, 0
+   };
+   static const u8 invalid_cmd_field[] = {
+   0x70, 0, 0x05, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0x24, 0, 0, 0, 0, 0
+   };
+
if (chip-option.ss_en) {
if (srb-cmnd[0] == TEST_UNIT_READY) {
if (RTS51X_CHK_STAT(chip, STAT_SS)) {
-- 
1.7.9.5

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


[PATCHv3 1/1] staging: sep: Fix coding style

2014-04-06 Thread Camille Bordignon
Signed-off-by: Camille Bordignon camille.bordig...@gmail.com
---
Fix coding style warning Missing a blank line after declarations
---
diff --git a/drivers/staging/sep/sep_crypto.c
b/drivers/staging/sep/sep_crypto.c
index 965485f..415f8ec 100644
--- a/drivers/staging/sep/sep_crypto.c
+++ b/drivers/staging/sep/sep_crypto.c
@@ -93,6 +93,7 @@ static void sep_do_callback(struct work_struct *work)
 {
struct sep_work_struct *sep_work = container_of(work,
struct sep_work_struct, work);
+
if (sep_work != NULL) {
(sep_work-callback)(sep_work-data);
kfree(sep_work);
@@ -649,6 +650,7 @@ weak:
 static u32 sep_sg_nents(struct scatterlist *sg)
 {
u32 ct1 = 0;
+
while (sg) {
ct1 += 1;
sg = sg_next(sg);
@@ -666,6 +668,7 @@ static u32 sep_sg_nents(struct scatterlist *sg)
 static u32 sep_start_msg(struct this_task_ctx *ta_ctx)
 {
u32 *word_ptr;
+
ta_ctx-msg_len_words = 2;
ta_ctx-msgptr = ta_ctx-msg;
memset(ta_ctx-msg, 0, SEP_DRIVER_MESSAGE_SHARED_AREA_SIZE_IN_BYTES);
@@ -740,6 +743,7 @@ static void sep_write_msg(struct this_task_ctx
*ta_ctx, void *in_addr,
 {
u32 *word_ptr;
void *void_ptr;
+
void_ptr = ta_ctx-msgptr + *msg_offset;
word_ptr = (u32 *)void_ptr;
memcpy(void_ptr, in_addr, size);
@@ -748,6 +752,7 @@ static void sep_write_msg(struct this_task_ctx
*ta_ctx, void *in_addr,
/* Do we need to manipulate endian? */
if (byte_array) {
u32 i;
+
for (i = 0; i  ((size + 3) / 4); i += 1)
*(word_ptr + i) = CHG_ENDIAN(*(word_ptr + i));
}
@@ -788,12 +793,14 @@ static void sep_read_msg(struct this_task_ctx
*ta_ctx, void *in_addr,
 {
u32 *word_ptr;
void *void_ptr;
+
void_ptr = ta_ctx-msgptr + *msg_offset;
word_ptr = (u32 *)void_ptr;
 
/* Do we need to manipulate endian? */
if (byte_array) {
u32 i;
+
for (i = 0; i  ((size + 3) / 4); i += 1)
*(word_ptr + i) = CHG_ENDIAN(*(word_ptr + i));
}
@@ -865,6 +872,7 @@ static void sep_read_context(struct this_task_ctx
*ta_ctx, u32 *msg_offset,
void *dst, u32 len)
 {
u32 max_length = ((len + 3) / sizeof(u32)) * sizeof(u32);
+
sep_read_msg(ta_ctx, dst, len, max_length, msg_offset, 0);
 }
 
@@ -884,6 +892,7 @@ static void sep_write_context(struct this_task_ctx
*ta_ctx, u32 *msg_offset,
void *src, u32 len)
 {
u32 max_length = ((len + 3) / sizeof(u32)) * sizeof(u32);
+
sep_write_msg(ta_ctx, src, len, max_length, msg_offset, 0);
 }
 
@@ -3893,6 +3902,7 @@ static struct crypto_alg crypto_algs[] = {
 int sep_crypto_setup(void)
 {
int err, i, j, k;
+
tasklet_init(sep_dev-finish_tasklet, sep_finish,
(unsigned long)sep_dev);
 
diff --git a/drivers/staging/sep/sep_dev.h
b/drivers/staging/sep/sep_dev.h
index 5f6a07f..bf56c06 100644
--- a/drivers/staging/sep/sep_dev.h
+++ b/drivers/staging/sep/sep_dev.h
@@ -152,6 +152,7 @@ static inline u32 sep_read_reg(struct sep_device
*dev, int reg)
 static inline void sep_wait_sram_write(struct sep_device *dev)
 {
u32 reg_val;
+
do {
reg_val = sep_read_reg(dev, HW_SRAM_DATA_READY_REG_ADDR);
} while (!(reg_val  1));


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


Re: [PATCHv3 1/1] staging: sep: Fix coding style

2014-04-06 Thread Greg KH
On Sun, Apr 06, 2014 at 06:21:27PM +0200, Camille Bordignon wrote:
 Signed-off-by: Camille Bordignon camille.bordig...@gmail.com
 ---
 Fix coding style warning Missing a blank line after declarations

No, this needs to go up above your signed-off-by:, it was the fixed
after Greg's response that could go below.

Don't worry about it, I'll edit this by hand when I apply it...

thanks,

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


[PATCH] Staging: rtl8192e: Fix sparse warning

2014-04-06 Thread Joel Pelaez Jorge

drivers/staging/rtl8192e/rtl8192e/rtl_wx.c:1323:24: warning:
symbol 'r8192_wx_handlers_def' was not declared. Should it be static

Signed-off-by: Joel Pelaez Jorge joelpel...@gmail.com
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c

index 498995d..5baa699 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -20,6 +20,8 @@
 #include linux/string.h
 #include rtl_core.h

+extern struct iw_handler_def r8192_wx_handlers_def;
+
 #define RATE_COUNT 12
 static u32 rtl8192_rates[] = {
100, 200, 550, 1100, 600, 900, 1200,
--
1.7.10.4
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8192e: Fix sparse warning

2014-04-06 Thread Greg Kroah-Hartman
On Sun, Apr 06, 2014 at 01:23:15PM -0500, Joel Pelaez Jorge wrote:
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c:1323:24: warning:
 symbol 'r8192_wx_handlers_def' was not declared. Should it be static
 
 Signed-off-by: Joel Pelaez Jorge joelpel...@gmail.com
 ---
   drivers/staging/rtl8192e/rtl8192e/rtl_wx.c |2 ++
   1 file changed, 2 insertions(+)
 
 diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c 
 b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 index 498995d..5baa699 100644
 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 @@ -20,6 +20,8 @@
   #include linux/string.h
   #include rtl_core.h
 
 +extern struct iw_handler_def r8192_wx_handlers_def;

Don't put extern in a .c file, that's never the correct solution.

thanks,

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


Re: [PATCH v2] Staging: rtl8192e: Fix sparse warning

2014-04-06 Thread Joel Pelaez Jorge

El 06/04/14 13:49, Joe Perches escribió:

On Sun, 2014-04-06 at 13:43 -0500, Joel Pelaez Jorge wrote:

Fix a sparse warning, non static symbol is no declared as such.
And fix a conflict with static function declared extern to include
rtl_wx.h header.

drivers/staging/rtl8192e/rtl8192e/rtl_wx.c:1323:24: warning:
symbol 'r8192_wx_handlers_def' was not declared. Should it be static?

Signed-off-by: Joel Pelaez Jorge joelpel...@gmail.com
---
   drivers/staging/rtl8192e/rtl8192e/rtl_wx.c |3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 498995d..f17584d 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -19,6 +19,7 @@

   #include linux/string.h
   #include rtl_core.h
+#include rtl_wx.h

   #define RATE_COUNT 12
   static u32 rtl8192_rates[] = {
@@ -1293,7 +1294,7 @@ static iw_handler r8192_private_handler[] = {
(iw_handler)r8192_wx_get_PromiscuousMode,
   };

-static struct iw_statistics *r8192_get_wireless_stats(struct net_device
*dev)
+struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
   {
struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device *ieee = priv-rtllib;


As far as I can tell, there's no reason this should
be declared in the .h file and it should stay static
and not be exposed at all.



In the source rtl_core.c is possible to use the symbol
r8192_get_wireless_stats, if WIRELESS_EXT has specifics values.

Although this scenario is unlikely to happen, is better prepare
this code for it.

Also, a better way will be delete 'extern' reference to symbol
in header file and source file.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] Staging: rtl8192e: Fix sparse warning

2014-04-06 Thread Joel Pelaez Jorge
El 06/04/14 15:26, Greg Kroah-Hartman escribió:
 On Sun, Apr 06, 2014 at 02:12:44PM -0500, Joel Pelaez Jorge wrote:
 El 06/04/14 14:01, Greg Kroah-Hartman escribió:
 On Sun, Apr 06, 2014 at 01:43:38PM -0500, Joel Pelaez Jorge wrote:
 Fix a sparse warning, non static symbol is no declared as such.
 And fix a conflict with static function declared extern to include
 rtl_wx.h header.

 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c:1323:24: warning:
 symbol 'r8192_wx_handlers_def' was not declared. Should it be static?

 Signed-off-by: Joel Pelaez Jorge joelpel...@gmail.com
 ---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

 diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 index 498995d..f17584d 100644
 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 @@ -19,6 +19,7 @@

 #include linux/string.h
 #include rtl_core.h
 +#include rtl_wx.h

 Why is this needed?


 #define RATE_COUNT 12
 static u32 rtl8192_rates[] = {
 @@ -1293,7 +1294,7 @@ static iw_handler r8192_private_handler[] = {
(iw_handler)r8192_wx_get_PromiscuousMode,
 };

 -static struct iw_statistics *r8192_get_wireless_stats(struct net_device
 *dev)
 +struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)

 Why make this global?  This doesn't have anything to do with the warning
 you are working on as described above.

 totally confused,

 greg k-h

   
 In the rtl_wx.h header declare extern 'r8192_wx_handlers_def'
 but r8192_get_wireless_stats too.
 
 I don't understand what this sentance means :(
 
 Because r8192_get_wireless_stats is used by rtl_core.h if WIRELESS_EXT
 is more that 12 but less that 17.
 
 Will that value ever change?
 
 thanks,
 
 greg k-h
 
The file: 'rtl_wx.h' is a header that defines some symbols uses
externally by 'rtl_core.c', it declare:

extern struct iw_handler_def r8192_wx_handlers_def;
struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev);

If this header is included in rtl_wx.c, fix the sparse warning, but
cause conflict with the function declaration, because in 'rtl_wx.c'
r8192_get_wireless_stats is defined as 'static'.

In the header is defined as 'extern' because is called by rtl_core.c
if the WIRELESS_EXT certain values.

By the way, WIRELESS_EXT is a define constant that indicate the
wireless extension version supported by the kernel it only up.
The better solution is remove the code that called the function, remove
the declaration and only keep 'r8192_wx_handlers_def'.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/3] Staging: rtl8192e: Fix code issues

2014-04-06 Thread Joel Pelaez Jorge
In the kernel driver: rtl8192e, exists some problems related
to source check, using the tool sparse, but for fix it, is necessary
remove a bad declaration that keep off the patch.

Because it is resolved before apply the main patch.

Joel Pelaez Jorge (2):
  Staging: rtl8192e: Remove bad 'extern' declaration
  Staging: rtl8192e: Fix sparse warning

 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c |1 +
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.h |1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

--
1.9.1

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


[PATCH 2/2] Staging: rtl8192e: Fix sparse warning

2014-04-06 Thread Joel Pelaez Jorge
Include the header 'rtl_wx.h' to 'rtl_wx.c'

'rtl_wx.h' has the declarations used for some source files of
the driver. It has:

extern struct iw_handler_def r8192_wx_handlers_def;

That fix the problem:

drivers/staging/rtl8192e/rtl8192e/rtl_wx.c:1323:24: warning:
symbol 'r8192_wx_handlers_def' was not declared. Should it be static?

Signed-off-by: Joel Pelaez Jorge joelpel...@gmail.com
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 498995d..2de95f3 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -19,6 +19,7 @@

 #include linux/string.h
 #include rtl_core.h
+#include rtl_wx.h

 #define RATE_COUNT 12
 static u32 rtl8192_rates[] = {
-- 
1.9.1


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


Re: [PATCH 2/2] Staging: rtl8192e: Fix sparse warning

2014-04-06 Thread Joe Perches
On Sun, 2014-04-06 at 16:30 -0500, Joel Pelaez Jorge wrote:
 Include the header 'rtl_wx.h' to 'rtl_wx.c'
 
 'rtl_wx.h' has the declarations used for some source files of
 the driver. It has:
 
 extern struct iw_handler_def r8192_wx_handlers_def;

Likely this extern should be
extern const struct iw_handler_def ...

---

 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +--
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c   | 2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.h   | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index c01abc2..fa087b6 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2926,8 +2926,7 @@ static int rtl8192_pci_probe(struct pci_dev *pdev,
 
dev-netdev_ops = rtl8192_netdev_ops;
 
-   dev-wireless_handlers = (struct iw_handler_def *)
-r8192_wx_handlers_def;
+   dev-wireless_handlers = r8192_wx_handlers_def;
dev-ethtool_ops = rtl819x_ethtool_ops;
 
dev-type = ARPHRD_ETHER;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 498995d..2ba5e5c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -1320,7 +1320,7 @@ static struct iw_statistics 
*r8192_get_wireless_stats(struct net_device *dev)
return wstats;
 }
 
-struct iw_handler_def  r8192_wx_handlers_def = {
+const struct iw_handler_def r8192_wx_handlers_def = {
.standard = r8192_wx_handlers,
.num_standard = ARRAY_SIZE(r8192_wx_handlers),
.private = r8192_private_handler,
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.h 
b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.h
index 6a51a25..83747eb 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.h
@@ -24,7 +24,7 @@ struct net_device;
 struct iw_handler_def;
 struct iw_statistics;
 
-extern struct iw_handler_def r8192_wx_handlers_def;
+extern const struct iw_handler_def r8192_wx_handlers_def;
 struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev);
 u16 rtl8192_11n_user_show_rates(struct net_device *dev);
 


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


[PATCH] staging/line6: Fix kzalloc coding style issue

2014-04-06 Thread L . Alberto Giménez
Pass the actual variable to sizeof instead of a type definition.

Signed-off-by: L. Alberto Giménez agime...@sysvalve.es
---
 drivers/staging/line6/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c
index 661080b..a3136b1 100644
--- a/drivers/staging/line6/pcm.c
+++ b/drivers/staging/line6/pcm.c
@@ -475,7 +475,7 @@ int line6_init_pcm(struct usb_line6 *line6,
MISSING_CASE;
}
 
-   line6pcm = kzalloc(sizeof(struct snd_line6_pcm), GFP_KERNEL);
+   line6pcm = kzalloc(sizeof(*line6pcm), GFP_KERNEL);
 
if (line6pcm == NULL)
return -ENOMEM;
-- 
1.9.1

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


Re: [PATCH v2] Staging: rtl8192e: Fix sparse warning

2014-04-06 Thread Joe Perches
On Sun, 2014-04-06 at 14:00 -0500, Joel Pelaez Jorge wrote:
 El 06/04/14 13:49, Joe Perches escribió:
  On Sun, 2014-04-06 at 13:43 -0500, Joel Pelaez Jorge wrote:
[]
  diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
[]
  -static struct iw_statistics *r8192_get_wireless_stats(struct net_device
  *dev)
  +struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
 {
 struct r8192_priv *priv = rtllib_priv(dev);
 struct rtllib_device *ieee = priv-rtllib;
 
  As far as I can tell, there's no reason this should
  be declared in the .h file and it should stay static
  and not be exposed at all.
[]
 In the source rtl_core.c is possible to use the symbol
 r8192_get_wireless_stats, if WIRELESS_EXT has specifics values.
 
 Although this scenario is unlikely to happen, is better prepare
 this code for it.

Huh?  This makes no sense to me.
Maybe you can expand a bit here.

 Also, a better way will be delete 'extern' reference to symbol
 in header file and source file.

That's what I said.

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


[PATCH] Staging: rts5139: fix coding style

2014-04-06 Thread Fabio Falzoi
fix some coding style issues in rts51x.c (from rts5139 module)
This is for task 10 of the Eudyptula challenge

Signed-off-by: Fabio Falzoi fabio.falzo...@gmail.com
---
 drivers/staging/rts5139/rts51x.c | 62 
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/rts5139/rts51x.c b/drivers/staging/rts5139/rts51x.c
index c8d06d4..b732d2a 100644
--- a/drivers/staging/rts5139/rts51x.c
+++ b/drivers/staging/rts5139/rts51x.c
@@ -273,7 +273,7 @@ static int rts51x_control_thread(void *__chip)
/* has the command timed out *already* ? */
if (test_bit(FLIDX_TIMED_OUT, chip-usb-dflags)) {
chip-srb-result = DID_ABORT  16;
-   goto SkipForAbort;
+   goto abort;
}
 
scsi_unlock(host);
@@ -291,15 +291,15 @@ static int rts51x_control_thread(void *__chip)
 */
else if (chip-srb-device-id) {
RTS51X_DEBUGP(Bad target number (%d:%d)\n,
-  chip-srb-device-id,
-  chip-srb-device-lun);
+ chip-srb-device-id,
+ chip-srb-device-lun);
chip-srb-result = DID_BAD_TARGET  16;
}
 
else if (chip-srb-device-lun  chip-max_lun) {
RTS51X_DEBUGP(Bad LUN (%d:%d)\n,
-  chip-srb-device-id,
-  chip-srb-device-lun);
+ chip-srb-device-id,
+ chip-srb-device-lun);
chip-srb-result = DID_BAD_TARGET  16;
}
 
@@ -316,7 +316,7 @@ static int rts51x_control_thread(void *__chip)
if (chip-srb-result != DID_ABORT  16)
chip-srb-scsi_done(chip-srb);
else
-SkipForAbort :
+abort :
RTS51X_DEBUGP(scsi command aborted\n);
 
/* If an abort request was received we need to signal that
@@ -433,12 +433,12 @@ static int associate_dev(struct rts51x_chip *chip, struct 
usb_interface *intf)
rts51x-pusb_intf = intf;
rts51x-ifnum = intf-cur_altsetting-desc.bInterfaceNumber;
RTS51X_DEBUGP(Vendor: 0x%04x, Product: 0x%04x, Revision: 0x%04x\n,
-  le16_to_cpu(rts51x-pusb_dev-descriptor.idVendor),
-  le16_to_cpu(rts51x-pusb_dev-descriptor.idProduct),
-  le16_to_cpu(rts51x-pusb_dev-descriptor.bcdDevice));
+ le16_to_cpu(rts51x-pusb_dev-descriptor.idVendor),
+ le16_to_cpu(rts51x-pusb_dev-descriptor.idProduct),
+ le16_to_cpu(rts51x-pusb_dev-descriptor.bcdDevice));
RTS51X_DEBUGP(Interface Subclass: 0x%02x, Protocol: 0x%02x\n,
-  intf-cur_altsetting-desc.bInterfaceSubClass,
-  intf-cur_altsetting-desc.bInterfaceProtocol);
+ intf-cur_altsetting-desc.bInterfaceSubClass,
+ intf-cur_altsetting-desc.bInterfaceProtocol);
 
/* Store our private data in the interface */
usb_set_intfdata(intf, chip);
@@ -569,8 +569,7 @@ static int get_pipes(struct rts51x_chip *chip)
}
 
if (!ep_in || !ep_out) {
-   RTS51X_DEBUGP(Endpoint sanity check failed!
-   Rejecting dev.\n);
+   RTS51X_DEBUGP(Endpoint sanity check failed! Rejecting dev.\n);
return -EIO;
}
 
@@ -608,7 +607,8 @@ static int rts51x_acquire_resources(struct rts51x_chip 
*chip)
return -ENOMEM;
}
 
-   chip-cmd_buf = chip-rsp_buf = rts51x-iobuf;
+   chip-cmd_buf = rts51x-iobuf;
+   chip-rsp_buf = rts51x-iobuf;
 
rts51x_init_options(chip);
 
@@ -723,10 +723,10 @@ static int rts51x_probe(struct usb_interface *intf,
 
RTS51X_DEBUGP(%s detected\n, RTS51X_NAME);
 
-   rts51x = kzalloc(sizeof(struct rts51x_usb), GFP_KERNEL);
+   rts51x = kzalloc(sizeof(*rts51x), GFP_KERNEL);
if (!rts51x) {
-   printk(KERN_WARNING RTS51X_TIP
-  Unable to allocate rts51x_usb\n);
+   pr_warn(RTS51X_TIP
+   Unable to allocate rts51x_usb\n);
return -ENOMEM;
}
 
@@ -736,8 +736,8 @@ static int rts51x_probe(struct usb_interface *intf,
 */
host = scsi_host_alloc(rts51x_host_template, sizeof(*chip));
if (!host) {
-   printk(KERN_WARNING RTS51X_TIP
-  Unable to allocate the scsi host\n);
+   pr_warn(RTS51X_TIP
+   Unable to allocate the scsi host\n);
kfree(rts51x);
return -ENOMEM;
}
@@ -763,42 +763,42 @@ static int 

Re: [PATCH] Staging: rts5139: fix coding style

2014-04-06 Thread Greg KH
On Mon, Apr 07, 2014 at 12:45:05AM +0200, Fabio Falzoi wrote:
 fix some coding style issues in rts51x.c (from rts5139 module)

What specific coding style issues did you fix here?

You need to be explicit, and if you do more than one type of change in
the same patch, it needs to be broken up into different patches.

Can you please resend this based on this?

thanks,

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


Re: [PATCH 0/3] Staging: rtl8192e: Fix code issues

2014-04-06 Thread Greg Kroah-Hartman
On Sun, Apr 06, 2014 at 04:25:23PM -0500, Joel Pelaez Jorge wrote:
 In the kernel driver: rtl8192e, exists some problems related
 to source check, using the tool sparse, but for fix it, is necessary
 remove a bad declaration that keep off the patch.
 
 Because it is resolved before apply the main patch.
 
 Joel Pelaez Jorge (2):
   Staging: rtl8192e: Remove bad 'extern' declaration
   Staging: rtl8192e: Fix sparse warning

This email says 0/3, yet you only have 2 patches?

confused,

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


[PATCH] staging: r8723au: Fix build problem when RFKILL is not selected

2014-04-06 Thread Larry Finger
The kbuild test robot reports the following build errors for 
x86_64-randconfig-c1-0407:

All error/warnings:

   net/built-in.o: In function `wiphy_new':
 (.text+0x7684c): undefined reference to `rfkill_alloc'
   net/built-in.o: In function `wiphy_rfkill_start_polling':
 (.text+0x76da4): undefined reference to `rfkill_resume_polling'
   net/built-in.o: In function `wiphy_rfkill_stop_polling':
 (.text+0x76de9): undefined reference to `rfkill_pause_polling'
   net/built-in.o: In function `wiphy_unregister':
 (.text+0x76ec9): undefined reference to `rfkill_unregister'
   net/built-in.o: In function `wiphy_rfkill_set_hw_state':
 (.text+0x771bc): undefined reference to `rfkill_set_hw_state'
   net/built-in.o: In function `wiphy_register':
 (.text+0x77968): undefined reference to `rfkill_register'
   net/built-in.o: In function `wiphy_register':
 (.text+0x77981): undefined reference to `rfkill_destroy'
   net/built-in.o: In function `cfg80211_rfkill_sync_work':
 core.c:(.text+0x788ad): undefined reference to `rfkill_blocked'
   net/built-in.o: In function `cfg80211_dev_free':
 (.text+0x78a7b): undefined reference to `rfkill_destroy'
   net/built-in.o: In function `cfg80211_netdev_notifier_call':
 core.c:(.text+0x79203): undefined reference to `rfkill_blocked'
   net/built-in.o: In function `nl80211_start_p2p_device':

These undefined sysbols are all satisfied if a select RFKILL is added to
Kconfig. This fix leads to another problem as follows:

 nl80211.c:(.text+0x9032e): undefined reference to `rfkill_blocked'
net/rfkill/Kconfig:4:error: recursive dependency detected!
net/rfkill/Kconfig:4:   symbol RFKILL is selected by R8723AU
drivers/staging/rtl8723au/Kconfig:1:symbol R8723AU depends on USB
drivers/usb/Kconfig:41: symbol USB is selected by MOUSE_APPLETOUCH
drivers/input/mouse/Kconfig:162:symbol MOUSE_APPLETOUCH depends on INPUT
drivers/input/Kconfig:8:symbol INPUT is selected by ACPI_CMPC
drivers/platform/x86/Kconfig:635:   symbol ACPI_CMPC depends on RFKILL

To avoid substituting one build error for another, I added a depends on 
RFKILL.
My suspicion is that this particular error is caused by a kbuild bug, or that 
the
selection of INPUT by ACPI_CMPC is wrong. In any case, that will be solved 
separately.

Reported-by: kbuild test robot fengguang...@intel.com
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
Cc: Jes Sorensen jes.soren...@redhat.com
Cc: kbuild-...@01.org
---
 drivers/staging/rtl8723au/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/Kconfig 
b/drivers/staging/rtl8723au/Kconfig
index 78e8805..07fb5e4 100644
--- a/drivers/staging/rtl8723au/Kconfig
+++ b/drivers/staging/rtl8723au/Kconfig
@@ -1,6 +1,6 @@
 config R8723AU
tristate Realtek RTL8723AU Wireless LAN NIC driver
-   depends on WLAN  USB
+   depends on USB  WLAN  RFKILL
select WIRELESS_EXT
select WEXT_PRIV
select CFG80211
-- 
1.8.1.4

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


Re: [PATCH] staging: rtl8187se: Fix warning symbol should be static

2014-04-06 Thread Stefan Lippers-Hollmann
Hi

On Sunday 06 April 2014, Josh Triplett wrote:
 On Sun, Apr 06, 2014 at 05:46:04PM +0200, Jonas Hahnfeld wrote:
  This patch solves some sparse warnings about symbol [...] was not
  declared. Should it be static? by including the correct header files.
  
  Signed-off-by: Jonas Hahnfeld hah...@hahnjo.de
 
 Reviewed-by: Josh Triplett j...@joshtriplett.org
[...]

Given that that rtl8187se support has already been merged mainline (for
3.15-rc1) into the existing rtl8180 (soon to be renamed to rtl818x) 
driver, wouldn't it make more sense to remove 
drivers/staging/rtl8187se/ rather than trying to fixing it?

commit 1eba648f998ef9c31b8cf062754a4a7b4ab9001f
Author: Andrea Merello andrea.mere...@gmail.com
Date:   Wed Mar 26 21:04:23 2014 +0100

rtl8180: enable rtl8187se support

Finally make rtl8187se works (hopefylly).
This patch adds PCI ID for rtl8187, updates copyright notes and
updates MODULE_DESCRIPTION.

Signed-off-by: Andrea Merello andrea.mere...@gmail.com
Signed-off-by: John W. Linville linvi...@tuxdriver.com

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


Re: [PATCH v5 00/11] imx-drm dt bindings

2014-04-06 Thread Shawn Guo
On Tue, Mar 11, 2014 at 11:46:11AM +0800, Shawn Guo wrote:
 I just came across a couple problems when testing the series on
 my imx6dl-sabresd board in dual display case - HDMI + LVDS.  I tested it
 using Russell's branch below, which I believe has all the pieces put
 together.
 
   git://ftp.arm.linux.org.uk/~rmk/linux-arm.git imx-drm-staging
 
 - When I enable HDMI and LVDS support in both kernel build and device
   tree, HDMI seems working fine but LVDS color is corrupted quite badly.

Philipp,

Did you get any chance to reproduce this dual display issue?  Now it
shows on mainline kernel.

And I see another HDMI regression with my testing on mainline kernel.  I
can have my HDMI work at 1920x1080 with v3.14 kernel, but it can only
probes 1024x768 with the mainline today.  The Xorg.0.log are attached
below.  The hardware and user space are same, so I guess this is another
issue introduced by the recently kernel driver changes?

Shawn

mainline kernel
===

[20.606] (II) LoadModule: modesetting
[20.607] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[20.609] (II) Module modesetting: vendor=X.Org Foundation
[20.609]compiled for 1.12.1.902, module version = 0.3.0
[20.610]Module class: X.Org Video Driver
[20.610]ABI class: X.Org Video Driver, version 12.0
[20.610] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[20.610] (++) using VT number 7

[20.624] (WW) Falling back to old probe method for modesetting
[20.624] (II) modesetting(0): using default device
[20.627] (II) modesetting(0): Creating default Display subsection in Screen 
section
Default Screen Section for depth/fbbpp 24/32
[20.627] (==) modesetting(0): Depth 24, (==) framebuffer bpp 32
[20.628] (==) modesetting(0): RGB weight 888
[20.628] (==) modesetting(0): Default visual is TrueColor
[20.628] (II) modesetting(0): ShadowFB: preferred NO, enabled NO
[20.628] (II) modesetting(0): Output HDMI-0 has no monitor section
[20.629] (II) modesetting(0): EDID for output HDMI-0
[20.629] (II) modesetting(0): Printing probed modes for output HDMI-0
[20.629] (II) modesetting(0): Modeline 1024x768x60.0   65.00  1024 1048 
1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[20.629] (II) modesetting(0): Modeline 800x600x60.3   40.00  800 840 968 
1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[20.629] (II) modesetting(0): Modeline 800x600x56.2   36.00  800 824 896 
1024  600 601 603 625 +hsync +vsync (35.2 kHz e)
[20.630] (II) modesetting(0): Modeline 848x480x60.0   33.75  848 864 976 
1088  480 486 494 517 +hsync +vsync (31.0 kHz e)
[20.630] (II) modesetting(0): Modeline 640x480x59.9   25.18  640 656 752 
800  480 489 492 525 -hsync -vsync (31.5 kHz e)
[20.630] (II) modesetting(0): Output HDMI-0 connected
[20.630] (II) modesetting(0): Using exact sizes for initial modes
[20.630] (II) modesetting(0): Output HDMI-0 using initial mode 1024x768
[20.630] (II) modesetting(0): Using default gamma of (1.0, 1.0, 1.0) unless 
otherwise stated.
[20.630] (==) modesetting(0): DPI set to (96, 96)

v3.14 kernel


[20.214] (II) LoadModule: modesetting
[20.215] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[20.217] (II) Module modesetting: vendor=X.Org Foundation
[20.217]compiled for 1.12.1.902, module version = 0.3.0
[20.217]Module class: X.Org Video Driver
[20.217]ABI class: X.Org Video Driver, version 12.0
[20.217] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[20.217] (++) using VT number 7

[20.240] (WW) Falling back to old probe method for modesetting
[20.241] (II) modesetting(0): using default device
[20.241] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[20.244] (II) modesetting(0): Creating default Display subsection in Screen 
section
Default Screen Section for depth/fbbpp 24/32
[20.244] (==) modesetting(0): Depth 24, (==) framebuffer bpp 32
[20.244] (==) modesetting(0): RGB weight 888
[20.244] (==) modesetting(0): Default visual is TrueColor
[20.244] (II) modesetting(0): ShadowFB: preferred NO, enabled NO
[20.282] (II) modesetting(0): Output HDMI-0 has no monitor section
[20.329] (II) modesetting(0): EDID for output HDMI-0
[20.330] (II) modesetting(0): Manufacturer: RAW  Model: 0  Serial#: 1
[20.330] (II) modesetting(0): Year: 2012  Week: 6
[20.330] (II) modesetting(0): EDID Version: 1.3
[20.331] (II) modesetting(0): Digital Display Input
[20.331] (II) modesetting(0): Indeterminate output size
[20.331] (II) modesetting(0): Gamma: 2.20
[20.331] (II) modesetting(0): No DPMS capabilities specified
[20.331] (II) modesetting(0): Supported color encodings: RGB 4:4:4 YCrCb 
4:4:4 
[20.332] (II) modesetting(0): First detailed timing is preferred mode
[20.332] (II) modesetting(0): redX: 0.636 redY: 0.349   

[PATCH] staging: ft1000: remove explicit static initialisation

2014-04-06 Thread Angus Gibson
Fix checkpatch.pl error where a static variable was explicitly
initialised to false

Signed-off-by: Angus Gibson darthshr...@gmail.com
---
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index e40763e..0a2544c 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -35,7 +35,7 @@ static struct usb_device_id id_table[] = {
 
 MODULE_DEVICE_TABLE(usb, id_table);
 
-static bool gPollingfailed = false;
+static bool gPollingfailed;
 static int ft1000_poll_thread(void *arg)
 {
int ret;
-- 
1.9.1

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