From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Gerald Loacker <gerald.loacker@wolfvision.net>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
Jakob Hauser <jahau@rocketmail.com>,
Michael Riesch <michael.riesch@wolfvision.net>
Subject: Re: [PATCH v2 2/2] iio: magnetometer: add ti tmag5273 driver
Date: Mon, 21 Nov 2022 20:56:07 +0200 [thread overview]
Message-ID: <Y3vJx6YBB2qRD8R9@smile.fi.intel.com> (raw)
In-Reply-To: <Y3vGNVZcSuILCHxW@smile.fi.intel.com>
On Mon, Nov 21, 2022 at 08:40:53PM +0200, Andy Shevchenko wrote:
> On Mon, Nov 21, 2022 at 06:24:18PM +0100, Gerald Loacker wrote:
> > Am 21.11.2022 um 15:04 schrieb Andy Shevchenko:
> > > On Mon, Nov 21, 2022 at 01:35:42PM +0100, Gerald Loacker wrote:
...
> > >> + snprintf(data->name, sizeof(data->name), "tmag5273x%1u",
> > >
> > > There is a difference between %1u and %.1u. And I believe you wanted the
> > > latter, but...
> >
> > %1u works fine for me. Can you point me to the documentation for %.1u?
>
> man printf(3)
>
> It was a surprise to me that many developers don't know the difference here.
> The %NNNNu defines the _minimum_ digits to print, while the %.NNNu defines
> the _exact_ amount of digits to print (NNN -- a number).
>
> > >> + data->version);
Even me trapped to this one more time :-)
The above is only applies to the strings and floats. So in your case it has no
difference.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-11-21 18:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 12:35 [PATCH v2 0/2] " Gerald Loacker
2022-11-21 12:35 ` [PATCH v2 1/2] dt-bindings: iio: magnetometer: add ti tmag5273 documentation file Gerald Loacker
2022-11-21 14:08 ` Krzysztof Kozlowski
2022-11-21 12:35 ` [PATCH v2 2/2] iio: magnetometer: add ti tmag5273 driver Gerald Loacker
2022-11-21 14:04 ` Andy Shevchenko
2022-11-21 17:24 ` Gerald Loacker
2022-11-21 18:40 ` Andy Shevchenko
2022-11-21 18:56 ` Andy Shevchenko [this message]
2022-11-22 7:39 ` Gerald Loacker
2022-11-23 9:58 ` Gerald Loacker
2022-11-23 13:39 ` Andy Shevchenko
2022-11-23 17:56 ` Jonathan Cameron
2022-11-23 18:10 ` Jonathan Cameron
2022-11-23 22:30 ` kernel test robot
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=Y3vJx6YBB2qRD8R9@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=gerald.loacker@wolfvision.net \
--cc=jahau@rocketmail.com \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.riesch@wolfvision.net \
--cc=nikita.yoush@cogentembedded.com \
--cc=robh+dt@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®