From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one
Date: Fri, 2 Apr 2021 10:39:27 +0100 [thread overview]
Message-ID: <20210402103927.6758416d@jic23-huawei> (raw)
In-Reply-To: <20210401145457.12255-1-andriy.shevchenko@linux.intel.com>
On Thu, 1 Apr 2021 17:54:56 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 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".
I'm not going to pretend to know what planet I was on when I wrote this :)
Series applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to poke at.
Thanks,
Jonathan
>
> 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)
next prev parent reply other threads:[~2021-04-02 9:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Jonathan Cameron [this message]
[not found] ` <CAHp75VfijXvPEqCnJh2RDuhi0Ets_L034LYz-bp1zNuKA-x6AQ@mail.gmail.com>
2021-04-02 17:45 ` [PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210402103927.6758416d@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®