[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 9 Sep 2021 23:27:02 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Ian Pilcher <arequipeno@...il.com>,
"axboe@...nel.dk" <axboe@...nel.dk>, "pavel@....cz" <pavel@....cz>
CC: "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"kabel@...nel.org" <kabel@...nel.org>
Subject: Re: [PATCH v2 04/15] block: Add block device LED trigger integrations
On 9/9/21 3:25 PM, Ian Pilcher wrote:
> External email: Use caution opening links or attachments
>
>
> Add LED trigger disk info pointer to gendisk structure
>
> Call ledtrig_blkdev_disk_init() from device_add_disk() to ensure that
> ledtrig is initialized to NULL, in case a driver allocates the structure
> itself and doesn't use kzalloc()
>
> Call ledtrig_blkdev_disk_cleanup() from del_gendisk() to ensure that the
> LED trigger stops trying to check the disk for activity
>
> Signed-off-by: Ian Pilcher <arequipeno@...il.com>
The commit log doesn't explain that why you need modify the core block
layer API which is highly discouraged.
Why can't ledtrig_blkdev_disk_init() be called before you
call add_disk() in your driver? same goes for the
ledtrig_blkdev_disk_cleanup(). If there is legit reason you need to
document that.
Powered by blists - more mailing lists