Skip to contentSkip to conversation

virtio_scsi: blank line after declaration cleanup

PATCH New Jerry Snitselaar 1 participant 2 messages Apr 28, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 virtio_scsi: blank line after declaration cleanup

Clean up of coding style warnings from checkpatch

---
 drivers/scsi/virtio_scsi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/scsi/virtio_scsi.c +4 -1
index 16bfd50..fa0b25f 100644
@@ -498,8 +498,8 @@ static int virtscsi_queuecommand(struct virtio_scsi *vscsi,
 {
 	struct virtio_scsi_cmd *cmd;
 	int ret;
-
 	struct Scsi_Host *shost = virtio_scsi_host(vscsi->vdev);
+
 	BUG_ON(scsi_sg_count(sc) > shost->sg_tablesize);
 
 	/* TODO: check feature bit and fail if unsupported?  */
@@ -661,6 +661,7 @@ static int virtscsi_target_alloc(struct scsi_target *starget)
 {
 	struct virtio_scsi_target_state *tgt =
 				kmalloc(sizeof(*tgt), GFP_KERNEL);
+
 	if (!tgt)
 		return -ENOMEM;
 
@@ -675,6 +676,7 @@ static int virtscsi_target_alloc(struct scsi_target *starget)
 static void virtscsi_target_destroy(struct scsi_target *starget)
 {
 	struct virtio_scsi_target_state *tgt = starget->hostdata;
+
 	kfree(tgt);
 }
 
@@ -768,6 +770,7 @@ static int virtscsi_cpu_callback(struct notifier_block *nfb,
 				 unsigned long action, void *hcpu)
 {
 	struct virtio_scsi *vscsi = container_of(nfb, struct virtio_scsi, nb);
+
 	switch(action) {
 	case CPU_ONLINE:
 	case CPU_ONLINE_FROZEN:
Signature · 1 line
2.0.0.rc0
#1 lore raw

PATCH 2/2 virtio_scsi: space required before open parenthesis

Fix coding style warnings from checkpatch

---
 drivers/scsi/virtio_scsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/virtio_scsi.c +2 -2
index 9f2fccc..9248a1e 100644
@@ -723,7 +723,7 @@ static struct scsi_host_template virtscsi_host_template_multi = {
 	do { \
 		typeof(((struct virtio_scsi_config *)0)->fld) __val = (val); \
 		virtio_cwrite(vdev, struct virtio_scsi_config, fld, &__val); \
-	} while(0)
+	} while (0)
 
 static void __virtscsi_set_affinity(struct virtio_scsi *vscsi, bool affinity)
 {
@@ -771,7 +771,7 @@ static int virtscsi_cpu_callback(struct notifier_block *nfb,
 {
 	struct virtio_scsi *vscsi = container_of(nfb, struct virtio_scsi, nb);
 
-	switch(action) {
+	switch (action) {
 	case CPU_ONLINE:
 	case CPU_ONLINE_FROZEN:
 	case CPU_DEAD:
Signature · 1 line
2.0.0.rc0