* [PATCH 0/3] Staging: rtl8192e: Fix code issues
@ 2014-04-06 21:25 Joel Pelaez Jorge
2014-04-06 21:29 ` [PATCH 1/2] Staging: rtl8192e: Remove bad 'extern' declaration Joel Pelaez Jorge
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Joel Pelaez Jorge @ 2014-04-06 21:25 UTC (permalink / raw)
To: Greg Kroah-Hartman, Silvan Jegen; +Cc: devel, linux-kernel
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
--
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] Staging: rtl8192e: Remove bad 'extern' declaration
2014-04-06 21:25 [PATCH 0/3] Staging: rtl8192e: Fix code issues Joel Pelaez Jorge
@ 2014-04-06 21:29 ` Joel Pelaez Jorge
2014-04-06 21:30 ` [PATCH 2/2] Staging: rtl8192e: Fix sparse warning Joel Pelaez Jorge
2014-04-07 0:38 ` [PATCH 0/3] Staging: rtl8192e: Fix code issues Greg Kroah-Hartman
2 siblings, 0 replies; 5+ messages in thread
From: Joel Pelaez Jorge @ 2014-04-06 21:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Silvan Jegen; +Cc: devel, linux-kernel
Remove extern declaration to a static function:
iw_statistics *r8192_get_wireless_stats(struct net_device *dev);
Signed-off-by: Joel Pelaez Jorge <joelpelaez@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_wx.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.h
b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.h
index 6a51a25..6437664 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.h
@@ -25,7 +25,6 @@ struct iw_handler_def;
struct iw_statistics;
extern 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);
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] Staging: rtl8192e: Fix sparse warning
2014-04-06 21:25 [PATCH 0/3] Staging: rtl8192e: Fix code issues Joel Pelaez Jorge
2014-04-06 21:29 ` [PATCH 1/2] Staging: rtl8192e: Remove bad 'extern' declaration Joel Pelaez Jorge
@ 2014-04-06 21:30 ` Joel Pelaez Jorge
2014-04-06 21:43 ` Joe Perches
2014-04-07 0:38 ` [PATCH 0/3] Staging: rtl8192e: Fix code issues Greg Kroah-Hartman
2 siblings, 1 reply; 5+ messages in thread
From: Joel Pelaez Jorge @ 2014-04-06 21:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, Silvan Jegen; +Cc: devel, linux-kernel
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 <joelpelaez@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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] Staging: rtl8192e: Fix sparse warning
2014-04-06 21:30 ` [PATCH 2/2] Staging: rtl8192e: Fix sparse warning Joel Pelaez Jorge
@ 2014-04-06 21:43 ` Joe Perches
0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2014-04-06 21:43 UTC (permalink / raw)
To: Joel Pelaez Jorge; +Cc: Greg Kroah-Hartman, Silvan Jegen, devel, linux-kernel
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);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] Staging: rtl8192e: Fix code issues
2014-04-06 21:25 [PATCH 0/3] Staging: rtl8192e: Fix code issues Joel Pelaez Jorge
2014-04-06 21:29 ` [PATCH 1/2] Staging: rtl8192e: Remove bad 'extern' declaration Joel Pelaez Jorge
2014-04-06 21:30 ` [PATCH 2/2] Staging: rtl8192e: Fix sparse warning Joel Pelaez Jorge
@ 2014-04-07 0:38 ` Greg Kroah-Hartman
2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2014-04-07 0:38 UTC (permalink / raw)
To: Joel Pelaez Jorge; +Cc: Silvan Jegen, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-07 0:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-06 21:25 [PATCH 0/3] Staging: rtl8192e: Fix code issues Joel Pelaez Jorge
2014-04-06 21:29 ` [PATCH 1/2] Staging: rtl8192e: Remove bad 'extern' declaration Joel Pelaez Jorge
2014-04-06 21:30 ` [PATCH 2/2] Staging: rtl8192e: Fix sparse warning Joel Pelaez Jorge
2014-04-06 21:43 ` Joe Perches
2014-04-07 0:38 ` [PATCH 0/3] Staging: rtl8192e: Fix code issues Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).