lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 28 Apr 2013 15:22:27 -0700
From:	Randy Dunlap <rdunlap@...radead.org>
To:	wei_wang@...lsil.com.cn
CC:	devel@...uxdriverproject.org, linux-kernel@...r.kernel.org,
	linux-next@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH] linux-next:usb-stor:realtek_cr:Fix compile error

On 04/26/13 19:49, wei_wang@...lsil.com.cn wrote:
> From: Wei WANG <wei_wang@...lsil.com.cn>
> 
> To fix the compile error when CONFIG_PM_RUNTIME is not enabled,
> move the declaration of us out of CONFIG_REALTEK_AUTOPM macro in rts51x_chip.
> 
> 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'
> 
> Signed-off-by: Wei WANG <wei_wang@...lsil.com.cn>

Reported-by: Randy Dunlap <rdunlap@...radead.org>
Acked-by: Randy Dunlap <rdunlap@...radead.org>

Thanks.

> ---
>  drivers/usb/storage/realtek_cr.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c
> index 4797228..64c2b28 100644
> --- a/drivers/usb/storage/realtek_cr.c
> +++ b/drivers/usb/storage/realtek_cr.c
> @@ -105,8 +105,9 @@ struct rts51x_chip {
>  	int status_len;
>  
>  	u32 flag;
> -#ifdef CONFIG_REALTEK_AUTOPM
>  	struct us_data *us;
> +
> +#ifdef CONFIG_REALTEK_AUTOPM
>  	struct timer_list rts51x_suspend_timer;
>  	unsigned long timer_expires;
>  	int pwr_state;
> @@ -991,6 +992,7 @@ static int init_realtek_cr(struct us_data *us)
>  	us->extra = chip;
>  	us->extra_destructor = realtek_cr_destructor;
>  	us->max_lun = chip->max_lun = rts51x_get_max_lun(us);
> +	chip->us = us;
>  
>  	usb_stor_dbg(us, "chip->max_lun = %d\n", chip->max_lun);
>  
> @@ -1013,10 +1015,8 @@ static int init_realtek_cr(struct us_data *us)
>  			SET_AUTO_DELINK(chip);
>  	}
>  #ifdef CONFIG_REALTEK_AUTOPM
> -	if (ss_en) {
> -		chip->us = us;
> +	if (ss_en)
>  		realtek_cr_autosuspend_setup(us);
> -	}
>  #endif
>  
>  	usb_stor_dbg(us, "chip->flag = 0x%x\n", chip->flag);
> 


-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ