Re: [PATCH V2] usb: storage: Convert US_DEBUGP to usb_stor_dbg

2013-04-22 Thread David Rientjes
On Fri, 19 Apr 2013, Joe Perches wrote:

> @@ -966,11 +934,13 @@ static int realtek_cr_autosuspend_setup(struct us_data 
> *us)
>  static void realtek_cr_destructor(void *extra)
>  {
>   struct rts51x_chip *chip = (struct rts51x_chip *)extra;
> -
> - US_DEBUGP("%s: <---\n", __func__);
> + struct us_data *us;
>  
>   if (!chip)
>   return;
> +
> + us = chip->us;
> +
>  #ifdef CONFIG_REALTEK_AUTOPM
>   if (ss_en) {
>   del_timer(&chip->rts51x_suspend_timer);

>From linux-next:

drivers/usb/storage/realtek_cr.c: In function 'realtek_cr_destructor':
drivers/usb/storage/realtek_cr.c:942:11: error: 'struct rts51x_chip' has no 
member named 'us'

chip->us here is only defined when CONFIG_REALTEK_AUTOPM is enabled.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2] usb: storage: Convert US_DEBUGP to usb_stor_dbg

2013-04-23 Thread Joe Perches
On Mon, 2013-04-22 at 12:35 -0700, David Rientjes wrote:
> On Fri, 19 Apr 2013, Joe Perches wrote:
> 
> > @@ -966,11 +934,13 @@ static int realtek_cr_autosuspend_setup(struct 
> > us_data *us)
> >  static void realtek_cr_destructor(void *extra)
> >  {
> >   struct rts51x_chip *chip = (struct rts51x_chip *)extra;
> > -
> > - US_DEBUGP("%s: <---\n", __func__);
> > + struct us_data *us;
> >  
> >   if (!chip)
> >   return;
> > +
> > + us = chip->us;
> > +
> >  #ifdef CONFIG_REALTEK_AUTOPM
> >   if (ss_en) {
> >   del_timer(&chip->rts51x_suspend_timer);
> 
> >From linux-next:
> 
> drivers/usb/storage/realtek_cr.c: In function 'realtek_cr_destructor':
> drivers/usb/storage/realtek_cr.c:942:11: error: 'struct rts51x_chip' has no 
> member named 'us'
> 
> chip->us here is only defined when CONFIG_REALTEK_AUTOPM is enabled.

Thanks.

I'll fix it, but it'll likely be a couple of weeks
until I can.



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2] usb: storage: Convert US_DEBUGP to usb_stor_dbg

2013-04-25 Thread Andrew Morton
On Mon, 22 Apr 2013 12:35:26 -0700 (PDT) David Rientjes  
wrote:

> On Fri, 19 Apr 2013, Joe Perches wrote:
> 
> > @@ -966,11 +934,13 @@ static int realtek_cr_autosuspend_setup(struct 
> > us_data *us)
> >  static void realtek_cr_destructor(void *extra)
> >  {
> > struct rts51x_chip *chip = (struct rts51x_chip *)extra;
> > -
> > -   US_DEBUGP("%s: <---\n", __func__);
> > +   struct us_data *us;
> >  
> > if (!chip)
> > return;
> > +
> > +   us = chip->us;
> > +
> >  #ifdef CONFIG_REALTEK_AUTOPM
> > if (ss_en) {
> > del_timer(&chip->rts51x_suspend_timer);
> 
> >From linux-next:
> 
> drivers/usb/storage/realtek_cr.c: In function 'realtek_cr_destructor':
> drivers/usb/storage/realtek_cr.c:942:11: error: 'struct rts51x_chip' has no 
> member named 'us'
> 
> chip->us here is only defined when CONFIG_REALTEK_AUTOPM is enabled.

local var `us' doesn't get used by anything and it's unclear why that
patch added it?  



From: Andrew Morton 
Subject: drivers/usb/storage/realtek_cr.c: fix build

Remove unused local `us', which broke the build.  Also nuke an unneeded
cast.

Repairs 191648d03d20 ("usb: storage: Convert US_DEBUGP to usb_stor_dbg").

Cc: Joe Perches 
Cc: David Rientjes 
Cc: Greg KH 
Signed-off-by: Andrew Morton 
---

 drivers/usb/storage/realtek_cr.c |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff -puN 
drivers/usb/storage/realtek_cr.c~drivers-usb-storage-realtek_crc-fix-build 
drivers/usb/storage/realtek_cr.c
--- a/drivers/usb/storage/realtek_cr.c~drivers-usb-storage-realtek_crc-fix-build
+++ a/drivers/usb/storage/realtek_cr.c
@@ -933,14 +933,11 @@ static int realtek_cr_autosuspend_setup(
 
 static void realtek_cr_destructor(void *extra)
 {
-   struct rts51x_chip *chip = (struct rts51x_chip *)extra;
-   struct us_data *us;
+   struct rts51x_chip *chip = extra;
 
if (!chip)
return;
 
-   us = chip->us;
-
 #ifdef CONFIG_REALTEK_AUTOPM
if (ss_en) {
del_timer(&chip->rts51x_suspend_timer);
_


Left unfixed:

drivers/usb/storage/realtek_cr.c:628: warning: 
'config_autodelink_before_power_down' defined but not used
drivers/usb/storage/realtek_cr.c:698: warning: 'fw5895_init' defined but not 
used

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2] usb: storage: Convert US_DEBUGP to usb_stor_dbg

2013-04-26 Thread David Rientjes
On Thu, 25 Apr 2013, Andrew Morton wrote:

> From: Andrew Morton 
> Subject: drivers/usb/storage/realtek_cr.c: fix build
> 
> Remove unused local `us', which broke the build.  Also nuke an unneeded
> cast.
> 
> Repairs 191648d03d20 ("usb: storage: Convert US_DEBUGP to usb_stor_dbg").
> 
> Cc: Joe Perches 
> Cc: David Rientjes 
> Cc: Greg KH 
> Signed-off-by: Andrew Morton 

Acked-by: David Rientjes 

Fixes it for me, thanks Andrew.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html