From: Russ Weight <russell.h.weight@intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Wu Hao" <hao.wu@intel.com>, "Tom Rix" <trix@redhat.com>,
"Moritz Fischer" <mdf@kernel.org>,
"Xu Yilun" <yilun.xu@intel.com>,
linux-fpga@vger.kernel.org, "Lee Jones" <lee@kernel.org>,
"Jean Delvare" <jdelvare@suse.com>,
"Guenter Roeck" <linux@roeck-us.net>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] mfd: intel-m10-bmc: Move m10bmc_sys_read() away from header
Date: Wed, 5 Apr 2023 11:40:22 -0700 [thread overview]
Message-ID: <52a15482-b23c-e772-4a56-0f4a09f3af17@intel.com> (raw)
In-Reply-To: <20230405080152.6732-4-ilpo.jarvinen@linux.intel.com>
On 4/5/23 01:01, Ilpo Järvinen wrote:
> Move m10bmc_sys_read() out from the header to prepare it for adding
> more code into the function which would make it too large to be a
> static inline any more.
>
> While at it, replace the vague wording in function comment with more
> precise statements.
Reviewed-by: Russ Weight <russell.h.weight@intel.com>
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> drivers/hwmon/intel-m10-bmc-hwmon.c | 1 +
> drivers/mfd/intel-m10-bmc-core.c | 14 ++++++++++++++
> include/linux/mfd/intel-m10-bmc.h | 17 +----------------
> 3 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/hwmon/intel-m10-bmc-hwmon.c b/drivers/hwmon/intel-m10-bmc-hwmon.c
> index 2f0323c14bab..92900ce7986b 100644
> --- a/drivers/hwmon/intel-m10-bmc-hwmon.c
> +++ b/drivers/hwmon/intel-m10-bmc-hwmon.c
> @@ -794,3 +794,4 @@ MODULE_DEVICE_TABLE(platform, intel_m10bmc_hwmon_ids);
> MODULE_AUTHOR("Intel Corporation");
> MODULE_DESCRIPTION("Intel MAX 10 BMC hardware monitor");
> MODULE_LICENSE("GPL");
> +MODULE_IMPORT_NS(INTEL_M10_BMC_CORE);
> diff --git a/drivers/mfd/intel-m10-bmc-core.c b/drivers/mfd/intel-m10-bmc-core.c
> index 879d98b9b14d..4a1bfe135293 100644
> --- a/drivers/mfd/intel-m10-bmc-core.c
> +++ b/drivers/mfd/intel-m10-bmc-core.c
> @@ -12,6 +12,20 @@
> #include <linux/mfd/intel-m10-bmc.h>
> #include <linux/module.h>
>
> +/*
> + * This function helps to simplify the accessing of the system registers.
> + *
> + * The base of the system registers is configured through the struct
> + * csr_map.
> + */
> +int m10bmc_sys_read(struct intel_m10bmc *m10bmc, unsigned int offset, unsigned int *val)
> +{
> + const struct m10bmc_csr_map *csr_map = m10bmc->info->csr_map;
> +
> + return m10bmc_raw_read(m10bmc, csr_map->base + offset, val);
> +}
> +EXPORT_SYMBOL_NS_GPL(m10bmc_sys_read, INTEL_M10_BMC_CORE);
> +
> int m10bmc_sys_update_bits(struct intel_m10bmc *m10bmc, unsigned int offset,
> unsigned int msk, unsigned int val)
> {
> diff --git a/include/linux/mfd/intel-m10-bmc.h b/include/linux/mfd/intel-m10-bmc.h
> index 5418f7279ed0..252644fa61be 100644
> --- a/include/linux/mfd/intel-m10-bmc.h
> +++ b/include/linux/mfd/intel-m10-bmc.h
> @@ -267,22 +267,7 @@ m10bmc_raw_read(struct intel_m10bmc *m10bmc, unsigned int addr,
> return ret;
> }
>
> -/*
> - * The base of the system registers could be configured by HW developers, and
> - * in HW SPEC, the base is not added to the addresses of the system registers.
> - *
> - * This function helps to simplify the accessing of the system registers. And if
> - * the base is reconfigured in HW, SW developers could simply change the
> - * csr_map's base accordingly.
> - */
> -static inline int m10bmc_sys_read(struct intel_m10bmc *m10bmc, unsigned int offset,
> - unsigned int *val)
> -{
> - const struct m10bmc_csr_map *csr_map = m10bmc->info->csr_map;
> -
> - return m10bmc_raw_read(m10bmc, csr_map->base + offset, val);
> -}
> -
> +int m10bmc_sys_read(struct intel_m10bmc *m10bmc, unsigned int offset, unsigned int *val);
> int m10bmc_sys_update_bits(struct intel_m10bmc *m10bmc, unsigned int offset,
> unsigned int msk, unsigned int val);
>
next prev parent reply other threads:[~2023-04-05 18:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 8:01 [PATCH 0/4] Manage register access to control delay during sec update Ilpo Järvinen
2023-04-05 8:01 ` [PATCH 1/4] mfd: intel-m10-bmc: Move core symbols to own namespace Ilpo Järvinen
2023-04-05 18:38 ` Russ Weight
2023-04-07 6:26 ` Xu Yilun
2023-04-11 11:40 ` Ilpo Järvinen
2023-04-05 8:01 ` [PATCH 2/4] mfd: intel-m10-bmc: Create m10bmc_sys_update_bits() Ilpo Järvinen
2023-04-05 8:01 ` [PATCH 3/4] mfd: intel-m10-bmc: Move m10bmc_sys_read() away from header Ilpo Järvinen
2023-04-05 12:43 ` Guenter Roeck
2023-04-05 18:40 ` Russ Weight [this message]
2023-04-05 8:01 ` [PATCH 4/4] mfd: intel-m10-bmc: Manage access to MAX 10 fw handshake registers Ilpo Järvinen
2023-04-07 6:10 ` Xu Yilun
2023-04-11 11:45 ` Ilpo Järvinen
2023-04-07 6:18 ` Xu Yilun
2023-04-11 11:54 ` Ilpo Järvinen
2023-04-14 11:45 ` Xu Yilun
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=52a15482-b23c-e772-4a56-0f4a09f3af17@intel.com \
--to=russell.h.weight@intel.com \
--cc=hao.wu@intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jdelvare@suse.com \
--cc=lee@kernel.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mdf@kernel.org \
--cc=trix@redhat.com \
--cc=yilun.xu@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;
as well as URLs for NNTP newsgroup(s).