diff mbox series

[1/2] x86: Add an enum name for the GNVS firmware type

Message ID 20220228221813.1524042-1-sjg@chromium.org
State Superseded
Delegated to: Bin Meng
Headers show
Series [1/2] x86: Add an enum name for the GNVS firmware type | expand

Commit Message

Simon Glass Feb. 28, 2022, 10:18 p.m. UTC
This enum is currently anonymous. Add a name so it can be used in the
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/include/asm/intel_gnvs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bin Meng March 3, 2022, 8:49 a.m. UTC | #1
Hi Simon,

On Tue, Mar 1, 2022 at 6:18 AM Simon Glass <sjg@chromium.org> wrote:
>
> This enum is currently anonymous. Add a name so it can be used in the
> code.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/include/asm/intel_gnvs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/intel_gnvs.h b/arch/x86/include/asm/intel_gnvs.h
> index fc743dc928..b12d7f9485 100644
> --- a/arch/x86/include/asm/intel_gnvs.h
> +++ b/arch/x86/include/asm/intel_gnvs.h
> @@ -47,7 +47,7 @@ enum {
>         BINF_RW_B = 2
>  };
>
> -enum {
> +enum cros_fw_type_t {

The name indicates this is chrome os only, but it should be a generic name, no?

>         FIRMWARE_TYPE_AUTO_DETECT = -1,
>         FIRMWARE_TYPE_RECOVERY = 0,
>         FIRMWARE_TYPE_NORMAL = 1,


Regards,
Bin
Simon Glass March 4, 2022, 2:37 a.m. UTC | #2
Hi Bin,

On Thu, 3 Mar 2022 at 01:49, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Tue, Mar 1, 2022 at 6:18 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > This enum is currently anonymous. Add a name so it can be used in the
> > code.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  arch/x86/include/asm/intel_gnvs.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/include/asm/intel_gnvs.h b/arch/x86/include/asm/intel_gnvs.h
> > index fc743dc928..b12d7f9485 100644
> > --- a/arch/x86/include/asm/intel_gnvs.h
> > +++ b/arch/x86/include/asm/intel_gnvs.h
> > @@ -47,7 +47,7 @@ enum {
> >         BINF_RW_B = 2
> >  };
> >
> > -enum {
> > +enum cros_fw_type_t {
>
> The name indicates this is chrome os only, but it should be a generic name, no?
>
> >         FIRMWARE_TYPE_AUTO_DETECT = -1,
> >         FIRMWARE_TYPE_RECOVERY = 0,
> >         FIRMWARE_TYPE_NORMAL = 1,

Well, this field is only used on Chromium OS. It has its own section
of the GNVS.

Regards,
Simon
Bin Meng March 4, 2022, 10:57 a.m. UTC | #3
Hi Simon,

On Fri, Mar 4, 2022 at 10:38 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Bin,
>
> On Thu, 3 Mar 2022 at 01:49, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Hi Simon,
> >
> > On Tue, Mar 1, 2022 at 6:18 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > This enum is currently anonymous. Add a name so it can be used in the
> > > code.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > ---
> > >
> > >  arch/x86/include/asm/intel_gnvs.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/x86/include/asm/intel_gnvs.h b/arch/x86/include/asm/intel_gnvs.h
> > > index fc743dc928..b12d7f9485 100644
> > > --- a/arch/x86/include/asm/intel_gnvs.h
> > > +++ b/arch/x86/include/asm/intel_gnvs.h
> > > @@ -47,7 +47,7 @@ enum {
> > >         BINF_RW_B = 2
> > >  };
> > >
> > > -enum {
> > > +enum cros_fw_type_t {
> >
> > The name indicates this is chrome os only, but it should be a generic name, no?
> >
> > >         FIRMWARE_TYPE_AUTO_DETECT = -1,
> > >         FIRMWARE_TYPE_RECOVERY = 0,
> > >         FIRMWARE_TYPE_NORMAL = 1,
>
> Well, this field is only used on Chromium OS. It has its own section
> of the GNVS.

Better put some comments.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Regards,
Bin
diff mbox series

Patch

diff --git a/arch/x86/include/asm/intel_gnvs.h b/arch/x86/include/asm/intel_gnvs.h
index fc743dc928..b12d7f9485 100644
--- a/arch/x86/include/asm/intel_gnvs.h
+++ b/arch/x86/include/asm/intel_gnvs.h
@@ -47,7 +47,7 @@  enum {
 	BINF_RW_B = 2
 };
 
-enum {
+enum cros_fw_type_t {
 	FIRMWARE_TYPE_AUTO_DETECT = -1,
 	FIRMWARE_TYPE_RECOVERY = 0,
 	FIRMWARE_TYPE_NORMAL = 1,