[Resend PATCH 3/3] scsi: sd: remove unnecessary initialization in sd_probe()

2013-01-14 Thread Guo Chao
We use kzalloc() to allocate scsi_disk, no need to reset ->openers. Signed-off-by: Guo Chao --- drivers/scsi/sd.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9fd67be..4f4bc7e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -290

[Resend PATCH 2/3] scsi: sd: no need to set gendisk->minors in sd_probe_async()

2013-01-14 Thread Guo Chao
We already call alloc_disk() with SD_MINORS and ->minors will be always set there. Signed-off-by: Guo Chao --- drivers/scsi/sd.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 181cd87..9fd67be 100644 --- a/drivers/scsi/sd.c +++ b/drivers/s

[Resend PATCH 1/3] scsi: sd: set valid return value in failed path

2013-01-14 Thread Guo Chao
Set valid return value to avoid returning 0 in a failed path of sd_init(). Signed-off-by: Guo Chao --- drivers/scsi/sd.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7992635..181cd87 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c

[PATCH 1/3] scsi: sd: set valid return value in init_sd()

2012-11-22 Thread Guo Chao
init_sd() forgets to set error code when we fail to create slab cache, thus return 0 in a failed path. Return ENOMEM in this case. Signed-off-by: Guo Chao --- drivers/scsi/sd.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 352bc77..4cc277d

[PATCH 3/3] scsi: sd: remove unnecessary initialization in sd_probe()

2012-11-22 Thread Guo Chao
We use kzalloc() to allocate scsi_disk, no need to reset ->openers. Signed-off-by: Guo Chao --- drivers/scsi/sd.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e934ffc..d3b66a2 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -289

[PATCH 2/3] scsi: sd: no need to set gendisk->minors in sd_probe_async()

2012-11-22 Thread Guo Chao
We already call alloc_disk() with SD_MINORS and ->minors will be always set there. Signed-off-by: Guo Chao --- drivers/scsi/sd.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 4cc277d..e934ffc 100644 --- a/drivers/scsi/sd.c +++ b/drivers/s