[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2a67998-f67e-4677-a348-780bf640bfc3@suswa.mountain>
Date: Mon, 23 Jun 2025 17:16:57 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: 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 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.
regards,
dan carpenter
Powered by blists - more mailing lists