[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZho-zSTjVFNSrcQ_VWdgKpW_jpc-bX+EcA_dzdGgOKrA@mail.gmail.com>
Date: Fri, 12 Feb 2021 10:00:37 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Yang Li <yang.lee@...ux.alibaba.com>
Cc: Bartosz Golaszewski <bgolaszewski@...libre.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpiolib: cdev: convert stream-like files from
On Sun, Feb 7, 2021 at 10:00 AM Yang Li <yang.lee@...ux.alibaba.com> wrote:
> Eliminate the following coccicheck warning:
> ./drivers/gpio/gpiolib-cdev.c:2307:7-23: WARNING: gpio_fileops: .read()
> has stream semantic; safe to change nonseekable_open -> stream_open.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
This doesn't make any sense to me.
It is pretty clear from context that this file should *not* be
seeked and it seems just dangerous to randomly allow that.
Better safe than sorry.
I don't know if the function nonseekable_open() has an unintuitive
name if it means anything else than that. I burnt myself on the FS
before.
Yours,
Linus Walleij
Powered by blists - more mailing lists