Skip to contentSkip to conversation

parisc: fix dev_printk() compile warnings for accessing a device struct

PATCH Applied Helge Deller 2 participants 2 messages Jan 13, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 parisc: fix dev_printk() compile warnings for accessing a device struct

Fix compile warnings:
drivers/scsi/zalon.c: In function `zalon_probe':
drivers/scsi/zalon.c:140: warning: passing arg 1 of dev_driver_string' from incompatible pointer type drivers/scsi/zalon.c:140: warning: passing arg 1 of dev_name' from incompatible pointer type

drivers/scsi/lasi700.c +1 -1
index 4a4e695..f23c4ca 100644
@@ -103,7 +103,7 @@ lasi700_probe(struct parisc_device *dev)
 
 	hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL);
 	if (!hostdata) {
-		dev_printk(KERN_ERR, dev, "Failed to allocate host data\n");
+		dev_printk(KERN_ERR, &dev->dev, "Failed to allocate host data\n");
 		return -ENOMEM;
 	}
 
drivers/scsi/zalon.c +1 -1
index a8d61a6..97f3158 100644
@@ -137,7 +137,7 @@ zalon_probe(struct parisc_device *dev)
 		goto fail;
 
 	if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) {
-	  dev_printk(KERN_ERR, dev, "irq problem with %d, detaching\n ",
+	  dev_printk(KERN_ERR, &dev->dev, "irq problem with %d, detaching\n ",
 		     dev->irq);
 		goto fail;
 	}
#1 lore raw
Quoted 12 lines · Helge Deller

Fix compile warnings:
drivers/scsi/zalon.c: In function `zalon_probe':
drivers/scsi/zalon.c:140: warning: passing arg 1 of dev_driver_string' from incompatible pointer type drivers/scsi/zalon.c:140: warning: passing arg 1 of dev_name' from incompatible pointer type

drivers/scsi/lasi700.c +0 -0
index 4a4e695..f23c4ca 100644

drivers/scsi/lasi700.c lasi700_probe(struct parisc_device *dev) · line 106

Quoted 5 lines
drivers/scsi/lasi700.c +1 -1
@@ -103,7 +103,7 @@ lasi700_probe(struct parisc_device *dev)
 
 	hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL);
 	if (!hostdata) {
-		dev_printk(KERN_ERR, dev, "Failed to allocate host data\n");
+		dev_printk(KERN_ERR, &dev->dev, "Failed to allocate host data\n");

Huh, I thought there was a pretty macro thingy that casted to the embedded struct device. Oh well.

applied.