[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFllforMcR-WStUf@smile.fi.intel.com>
Date: Mon, 23 Jun 2025 17:32:30 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Abdelrahman Fekry <abdelrahmanfekry375@...il.com>, andy@...nel.org,
hansg@...nel.org, mchehab@...nel.org, sakari.ailus@...ux.intel.com,
gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, linux-staging@...ts.linux.dev,
skhan@...uxfoundation.org, linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH] staging: media: atomisp: Replace scnprintf with
sysfs_emit in bo_show
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
Powered by blists - more mailing lists