From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Jeetesh Burman <jburman@nvidia.com>
Cc: sergey.senozhatsky@gmail.com, keescook@chromium.org,
linux-kernel@vger.kernel.org, bbasu@nvidia.com
Subject: Re: [PATCH] panic: add support to update panic_timeout via DT
Date: Fri, 27 Oct 2017 17:00:06 +0900 [thread overview]
Message-ID: <20171027080006.GA609@tigerII.localdomain> (raw)
In-Reply-To: <1509076662-22253-1-git-send-email-jburman@nvidia.com>
On (10/27/17 09:27), Jeetesh Burman wrote:
> Add support to set 'panic_timeout' value via dtb to have
> control from device tree. This makes sense when you have
> multiple platforms support from same defconfig and
> differentiated only through device tree blob.
> The patch will check for panic time out value coming
> from dtb if it exists, otherwise continues with
> defconfig provided option.
*my personal opinion* - I'm not super happy to see more and more
of_find_node_by_name()'s in random places. but that's just IMHO.
> static int init_oops_id(void)
> {
> + struct device_node *np;
> +
> + np = of_find_node_by_name(NULL, "panic_timeout");
> + if (np)
> + of_property_read_u32(np, "panic-timeout-value", &panic_timeout);
> +
> if (!oops_id)
> get_random_bytes(&oops_id, sizeof(oops_id));
> else
why init_oops_id()? you are going to re-read it every time you call
print_oops_end_marker(), and the system can be configured not to
panic on oops. put it to oops_setup()? or, at least, move it to
`if (!oops_id)' branch, maybe?
-ss
next prev parent reply other threads:[~2017-10-27 8:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 3:57 Jeetesh Burman
2017-10-27 8:00 ` Sergey Senozhatsky [this message]
2017-10-27 9:39 ` Jeetesh Burman
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=20171027080006.GA609@tigerII.localdomain \
--to=sergey.senozhatsky@gmail.com \
--cc=bbasu@nvidia.com \
--cc=jburman@nvidia.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®