mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: oe-kbuild@lists.linux.dev, Yasin Lee <yasin.lee.x@outlook.com>,
	jic23@kernel.org, lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	lars@metafoo.de, swboyd@chromium.org, nuno.a@analog.com,
	u.kleine-koenig@pengutronix.de, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, yasin.lee.x@gmail.com
Subject: Re: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
Date: Mon, 27 May 2024 11:14:16 +0300	[thread overview]
Message-ID: <6f479ca6-cd6d-4a28-8afe-8b74c4d171d4@moroto.mountain> (raw)
In-Reply-To: <CAHp75VcTxXsnKVR5EQYTNhokHeXrOxQPe9gAkWFRr0yZT1KTPA@mail.gmail.com>

On Sat, May 25, 2024 at 05:00:59PM +0300, Andy Shevchenko wrote:
> On Thu, May 23, 2024 at 3:42 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> 
> 
> > 5e5a419c9407f6 Yasin Lee 2024-05-10  1110  static ssize_t hx9031as_raw_data_show(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)
> > 5e5a419c9407f6 Yasin Lee 2024-05-10  1111  {
> > 5e5a419c9407f6 Yasin Lee 2024-05-10  1112       char buf[BUF_SIZE] = {0};
> > 5e5a419c9407f6 Yasin Lee 2024-05-10  1113       char *p = buf;
> > 5e5a419c9407f6 Yasin Lee 2024-05-10  1114       int ii = 0;
> > 5e5a419c9407f6 Yasin Lee 2024-05-10  1115
> > 5e5a419c9407f6 Yasin Lee 2024-05-10  1116       hx9031as_sample();
> > 5e5a419c9407f6 Yasin Lee 2024-05-10  1117       for (ii = 0; ii < HX9031AS_CH_NUM; ii++) {
> > 5e5a419c9407f6 Yasin Lee 2024-05-10 @1118               p += snprintf(p, PAGE_SIZE, "ch[%d]: DIFF=%-8d, RAW=%-8d, OFFSET=%-8d, BL=%-8d, LP=%-8d\n",
> >                                                                          ^^^^^^^^^
> 
> 
> > Also use scnprintf() instead of snprintf() unless you need to check the
> > results.
> 
> This is incorrect advice. You should recommend sysfs_emit() /
> sysfs_emit_at() in this kind of case.

No, this is not sysfs code.  It's debugfs.  The API is completely
different.

regards,
dan carpenter

  reply	other threads:[~2024-05-27  8:14 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  9:37 Yasin Lee
2024-05-10 10:26 ` Uwe Kleine-König
2024-06-19  7:40   ` Yasin Lee
2024-05-10 12:29 ` kernel test robot
2024-05-11 16:01 ` Jonathan Cameron
2024-05-14 20:25   ` [PATCH v1 0/2] Add TYHX HX9031AS Yasin Lee
     [not found]   ` <20240514202540.341103-1-yasin.lee.x@outlook.com>
2024-05-14 20:25     ` [PATCH v1 1/2] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver Yasin Lee
2024-05-15  8:07       ` Krzysztof Kozlowski
2024-05-16 20:57       ` kernel test robot
2024-05-19 15:24       ` Jonathan Cameron
2024-05-29  4:57         ` [PATCH v3 0/2] iio-proximity-hx9023s-Add-TYHX-HX9023S-sensor-driver Yasin Lee
2024-05-31  7:52           ` Krzysztof Kozlowski
2024-06-16  7:45             ` Krzysztof Kozlowski
2024-06-02 13:24           ` Jonathan Cameron
     [not found]         ` <20240529045749.530039-1-yasin.lee.x@outlook.com>
2024-05-29  4:57           ` [PATCH v3 1/2] dt-bindings:iio:proximity: Add hx9023s binding Yasin Lee
2024-05-31  7:51             ` Krzysztof Kozlowski
2024-06-02 13:34             ` Jonathan Cameron
2024-05-29  4:57           ` [PATCH v3 2/2] iio:proximity:hx9023s: Add TYHX HX9023S sensor driver Yasin Lee
2024-05-29  9:13             ` Andy Shevchenko
2024-05-30  1:06             ` kernel test robot
2024-05-30 16:59             ` kernel test robot
2024-05-30 19:07             ` kernel test robot
2024-06-02 14:26             ` Jonathan Cameron
2024-05-14 20:25     ` [PATCH v1 2/2] dt-bindings:iio:proximity: Add hx9031as binding Yasin Lee
2024-05-15  8:06       ` Krzysztof Kozlowski
2024-06-16  7:47         ` Krzysztof Kozlowski
2024-06-19  8:38           ` Yasin Lee
2024-06-19  9:17             ` Krzysztof Kozlowski
2024-05-11 18:36 ` [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver kernel test robot
2024-05-11 19:18 ` kernel test robot
2024-05-11 19:18 ` kernel test robot
2024-05-11 22:14 ` kernel test robot
2024-05-21 10:05 ` kernel test robot
2024-05-21 11:50 ` kernel test robot
2024-05-23 12:42 ` Dan Carpenter
2024-05-25 14:00   ` Andy Shevchenko
2024-05-27  8:14     ` Dan Carpenter [this message]
2024-05-27  8:50       ` Dan Carpenter
2024-05-27  9:07         ` Dan Carpenter
2024-05-31  5:48 ` 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=6f479ca6-cd6d-4a28-8afe-8b74c4d171d4@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nuno.a@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=swboyd@chromium.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=yasin.lee.x@gmail.com \
    --cc=yasin.lee.x@outlook.com \
    /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®