public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Abdelrahman Fekry <abdelrahmanfekry375@gmail.com>,
	andy@kernel.org, hansg@kernel.org, mchehab@kernel.org,
	sakari.ailus@linux.intel.com, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-staging@lists.linux.dev, skhan@linuxfoundation.org,
	linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH] staging: media: atomisp: Replace scnprintf with sysfs_emit in bo_show
Date: Mon, 23 Jun 2025 17:32:30 +0300	[thread overview]
Message-ID: <aFllforMcR-WStUf@smile.fi.intel.com> (raw)
In-Reply-To: <a2a67998-f67e-4677-a348-780bf640bfc3@suswa.mountain>

On Mon, Jun 23, 2025 at 05:16:57PM +0300, Dan Carpenter wrote:
> On Sat, Jun 21, 2025 at 09:24:40PM +0300, Andy Shevchenko wrote:
> > On Sat, Jun 21, 2025 at 9:30 AM Abdelrahman Fekry

...

> > > -       ret = scnprintf(buf, PAGE_SIZE, "type pgnr\n");
> > > -       if (ret <= 0)
> > > -               return 0;
> > > -
> > > -       index1 += ret;
> > > +       offset += sysfs_emit(buf, "type pgnr\n");
> > 
> > This changes the behaviour in case the sysfs_emit() fails. Not that
> > this is a big issue, but it should be pointed out somewhere.
> 
> Neither scnprintf() nor sysfs_emit() can return negatives.

Good, that's what I asked the author to investigate and add the respective
comment / update commit message accordingly.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-06-23 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-21  6:29 [PATCH] staging: media: atomisp: Replace scnprintf with sysfs_emit in bo_show Abdelrahman Fekry
2025-06-21 18:24 ` Andy Shevchenko
2025-06-22  6:36   ` Abdelrahman Fekry
2025-06-23 14:16   ` Dan Carpenter
2025-06-23 14:32     ` Andy Shevchenko [this message]
2025-06-23 18:31 ` Hans de Goede
2025-06-24 12:13   ` Abdelrahman Fekry

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=aFllforMcR-WStUf@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=abdelrahmanfekry375@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=skhan@linuxfoundation.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