From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Michael J. Ruhl" <michael.j.ruhl@intel.com>
Cc: platform-driver-x86@vger.kernel.org,
intel-xe@lists.freedesktop.org, Hans de Goede <hansg@kernel.org>,
matthew.brost@intel.com, rodrigo.vivi@intel.com,
thomas.hellstrom@linux.intel.com, airlied@gmail.com,
simona@ffwll.ch, david.e.box@linux.intel.com,
anoop.c.vijay@intel.com, badal.nilawar@intel.com,
matthew.d.roper@intel.com, james.ausmus@intel.com,
karthik.poosa@intel.com
Subject: Re: [PATCH v9 03/20] platform/x86/intel/pmt: refactor rc with a return value
Date: Thu, 17 Sep 2026 12:55:06 +0300 (EEST) [thread overview]
Message-ID: <b5c31da5-99f4-1474-53e0-46359fbcdcd8@linux.intel.com> (raw)
In-Reply-To: <20260916201139.2374531-25-michael.j.ruhl@intel.com>
On Wed, 16 Sep 2026, Michael J. Ruhl wrote:
> Upcoming changes will include possible failures from HW accesses.
>
> Refactor pmt_crashlog_rw() with a return value.
>
> Update all necessary usage to use the return code.
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
> ---
> drivers/platform/x86/intel/pmt/crashlog.c | 101 ++++++++++++++++------
> 1 file changed, 74 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/pmt/crashlog.c b/drivers/platform/x86/intel/pmt/crashlog.c
> index 831cff743803..b6540f3a9a17 100644
> --- a/drivers/platform/x86/intel/pmt/crashlog.c
> +++ b/drivers/platform/x86/intel/pmt/crashlog.c
> @@ -144,27 +144,29 @@ static int pmt_crashlog_rmw(struct crashlog_entry *crashlog, u32 bit, bool set)
> }
>
> /* Read the status register and see if the specified @bit is set */
> -static bool pmt_crashlog_rc(struct crashlog_entry *crashlog, u32 bit)
> +static int pmt_crashlog_rc(struct crashlog_entry *crashlog, u32 bit, bool *state)
> {
> const struct crashlog_status *status = &crashlog->info->status;
> u32 reg = readl(crashlog->entry.disc_table + status->offset);
>
> - return !!(reg & bit);
> + *state = !!(reg & bit);
> +
> + return 0;
> }
>
> -static bool pmt_crashlog_complete(struct crashlog_entry *crashlog)
> +static int pmt_crashlog_complete(struct crashlog_entry *crashlog, bool *state)
> {
> /* return current value of the crashlog complete flag */
> - return pmt_crashlog_rc(crashlog, crashlog->info->status.complete);
> + return pmt_crashlog_rc(crashlog, crashlog->info->status.complete, state);
> }
>
> -static bool pmt_crashlog_disabled(struct crashlog_entry *crashlog)
> +static int pmt_crashlog_disabled(struct crashlog_entry *crashlog, bool *state)
> {
> /* return current value of the crashlog disabled flag */
> - return pmt_crashlog_rc(crashlog, crashlog->info->status.disabled);
> + return pmt_crashlog_rc(crashlog, crashlog->info->status.disabled, state);
> }
>
> -static bool pmt_crashlog_supported(struct intel_pmt_entry *entry, u32 *crash_type, u32 *version)
> +static int pmt_crashlog_supported(struct intel_pmt_entry *entry, u32 *crash_type, u32 *version)
> {
> u32 discovery_header = readl(entry->disc_table + CONTROL_OFFSET);
>
This function still contains return true and false within even if you
changed the return type (and it "works" because of implicit conversions
but better to correct that inconsistency).
(Found by sashiko.)
--
i.
next prev parent reply other threads:[~2026-09-17 9:55 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 20:11 [PATCH v9 00/20] Crescent Island PMT support Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 01/20] platform/x86/intel/pmt: complete pcidev to device update Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 02/20] platform/x86/intel/pmt: refactor rmw with a return value Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 03/20] platform/x86/intel/pmt: refactor rc " Michael J. Ruhl
2026-09-17 9:55 ` Ilpo Järvinen [this message]
2026-09-16 20:11 ` [PATCH v9 04/20] platform/x86/intel/pmt: Add register access callbacks Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 05/20] platform/x86/intel/pmt: Do not remap when using callbacks Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 06/20] drm/xe/vsec: Do not register BMG PMT for VF Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 07/20] drm/xe/vsec: Correct locking order Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 08/20] drm/xe/vsec: Use correct pm state get Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 09/20] drm/xe/vsec: Add DOC text for VSEC Michael J. Ruhl
2026-09-17 9:56 ` Ilpo Järvinen
2026-09-17 9:57 ` Ilpo Järvinen
2026-09-17 12:55 ` Ruhl, Michael J
2026-09-16 20:11 ` [PATCH v9 10/20] drm/xe/vsec: Support possible hotplug exit Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 11/20] drm/xe/vsec: Refactor BattleMage PMT defines Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 12/20] drm/xe/vsec: Update VSEC probe order Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 13/20] drm/xe/vsec: Add base_offset to allow for more flexibilty Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 14/20] drm/xe/vsec: Support Crescent Island PMT Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 15/20] drm/xe/vsec: Crescent Island PMT decode Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 16/20] drm/xe/vsec: Crescent Island PMT callbacks Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 17/20] drm/xe/vsec: Support late bind fw information Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 18/20] drm/xe/vsec: Add PMT GUID internal access Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 19/20] drm/xe/vsec: Update PMT " Michael J. Ruhl
2026-09-16 20:11 ` [PATCH v9 20/20] drm/xe/vsec: Refactor platform check Michael J. Ruhl
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=b5c31da5-99f4-1474-53e0-46359fbcdcd8@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=airlied@gmail.com \
--cc=anoop.c.vijay@intel.com \
--cc=badal.nilawar@intel.com \
--cc=david.e.box@linux.intel.com \
--cc=hansg@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=james.ausmus@intel.com \
--cc=karthik.poosa@intel.com \
--cc=matthew.brost@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=michael.j.ruhl@intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.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