From: Borislav Petkov <bp@alien8.de>
To: Avadhut Naik <avadhut.naik@amd.com>
Cc: linux-acpi@vger.kernel.org, rafael@kernel.org, lenb@kernel.org,
james.morse@arm.com, tony.luck@intel.com,
gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, alexey.kardashevskiy@amd.com,
yazen.ghannam@amd.com, avadnaik@amd.com
Subject: Re: [RESEND v5 1/4] ACPI: APEI: EINJ: Refactor available_error_type_show()
Date: Wed, 8 Nov 2023 21:19:05 +0100 [thread overview]
Message-ID: <20231108201905.GCZUvtOSDkVqFPBmfk@fat_crate.local> (raw)
In-Reply-To: <20231107213647.1405493-2-avadhut.naik@amd.com>
On Tue, Nov 07, 2023 at 03:36:44PM -0600, Avadhut Naik wrote:
> +static struct { u32 mask; const char *str; } const einj_error_type_string[] = {
> + {BIT(0), "Processor Correctable"},
> + {BIT(1), "Processor Uncorrectable non-fatal"},
> + {BIT(2), "Processor Uncorrectable fatal"},
> + {BIT(3), "Memory Correctable"},
> + {BIT(4), "Memory Uncorrectable non-fatal"},
> + {BIT(5), "Memory Uncorrectable fatal"},
> + {BIT(6), "PCI Express Correctable"},
> + {BIT(7), "PCI Express Uncorrectable non-fatal"},
> + {BIT(8), "PCI Express Uncorrectable fatal"},
> + {BIT(9), "Platform Correctable"},
> + {BIT(10), "Platform Uncorrectable non-fatal"},
> + {BIT(11), "Platform Uncorrectable fatal"},
> + {BIT(12), "CXL.cache Protocol Correctable"},
> + {BIT(13), "CXL.cache Protocol Uncorrectable non-fatal"},
> + {BIT(14), "CXL.cache Protocol Uncorrectable fatal"},
> + {BIT(15), "CXL.mem Protocol Correctable"},
> + {BIT(16), "CXL.mem Protocol Uncorrectable non-fatal"},
> + {BIT(17), "CXL.mem Protocol Uncorrectable fatal"},
Might as well put spaces between the '{' and '}' brackets for better
readability.
> static int available_error_type_show(struct seq_file *m, void *v)
> @@ -607,8 +607,9 @@ static int available_error_type_show(struct seq_file *m, void *v)
> if (rc)
> return rc;
> for (int pos = 0; pos < ARRAY_SIZE(einj_error_type_string); pos++)
> - if (available_error_type & BIT(pos))
> - seq_puts(m, einj_error_type_string[pos]);
> + if (available_error_type & einj_error_type_string[pos].mask)
Call that variable simply "error_type". Those are simple functions, one
can see that it is the available error type.
> + seq_printf(m, "0x%08x\t%s\n", einj_error_type_string[pos].mask,
> + einj_error_type_string[pos].str);
>
> return 0;
But those are just nitpicks.
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2023-11-08 20:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 21:36 [RESEND v5 0/4] Add support for Vendor Defined Error Types in Einj Module Avadhut Naik
2023-11-07 21:36 ` [RESEND v5 1/4] ACPI: APEI: EINJ: Refactor available_error_type_show() Avadhut Naik
2023-11-08 20:19 ` Borislav Petkov [this message]
2023-11-16 21:46 ` Avadhut Naik
2023-11-07 21:36 ` [RESEND v5 2/4] fs: debugfs: Add write functionality to debugfs blobs Avadhut Naik
2023-11-07 22:28 ` Luck, Tony
2023-11-08 18:09 ` Avadhut Naik
2023-11-16 17:54 ` Avadhut Naik
2023-11-16 18:44 ` Luck, Tony
2023-11-16 21:46 ` Avadhut Naik
2023-11-07 21:36 ` [RESEND v5 3/4] platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo Avadhut Naik
2023-11-07 22:35 ` Luck, Tony
2023-11-08 18:11 ` Avadhut Naik
2023-11-07 21:36 ` [RESEND v5 4/4] ACPI: APEI: EINJ: Add support for vendor defined error types Avadhut Naik
2023-11-07 22:41 ` Luck, Tony
2023-11-15 12:33 ` Borislav Petkov
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=20231108201905.GCZUvtOSDkVqFPBmfk@fat_crate.local \
--to=bp@alien8.de \
--cc=alexey.kardashevskiy@amd.com \
--cc=avadhut.naik@amd.com \
--cc=avadnaik@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
--cc=yazen.ghannam@amd.com \
/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®