kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Tomek The Messenger <tomekthemessenger@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: Should I return NOTIFY_DONE always from restart handler?
Date: Tue, 24 Mar 2020 17:06:04 +0100	[thread overview]
Message-ID: <CAA4NGyuA3qdw08B+W4jXLstK_H0Pp-1aCSZzE4YJimJBN9rfCw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 697 bytes --]

Hi
There is such struct as 'notifier_block'. It has member 'notifier_call'
where You assign pointer to your function (handler) and priority. Then You
register such notifier block to restart handler list.
Then when You type in linux reboot Your function might be invoked (depends
on priority you set and if You don't have registered arm_pm_restart
function which is typically done through device tree) .
My question is should I always return NOTIFY_DONE from my restart handler?
Or can I return some error code? In fact this doesn't make sense to return
any other code value as Your restart handler has to succeed always in order
not to halt system and not to do manually recovery by power off/on.

[-- Attachment #1.2: Type: text/html, Size: 779 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply	other threads:[~2020-03-24 16:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 16:06 Tomek The Messenger [this message]
2020-03-24 16:16 ` Should I return NOTIFY_DONE always from restart handler? Pranay Srivastava

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA4NGyuA3qdw08B+W4jXLstK_H0Pp-1aCSZzE4YJimJBN9rfCw@mail.gmail.com \
    --to=tomekthemessenger@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).