diff mbox

scsi: sd: remove duplicated setting of gd->minors

Message ID 20170818064923.GA36375@localhost.didichuxing.com (mailing list archive)
State Accepted
Headers show

Commit Message

weiping zhang Aug. 18, 2017, 6:49 a.m. UTC
gd->minors has been set when call alloc_disk() in sd_probe.

Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
---
 drivers/scsi/sd.c | 1 -
 1 file changed, 1 deletion(-)

Comments

weiping zhang Aug. 24, 2017, 11:57 a.m. UTC | #1
On Fri, Aug 18, 2017 at 02:49:30PM +0800, weiping zhang wrote:
> gd->minors has been set when call alloc_disk() in sd_probe.
> 
> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
> ---
>  drivers/scsi/sd.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index bea36ad..c18ca7a 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -3223,7 +3223,6 @@ static void sd_probe_async(void *data, async_cookie_t cookie)
>  
>  	gd->major = sd_major((index & 0xf0) >> 4);
>  	gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
> -	gd->minors = SD_MINORS;
>  
>  	gd->fops = &sd_fops;
>  	gd->private_data = &sdkp->driver;
> -- 
> 2.9.4
> 

Hi Martin,

would you please look into this misc patch ?

Thanks
Martin K. Petersen Aug. 25, 2017, 9:28 p.m. UTC | #2
weiping,

> gd->minors has been set when call alloc_disk() in sd_probe.

Applied to 4.14/scsi-queue. Thank you!
diff mbox

Patch

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index bea36ad..c18ca7a 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3223,7 +3223,6 @@  static void sd_probe_async(void *data, async_cookie_t cookie)
 
 	gd->major = sd_major((index & 0xf0) >> 4);
 	gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
-	gd->minors = SD_MINORS;
 
 	gd->fops = &sd_fops;
 	gd->private_data = &sdkp->driver;