Re: [PATCH 097/117] Staging: hv: storvsc: Add code to handle IDE devices using the storvsc driver

From
Christoph Hellwig <hch@infradead.org>
Date
2011-07-16 02:04:51
Also in
lkml
Reply to
K. Y. Srinivasan, 2011-07-15
Thanks, this looks much cleaner than the initial variant.
quoted hunk ↗ jump to hunk
+	if (dev_is_ide) {
+		storvsc_get_ide_info(device, &target, &path);
+		host_dev->path = device_info.path_id;
+		host_dev->target = device_info.target_id;
+	} else {
+		host_dev->path = device_info.path_id;
+		host_dev->target = device_info.target_id;
+	}
Is using the device_info values in both branches intentional?  If so
there's no need to have these assignments duplicated.
quoted hunk ↗ jump to hunk
+	if (dev_is_ide) {
+		ret = scsi_add_device(host, 0, target, 0);
+		if (ret) {
+			scsi_remove_host(host);
+			goto err_out;
+		}
I'd add another goto error label for this piece of error handling.
Thread (175 messages) 175 messages, 9 authors, last reply 2011-08-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help