linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one
@ 2021-04-01 14:54 Andy Shevchenko
  2021-04-01 14:54 ` [PATCH v1 2/2] iio: trigger: Fix strange (ladder-tupe) indentation Andy Shevchenko
  2021-04-02  9:39 ` [PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one Jonathan Cameron
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2021-04-01 14:54 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio, linux-kernel
  Cc: Jonathan Cameron, Lars-Peter Clausen, Andy Shevchenko

By unknown reason device name is set with an index casted from int
to unsigned long while at the same time with "%ld" specifier. Both parts
seems wrong to me, thus replace replace explicit casting and wrong specifier
with proper one, i.e. "%u".

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iio/industrialio-trigger.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index 32ac1bec25e3..77fca24147b2 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -75,8 +75,7 @@ int __iio_trigger_register(struct iio_trigger *trig_info,
 		return trig_info->id;
 
 	/* Set the name used for the sysfs directory etc */
-	dev_set_name(&trig_info->dev, "trigger%ld",
-		     (unsigned long) trig_info->id);
+	dev_set_name(&trig_info->dev, "trigger%u", trig_info->id);
 
 	ret = device_add(&trig_info->dev);
 	if (ret)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-02 17:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 14:54 [PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one Andy Shevchenko
2021-04-01 14:54 ` [PATCH v1 2/2] iio: trigger: Fix strange (ladder-tupe) indentation Andy Shevchenko
2021-04-02  9:39 ` [PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one Jonathan Cameron
     [not found]   ` <CAHp75VfijXvPEqCnJh2RDuhi0Ets_L034LYz-bp1zNuKA-x6AQ@mail.gmail.com>
2021-04-02 17:45     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).