[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f38fe0ed-5b10-523f-412b-3800183713ed@oss.qualcomm.com>
Date: Tue, 2 Dec 2025 21:58:07 +0530
From: Shivendra Pratap <shivendra.pratap@....qualcomm.com>
To: Bartosz Golaszewski <brgl@...nel.org>
Cc: Sebastian Reichel <sre@...nel.org>,
Bartosz Golaszewski <bgolasze@...cinc.com>,
Bjorn Andersson <andersson@...nel.org>, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH v20 2/2] power: reset: reboot-mode: Expose sysfs for
registered reboot_modes
On 12/1/2025 11:23 PM, Bartosz Golaszewski wrote:
> On Mon, Dec 1, 2025 at 6:43 PM Shivendra Pratap
> <shivendra.pratap@....qualcomm.com> wrote:
>>
>>>> @@ -132,9 +186,13 @@ int reboot_mode_unregister(struct reboot_mode_driver *reboot)
>>>> struct mode_info *info;
>>>>
>>>> unregister_reboot_notifier(&reboot->reboot_notifier);
>>>> + if (device_is_registered(&reboot->reboot_mode_device))
>>>> + device_unregister(&reboot->reboot_mode_device);
>>>
>>> If you bail out of reboot_mode_register_device(), you don't need the
>>> above check anymore because the device could
>>
>> We wanted to continue on failure, as per reviews.
>>
>
> You're probably referring to this bit:
>
> --
> On that note, I would argue that aborting the registration of
> reboot-modes, just because we failed to create the convenient "debug"
> interface, doesn't make sense. I think it would be better to just
> continue even when create_reboot_mode_device() returns an error.
> --
yes.
>
> Anything in sysfs is not "debug". It if is, then it should go into
> debugfs instead.
>
> Trying to register a sysfs object with the same name will result in a
> WARN() splat from sysfs core. I'd say we should definitely return an
> error if sysfs registration fails and just make sure it can't by
> assigning a unique name.
So, should we go ahead and make the change to fail reboot_mode_register, if
device registration fails?
thanks,
Shivendra
Powered by blists - more mailing lists