All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yin Li" <yin.li@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH RFC v2 04/10] cacheinfo: Expose the code to generate a cache-id from a device_node
Date: Mon, 14 Sep 2026 09:52:28 +0000	[thread overview]
Message-ID: <20260914095229.41F851F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914-mpam-resctrl-dt-knp-support-v2-4-bf6645bb2f65@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The newly exported `cache_of_calculate_id()` API is conditionally declared without providing a static inline fallback, forcing callers to use preprocessor `#ifdef` guards rather than `IS_ENABLED()`.
--

commit 8b22a5b7c500764e08eb7b259467554e27f1adfe
Author: James Morse <james.morse@arm.com>

cacheinfo: Expose the code to generate a cache-id from a device_node

This commit exposes the cache_of_calculate_id() function to allow early
parts of the MPAM driver to set up resctrl structures before cacheinfo
is ready. It extracts the calculation logic and adds a declaration
guarded by CONFIG_OF in the cacheinfo header.

> diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h
> index fc879ac4cc4f2..c33bb3c8bd633 100644
> --- a/include/linux/cacheinfo.h
> +++ b/include/linux/cacheinfo.h
> @@ -113,6 +113,9 @@ int acpi_get_cache_info(unsigned int cpu,
>  #endif
>  
>  const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf);
> +#ifdef CONFIG_OF
> +u32 cache_of_calculate_id(struct device_node *np);
> +#endif

[Severity: Low]
Does this conditionally exported API need a static inline fallback for when
CONFIG_OF is disabled?

Without a stub for the !CONFIG_OF case in include/linux/cacheinfo.h, any
future caller using if (IS_ENABLED(CONFIG_OF)) to guard a call to
cache_of_calculate_id() will fail to compile due to an implicit function
declaration error. Should a static inline fallback be added to avoid forcing
callers to use preprocessor #ifdef guards?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-mpam-resctrl-dt-knp-support-v2-0-bf6645bb2f65@oss.qualcomm.com?part=4

  reply	other threads:[~2026-09-14  9:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  9:37 [PATCH RFC v2 00/10] arm-mpam: Add basic device tree support for resctrl Yin Li
2026-09-14  9:37 ` [PATCH RFC v2 01/10] arm_mpam: Fix the RIS index range check in mpam_ris_create_locked Yin Li
2026-10-02 15:50   ` Ben Horgan
2026-09-14  9:37 ` [PATCH RFC v2 02/10] arm_mpam: Fix MSC MMIO window size off-by-one with resource_size() Yin Li
2026-09-14  9:58   ` sashiko-bot
2026-09-14  9:37 ` [PATCH RFC v2 03/10] dt-bindings: arm: Add MPAM MSC binding Yin Li
2026-09-14 14:41   ` Andre Przywara
2026-09-14 14:50     ` Andre Przywara
2026-09-15  2:49       ` Yin Li
2026-09-14  9:37 ` [PATCH RFC v2 04/10] cacheinfo: Expose the code to generate a cache-id from a device_node Yin Li
2026-09-14  9:52   ` sashiko-bot [this message]
2026-09-14 12:26   ` Andre Przywara
2026-09-15  6:49     ` Yin Li
2026-09-15  7:59       ` Andre Przywara
2026-09-16  2:29         ` Yin Li
2026-09-14  9:37 ` [PATCH RFC v2 05/10] arm_mpam: Add device tree support for MSC probing Yin Li
2026-09-14  9:52   ` sashiko-bot
2026-09-14  9:37 ` [PATCH RFC v2 06/10] arm_mpam: Add support for memory controller MSC on DT platforms Yin Li
2026-09-14  9:53   ` sashiko-bot
2026-09-14  9:37 ` [PATCH RFC v2 07/10] arm_mpam: Fix mpam_dt_create_foundling_msc() to create MSC platform devices Yin Li
2026-09-14  9:58   ` sashiko-bot
2026-09-23  2:59   ` Yin Li
2026-09-14  9:37 ` [PATCH RFC v2 08/10] dt-bindings: arm: Fix MPAM MSC binding schema and examples Yin Li
2026-09-14  9:37 ` [PATCH RFC v2 09/10] arm_mpam: Support MSC accessibility derivation from RIS nodes Yin Li
2026-09-14  9:37 ` [PATCH DNM RFC v2 10/10] arm64: dts: qcom: kaanapali: Add MPAM MSC nodes for the L2 caches Yin Li
2026-09-14  9:59   ` sashiko-bot

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=20260914095229.41F851F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=yin.li@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.