Skip to contentSkip to conversation

iio:trigger:interrupt fix formatting of rsize variable in name

PATCH Superseded Jonathan Cameron 1 participant 2 messages Jun 6, 2013 IIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

PATCH 1/1 iio:trigger:interrupt fix formatting of rsize variable in name

The name includes irq_res->start which of type resource_size_t not integer. We could in theory use %pa for this but then it would be in hex and also that causes a warning about incorrect types anyway. Hence just use the irq local variable we assigned the line above.

---
 drivers/iio/trigger/iio-trig-interrupt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/trigger/iio-trig-interrupt.c +1 -1
index 84bf397..0a6756d 100644
@@ -50,7 +50,7 @@ static int iio_interrupt_trigger_probe(struct platform_device *pdev)
 
 	irq = irq_res->start;
 
-	trig = iio_trigger_alloc("irqtrig%d", irq_res->start);
+	trig = iio_trigger_alloc("irqtrig%zu", irq_res->start);
 	if (!trig) {
 		ret = -ENOMEM;
 		goto error_ret;
Signature · 1 line
1.8.3
author maintainer
#1 lore raw
Quoted 5 lines · Jonathan Cameron

The name includes irq_res->start which of type resource_size_t not integer. We could in theory use %pa for this but then it would be in hex and also that causes a warning about incorrect types anyway. Hence just use the irq local variable we assigned the line above.

Sorry, sent the wrong version out due to forgetting to update the commit.

Quoted 20 lines
---
 drivers/iio/trigger/iio-trig-interrupt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/trigger/iio-trig-interrupt.c +1 -1
index 84bf397..0a6756d 100644
@@ -50,7 +50,7 @@ static int iio_interrupt_trigger_probe(struct platform_device *pdev)
 
 	irq = irq_res->start;
 
-	trig = iio_trigger_alloc("irqtrig%d", irq_res->start);
+	trig = iio_trigger_alloc("irqtrig%zu", irq_res->start);
 	if (!trig) {
 		ret = -ENOMEM;
 		goto error_ret;