[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1594739258.12900.164.camel@linux.ibm.com>
Date: Tue, 14 Jul 2020 11:07:38 -0400
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Daniel Axtens <dja@...ens.net>, Nayna Jain <nayna@...ux.ibm.com>,
linuxppc-dev@...abs.org
Cc: Michael Ellerman <mpe@...erman.id.au>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] powerpc/pseries: detect secure and trusted boot
state of the system.
On Tue, 2020-07-14 at 16:38 +1000, Daniel Axtens wrote:
> Hi Nayna,
>
> Thanks! Would you be able to fold in some of the information from my
> reply to v1 into the changelog? Until we have public PAPR release with
> it, that information is the extent of the public documentation. It would
> be good to get it into the git log rather than just floating around in
> the mail archives!
>
> A couple of small nits:
>
> > + if (enabled)
> > + goto out;
> > +
> > + if (!of_property_read_u32(of_root, "ibm,secure-boot", &secureboot)) {
> > + if (secureboot)
> > + enabled = (secureboot > 1) ? true : false;
>
> Your tests double up here - you don't need both the 'if' statement and
> the 'secureboot > 1' ternary operator.
>
> Just
>
> + if (!of_property_read_u32(of_root, "ibm,secure-boot", &secureboot)) {
> + enabled = (secureboot > 1) ? true : false;
>
> or even
>
> + if (!of_property_read_u32(of_root, "ibm,secure-boot", &secureboot)) {
> + enabled = (secureboot > 1);
>
> would work.
I haven't been following this thread, which might be the reason I'm
missing something here. The patch description should explain why the
test is for "(secureboot > 1)", rather than a fixed number.
thanks,
Mimi
Powered by blists - more mailing lists