public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 0/7] minor cleanups for various staging drivers
@ 2009-12-23  8:54 Simon Horman
  2009-12-23  8:54 ` [patch 1/7] [patch] DT3155: Use pci_get_device Simon Horman
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Simon Horman @ 2009-12-23  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

Some minor cleanups for various staging drivers.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [patch 1/7] [patch] DT3155: Use pci_get_device
  2009-12-23  8:54 [patch 0/7] minor cleanups for various staging drivers Simon Horman
@ 2009-12-23  8:54 ` Simon Horman
  2009-12-23 16:19   ` Greg KH
  2009-12-23  8:54 ` [patch 2/7] [patch] rt2870: rtusb_probe() should be in section __devinit Simon Horman
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Simon Horman @ 2009-12-23  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

[-- Attachment #1: dt3155-pci_get_device.patch --]
[-- Type: text/plain, Size: 785 bytes --]

The use of pci_find_device() is deprecated.

Signed-off-by: Simon Horman <horms@verge.net.au>

--- 

Compile tested only.

Alternatively, if pci_find_device() really needs to be used
then this code needs to depend on PCI_LEGACY.

Index: gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:41:46.000000000 +1100
+++ gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:42:29.000000000 +1100
@@ -963,7 +963,7 @@ static int find_PCI (void)
   unsigned long base;
   unsigned char irq;
 
-  while ((pci_dev = pci_find_device
+  while ((pci_dev = pci_get_device
 	  (DT3155_VENDORID, DT3155_DEVICEID, pci_dev)) != NULL)
     {
       pci_index ++;


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [patch 2/7] [patch] rt2870: rtusb_probe() should be in section __devinit
  2009-12-23  8:54 [patch 0/7] minor cleanups for various staging drivers Simon Horman
  2009-12-23  8:54 ` [patch 1/7] [patch] DT3155: Use pci_get_device Simon Horman
@ 2009-12-23  8:54 ` Simon Horman
  2009-12-23  8:54 ` [patch 3/7] [patch] rt2870: Remove unnecessary forward declarations Simon Horman
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2009-12-23  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

[-- Attachment #1: rt2870-setction-missmatch.patch --]
[-- Type: text/plain, Size: 1008 bytes --]

$ make CONFIG_DEBUG_SECTION_MISMATCH=y
WARNING: drivers/staging/rt2870/rt2870sta.o(.text+0x2f4c5): Section
mismatch in reference from the function rtusb_probe() to the function .devinit.text:rt2870_probe()
The function rtusb_probe() references
the function __devinit rt2870_probe().
This is often because rtusb_probe lacks a __devinit 
annotation or the annotation of rt2870_probe is wrong.

Signed-off-by: Simon Horman <horms@verge.net.au>

Index: gregkh-2.6/drivers/staging/rt2860/usb_main_dev.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rt2860/usb_main_dev.c	2009-12-23 18:33:00.000000000 +1100
+++ gregkh-2.6/drivers/staging/rt2860/usb_main_dev.c	2009-12-23 18:42:34.000000000 +1100
@@ -296,7 +296,7 @@ static BOOLEAN USBDevConfigInit(IN struc
 
 }
 
-static int rtusb_probe(struct usb_interface *intf,
+static int __devinit rtusb_probe(struct usb_interface *intf,
 		       const struct usb_device_id *id)
 {
 	struct rt_rtmp_adapter *pAd;


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [patch 3/7] [patch] rt2870: Remove unnecessary forward declarations
  2009-12-23  8:54 [patch 0/7] minor cleanups for various staging drivers Simon Horman
  2009-12-23  8:54 ` [patch 1/7] [patch] DT3155: Use pci_get_device Simon Horman
  2009-12-23  8:54 ` [patch 2/7] [patch] rt2870: rtusb_probe() should be in section __devinit Simon Horman
@ 2009-12-23  8:54 ` Simon Horman
  2009-12-23  8:54 ` [patch 4/7] [patch] rtl8192e: print the elements of tx_pn and rx_pn not the arrays themselves Simon Horman
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2009-12-23  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

[-- Attachment #1: rt2870-static.patch --]
[-- Type: text/plain, Size: 867 bytes --]

Remove unnecessary forward declaration of rtusb_probe() and rtusb_disconnect()

Signed-off-by: Simon Horman <horms@verge.net.au>

Index: linux-2.6/drivers/staging/rt2860/usb_main_dev.c
===================================================================
--- linux-2.6.orig/drivers/staging/rt2860/usb_main_dev.c	2009-12-23 11:24:57.000000000 +1100
+++ linux-2.6/drivers/staging/rt2860/usb_main_dev.c	2009-12-23 11:25:06.000000000 +1100
@@ -216,10 +216,6 @@ static int rt2870_suspend(struct usb_int
 static int rt2870_resume(struct usb_interface *intf);
 #endif /* CONFIG_PM // */
 
-static int rtusb_probe(struct usb_interface *intf,
-		       const struct usb_device_id *id);
-static void rtusb_disconnect(struct usb_interface *intf);
-
 static BOOLEAN USBDevConfigInit(IN struct usb_device *dev,
 				IN struct usb_interface *intf,
 				struct rt_rtmp_adapter *pAd)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [patch 4/7] [patch] rtl8192e: print the elements of tx_pn and rx_pn not the arrays themselves
  2009-12-23  8:54 [patch 0/7] minor cleanups for various staging drivers Simon Horman
                   ` (2 preceding siblings ...)
  2009-12-23  8:54 ` [patch 3/7] [patch] rt2870: Remove unnecessary forward declarations Simon Horman
@ 2009-12-23  8:54 ` Simon Horman
  2009-12-23  8:54 ` [patch 5/7] [patch] rtl8192e: remove some functions from the __exit section Simon Horman
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2009-12-23  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: rtl8192e-printk-array.patch --]
[-- Type: text/plain, Size: 2186 bytes --]

Signed-off-by: Simon Horman <horms@verge.net.au>

--- 

Compile tested only

$ gcc --versino
gcc (Debian 4.4.2-6) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
...
drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c: In function ‘ieee80211_ccmp_print_stats’:
drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c:486: warning: format ‘%02x’ expects type ‘unsigned int’, but argument 5 has type ‘u8 *’
drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c:486: warning: format ‘%02x’ expects type ‘unsigned int’, but argument 6 has type ‘u8 *’
drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c:486: warning: too few arguments for format

Index: gregkh-2.6/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c	2009-12-23 18:39:52.000000000 +1100
+++ gregkh-2.6/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c	2009-12-23 19:35:07.000000000 +1100
@@ -475,12 +475,19 @@ static int ieee80211_ccmp_get_key(void *
 static char * ieee80211_ccmp_print_stats(char *p, void *priv)
 {
 	struct ieee80211_ccmp_data *ccmp = priv;
-	p += sprintf(p, "key[%d] alg=CCMP key_set=%d "
-		     "tx_pn=%02x%02x%02x%02x%02x%02x "
-		     "rx_pn=%02x%02x%02x%02x%02x%02x "
-		     "format_errors=%d replays=%d decrypt_errors=%d\n",
-		     ccmp->key_idx, ccmp->key_set,
-		     ccmp->tx_pn, ccmp->rx_pn,
+	int i;
+
+	p += sprintf(p, "key[%d] alg=CCMP key_set=%d tx_pn=",
+		     ccmp->key_idx, ccmp->key_set);
+
+	for (i = 0; i < ARRAY_SIZE(ccmp->tx_pn); i++)
+		p += sprintf(p, "%02x", ccmp->tx_pn[i]);
+
+	sprintf(p, " rx_pn=");
+	for (i = 0; i < ARRAY_SIZE(ccmp->rx_pn); i++)
+		p += sprintf(p, "%02x", ccmp->tx_pn[i]);
+
+	p += sprintf(p, " format_errors=%d replays=%d decrypt_errors=%d\n",
 		     ccmp->dot11RSNAStatsCCMPFormatErrors,
 		     ccmp->dot11RSNAStatsCCMPReplays,
 		     ccmp->dot11RSNAStatsCCMPDecryptErrors);


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [patch 5/7] [patch] rtl8192e: remove some functions from the __exit section
  2009-12-23  8:54 [patch 0/7] minor cleanups for various staging drivers Simon Horman
                   ` (3 preceding siblings ...)
  2009-12-23  8:54 ` [patch 4/7] [patch] rtl8192e: print the elements of tx_pn and rx_pn not the arrays themselves Simon Horman
@ 2009-12-23  8:54 ` Simon Horman
  2009-12-23  8:54 ` [patch 6/7] [patch] rtl8192su, rtl8192u: use min_t() in store_debug_level() Simon Horman
       [not found] ` <20091223085553.648368336@vergenet.net>
  6 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2009-12-23  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

[-- Attachment #1: rtl8192e-sections.patch --]
[-- Type: text/plain, Size: 4456 bytes --]

ieee80211_crypto_tkip_exit(), ieee80211_crypto_deinit() and
ieee80211_crypto_ccmp_exit() are called by ieee80211_rtl_init()
which are in section __init, so they can't be in section __exit.

Signed-off-by: Simon Horman <horms@verge.net.au>

--- 

WARNING: drivers/staging/rtl8192e/r8192e_pci.o(.init.text+0xda): Section mismatch in reference from the function ieee80211_rtl_init() to the function .exit.text:ieee80211_crypto_tkip_exit()
The function __init ieee80211_rtl_init() references
a function __exit ieee80211_crypto_tkip_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
ieee80211_crypto_tkip_exit() so it may be used outside an exit section.

WARNING: drivers/staging/rtl8192e/r8192e_pci.o(.init.text+0xdf): Section mismatch in reference from the function ieee80211_rtl_init() to the function .exit.text:ieee80211_crypto_deinit()
The function __init ieee80211_rtl_init() references
a function __exit ieee80211_crypto_deinit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
ieee80211_crypto_deinit() so it may be used outside an exit section.

WARNING: drivers/staging/rtl8192e/r8192e_pci.o(.init.text+0xf4): Section mismatch in reference from the function ieee80211_rtl_init() to the function .exit.text:ieee80211_crypto_ccmp_exit()
The function __init ieee80211_rtl_init() references
a function __exit ieee80211_crypto_ccmp_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
ieee80211_crypto_ccmp_exit() so it may be used outside an exit section.

WARNING: drivers/staging/rtl8192e/r8192e_pci.o(.init.text+0xf9): Section mismatch in reference from the function ieee80211_rtl_init() to the function .exit.text:ieee80211_crypto_tkip_exit()
The function __init ieee80211_rtl_init() references
a function __exit ieee80211_crypto_tkip_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
ieee80211_crypto_tkip_exit() so it may be used outside an exit section.

WARNING: drivers/staging/rtl8192e/r8192e_pci.o(.init.text+0xfe): Section mismatch in reference from the function ieee80211_rtl_init() to the function .exit.text:ieee80211_crypto_deinit()
The function __init ieee80211_rtl_init() references
a function __exit ieee80211_crypto_deinit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
ieee80211_crypto_deinit() so it may be used outside an exit section.

Index: gregkh-2.6/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c	2009-12-23 19:35:06.000000000 +1100
+++ gregkh-2.6/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c	2009-12-23 19:45:05.000000000 +1100
@@ -225,7 +225,7 @@ out:
 }
 
 
-void __exit ieee80211_crypto_deinit(void)
+void ieee80211_crypto_deinit(void)
 {
 	struct list_head *ptr, *n;
 
Index: gregkh-2.6/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c	2009-12-23 19:45:05.000000000 +1100
+++ gregkh-2.6/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c	2009-12-23 19:45:05.000000000 +1100
@@ -524,7 +524,7 @@ int __init ieee80211_crypto_ccmp_init(vo
 }
 
 
-void __exit ieee80211_crypto_ccmp_exit(void)
+void ieee80211_crypto_ccmp_exit(void)
 {
 	ieee80211_unregister_crypto_ops(&ieee80211_crypt_ccmp);
 }
Index: gregkh-2.6/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c	2009-12-23 19:45:00.000000000 +1100
+++ gregkh-2.6/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c	2009-12-23 19:45:05.000000000 +1100
@@ -1012,7 +1012,7 @@ int __init ieee80211_crypto_tkip_init(vo
 }
 
 
-void __exit ieee80211_crypto_tkip_exit(void)
+void ieee80211_crypto_tkip_exit(void)
 {
 	ieee80211_unregister_crypto_ops(&ieee80211_crypt_tkip);
 }


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [patch 6/7] [patch] rtl8192su, rtl8192u: use min_t() in store_debug_level()
  2009-12-23  8:54 [patch 0/7] minor cleanups for various staging drivers Simon Horman
                   ` (4 preceding siblings ...)
  2009-12-23  8:54 ` [patch 5/7] [patch] rtl8192e: remove some functions from the __exit section Simon Horman
@ 2009-12-23  8:54 ` Simon Horman
       [not found] ` <20091223085553.648368336@vergenet.net>
  6 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2009-12-23  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: rtl8192u-store_debug_level-min_t.patch --]
[-- Type: text/plain, Size: 2143 bytes --]

sizeof() returns a size_t but the other types involved
are unsigned long, so using min() results in a warning.

As sizeof() is called on an 11 character buffer defined
immediately above unsigned long is obviously wide enough
for the result.

Signed-off-by: Simon Horman <horms@verge.net.au>

--- 

Compile tested only.

$ gcc --version
gcc (Debian 4.4.2-6) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make CONFIG_DEBUG_SECTION_MISMATCH=y
...
drivers/staging/rtl8192su/ieee80211/ieee80211_module.c: In function ‘store_debug_level’:
drivers/staging/rtl8192su/ieee80211/ieee80211_module.c:265: warning: comparison of distinct pointer types lacks a cast
...

Index: gregkh-2.6/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c	2009-12-23 19:24:36.000000000 +1100
+++ gregkh-2.6/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c	2009-12-23 19:24:38.000000000 +1100
@@ -262,7 +262,7 @@ static int store_debug_level(struct file
 			     unsigned long count, void *data)
 {
 	char buf[] = "0x00000000";
-	unsigned long len = min(sizeof(buf) - 1, count);
+	unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count);
 	char *p = (char *)buf;
 	unsigned long val;
 
Index: gregkh-2.6/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c	2009-12-23 19:24:47.000000000 +1100
+++ gregkh-2.6/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c	2009-12-23 19:24:50.000000000 +1100
@@ -260,7 +260,7 @@ static int store_debug_level(struct file
 			     unsigned long count, void *data)
 {
 	char buf[] = "0x00000000";
-	unsigned long len = min(sizeof(buf) - 1, count);
+	unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count);
 	char *p = (char *)buf;
 	unsigned long val;
 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 7/7] [patch] rtl8192u: Clarify logic in‘ieee80211_wx_get_encode_ext_rsl()
       [not found] ` <20091223085553.648368336@vergenet.net>
@ 2009-12-23 10:39   ` Simon Horman
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2009-12-23 10:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

Signed-off-by: Simon Horman <horms@verge.net.au>

--- 

I think this is what is meant.

Compile tested only.

$ gcc --version
gcc (Debian 4.4.2-6) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make CONFIG_DEBUG_SECTION_MISMATCH=y
...
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c: In function ‘ieee80211_wx_get_encode_ext_rsl’:
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:721: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’
...

[ Trying again as vger didn't like the headers the first time around ]

Index: gregkh-2.6/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c	2009-12-23 19:14:41.000000000 +1100
+++ gregkh-2.6/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c	2009-12-23 19:14:44.000000000 +1100
@@ -718,7 +718,7 @@ int ieee80211_wx_get_encode_ext(struct i
 	} else
 		idx = ieee->tx_keyidx;
 
-	if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY &&
+	if (!(ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) &&
 	    ext->alg != IW_ENCODE_ALG_WEP)
 		if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA)
 			return -EINVAL;


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 1/7] [patch] DT3155: Use pci_get_device
  2009-12-23  8:54 ` [patch 1/7] [patch] DT3155: Use pci_get_device Simon Horman
@ 2009-12-23 16:19   ` Greg KH
  2009-12-23 22:02     ` Simon Horman
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2009-12-23 16:19 UTC (permalink / raw)
  To: Simon Horman; +Cc: devel, linux-kernel

On Wed, Dec 23, 2009 at 07:54:49PM +1100, Simon Horman wrote:
> The use of pci_find_device() is deprecated.
> 
> Signed-off-by: Simon Horman <horms@verge.net.au>
> 
> --- 
> 
> Compile tested only.
> 
> Alternatively, if pci_find_device() really needs to be used
> then this code needs to depend on PCI_LEGACY.
> 
> Index: gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c
> ===================================================================
> --- gregkh-2.6.orig/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:41:46.000000000 +1100
> +++ gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:42:29.000000000 +1100
> @@ -963,7 +963,7 @@ static int find_PCI (void)
>    unsigned long base;
>    unsigned char irq;
>  
> -  while ((pci_dev = pci_find_device
> +  while ((pci_dev = pci_get_device

You can't just replace these two functions, they operate differently
with regard to the reference counting logic.  Otherwise it wouldn't make
sense to have 2 different functions :)

So I can't apply this.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 1/7] [patch] DT3155: Use pci_get_device
  2009-12-23 16:19   ` Greg KH
@ 2009-12-23 22:02     ` Simon Horman
  2009-12-23 23:37       ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Horman @ 2009-12-23 22:02 UTC (permalink / raw)
  To: Greg KH; +Cc: devel, linux-kernel

On Wed, Dec 23, 2009 at 08:19:32AM -0800, Greg KH wrote:
> On Wed, Dec 23, 2009 at 07:54:49PM +1100, Simon Horman wrote:
> > The use of pci_find_device() is deprecated.
> > 
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> > 
> > --- 
> > 
> > Compile tested only.
> > 
> > Alternatively, if pci_find_device() really needs to be used
> > then this code needs to depend on PCI_LEGACY.
> > 
> > Index: gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c
> > ===================================================================
> > --- gregkh-2.6.orig/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:41:46.000000000 +1100
> > +++ gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:42:29.000000000 +1100
> > @@ -963,7 +963,7 @@ static int find_PCI (void)
> >    unsigned long base;
> >    unsigned char irq;
> >  
> > -  while ((pci_dev = pci_find_device
> > +  while ((pci_dev = pci_get_device
> 
> You can't just replace these two functions, they operate differently
> with regard to the reference counting logic.  Otherwise it wouldn't make
> sense to have 2 different functions :)
> 
> So I can't apply this.

Sorry about that.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 1/7] [patch] DT3155: Use pci_get_device
  2009-12-23 22:02     ` Simon Horman
@ 2009-12-23 23:37       ` Greg KH
  2009-12-24  2:11         ` Simon Horman
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2009-12-23 23:37 UTC (permalink / raw)
  To: Simon Horman; +Cc: devel, linux-kernel

On Thu, Dec 24, 2009 at 09:02:29AM +1100, Simon Horman wrote:
> On Wed, Dec 23, 2009 at 08:19:32AM -0800, Greg KH wrote:
> > On Wed, Dec 23, 2009 at 07:54:49PM +1100, Simon Horman wrote:
> > > The use of pci_find_device() is deprecated.
> > > 
> > > Signed-off-by: Simon Horman <horms@verge.net.au>
> > > 
> > > --- 
> > > 
> > > Compile tested only.
> > > 
> > > Alternatively, if pci_find_device() really needs to be used
> > > then this code needs to depend on PCI_LEGACY.
> > > 
> > > Index: gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c
> > > ===================================================================
> > > --- gregkh-2.6.orig/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:41:46.000000000 +1100
> > > +++ gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:42:29.000000000 +1100
> > > @@ -963,7 +963,7 @@ static int find_PCI (void)
> > >    unsigned long base;
> > >    unsigned char irq;
> > >  
> > > -  while ((pci_dev = pci_find_device
> > > +  while ((pci_dev = pci_get_device
> > 
> > You can't just replace these two functions, they operate differently
> > with regard to the reference counting logic.  Otherwise it wouldn't make
> > sense to have 2 different functions :)
> > 
> > So I can't apply this.
> 
> Sorry about that.

No problem, care to fix it up properly?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 1/7] [patch] DT3155: Use pci_get_device
  2009-12-23 23:37       ` Greg KH
@ 2009-12-24  2:11         ` Simon Horman
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2009-12-24  2:11 UTC (permalink / raw)
  To: Greg KH; +Cc: devel, linux-kernel

On Wed, Dec 23, 2009 at 03:37:29PM -0800, Greg KH wrote:
> On Thu, Dec 24, 2009 at 09:02:29AM +1100, Simon Horman wrote:
> > On Wed, Dec 23, 2009 at 08:19:32AM -0800, Greg KH wrote:
> > > On Wed, Dec 23, 2009 at 07:54:49PM +1100, Simon Horman wrote:
> > > > The use of pci_find_device() is deprecated.
> > > > 
> > > > Signed-off-by: Simon Horman <horms@verge.net.au>
> > > > 
> > > > --- 
> > > > 
> > > > Compile tested only.
> > > > 
> > > > Alternatively, if pci_find_device() really needs to be used
> > > > then this code needs to depend on PCI_LEGACY.
> > > > 
> > > > Index: gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c
> > > > ===================================================================
> > > > --- gregkh-2.6.orig/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:41:46.000000000 +1100
> > > > +++ gregkh-2.6/drivers/staging/dt3155/dt3155_drv.c	2009-12-23 18:42:29.000000000 +1100
> > > > @@ -963,7 +963,7 @@ static int find_PCI (void)
> > > >    unsigned long base;
> > > >    unsigned char irq;
> > > >  
> > > > -  while ((pci_dev = pci_find_device
> > > > +  while ((pci_dev = pci_get_device
> > > 
> > > You can't just replace these two functions, they operate differently
> > > with regard to the reference counting logic.  Otherwise it wouldn't make
> > > sense to have 2 different functions :)
> > > 
> > > So I can't apply this.
> > 
> > Sorry about that.
> 
> No problem, care to fix it up properly?

Sure, I'll see what I can do.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-12-24  2:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-23  8:54 [patch 0/7] minor cleanups for various staging drivers Simon Horman
2009-12-23  8:54 ` [patch 1/7] [patch] DT3155: Use pci_get_device Simon Horman
2009-12-23 16:19   ` Greg KH
2009-12-23 22:02     ` Simon Horman
2009-12-23 23:37       ` Greg KH
2009-12-24  2:11         ` Simon Horman
2009-12-23  8:54 ` [patch 2/7] [patch] rt2870: rtusb_probe() should be in section __devinit Simon Horman
2009-12-23  8:54 ` [patch 3/7] [patch] rt2870: Remove unnecessary forward declarations Simon Horman
2009-12-23  8:54 ` [patch 4/7] [patch] rtl8192e: print the elements of tx_pn and rx_pn not the arrays themselves Simon Horman
2009-12-23  8:54 ` [patch 5/7] [patch] rtl8192e: remove some functions from the __exit section Simon Horman
2009-12-23  8:54 ` [patch 6/7] [patch] rtl8192su, rtl8192u: use min_t() in store_debug_level() Simon Horman
     [not found] ` <20091223085553.648368336@vergenet.net>
2009-12-23 10:39   ` [patch 7/7] [patch] rtl8192u: Clarify logic in‘ieee80211_wx_get_encode_ext_rsl() Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox