From: Tanmay Shah <tanmays@amd.com>
To: Arnd Bergmann <arnd@kernel.org>, Michal Simek <michal.simek@xilinx.com>
Cc: soc@kernel.org, Arnd Bergmann <arnd@arndb.de>,
Tanmay Shah <tanmay.shah@xilinx.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Ben Levinsky <ben.levinsky@amd.com>,
Ronak Jain <ronak.jain@xilinx.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: zynqmp: fix declarations for gcc-13
Date: Tue, 17 Jan 2023 11:53:32 -0800 [thread overview]
Message-ID: <d6166b85-01df-405b-3112-d9bde16b6bd9@amd.com> (raw)
In-Reply-To: <20230117164133.1245749-1-arnd@kernel.org>
Hi, Thanks for your patch.
This looks good to me. Thanks for fixing this.
Something must have gone wrong when I ran sparse check on this patch.
Just one question, does this patch need "fixes:" tag?
On 1/17/23 8:41 AM, Arnd Bergmann wrote:
> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
>
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> gcc-13.0.1 reports a type mismatch for two functions:
>
> drivers/firmware/xilinx/zynqmp.c:1228:5: error: conflicting types for 'zynqmp_pm_set_rpu_mode' due to enum/integer mismatch; have 'int(u32, enum rpu_oper_mode)' {aka 'int(unsigned int, enum rpu_oper_mode)'} [-Werror=enum-int-mismatch]
> 1228 | int zynqmp_pm_set_rpu_mode(u32 node_id, enum rpu_oper_mode rpu_mode)
> | ^~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/firmware/xilinx/zynqmp.c:25:
> include/linux/firmware/xlnx-zynqmp.h:552:5: note: previous declaration of 'zynqmp_pm_set_rpu_mode' with type 'int(u32, u32)' {aka 'int(unsigned int, unsigned int)'}
> 552 | int zynqmp_pm_set_rpu_mode(u32 node_id, u32 arg1);
> | ^~~~~~~~~~~~~~~~~~~~~~
> drivers/firmware/xilinx/zynqmp.c:1246:5: error: conflicting types for 'zynqmp_pm_set_tcm_config' due to enum/integer mismatch; have 'int(u32, enum rpu_tcm_comb)' {aka 'int(unsigned int, enum rpu_tcm_comb)'} [-Werror=enum-int-mismatch]
> 1246 | int zynqmp_pm_set_tcm_config(u32 node_id, enum rpu_tcm_comb tcm_mode)
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/firmware/xlnx-zynqmp.h:553:5: note: previous declaration of 'zynqmp_pm_set_tcm_config' with type 'int(u32, u32)' {aka 'int(unsigned int, unsigned int)'}
> 553 | int zynqmp_pm_set_tcm_config(u32 node_id, u32 arg1);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
>
> Change the declaration in the header to match the function definition.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> include/linux/firmware/xlnx-zynqmp.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> index eb88b4ba62f9..0e4c70987e6a 100644
> --- a/include/linux/firmware/xlnx-zynqmp.h
> +++ b/include/linux/firmware/xlnx-zynqmp.h
> @@ -549,8 +549,8 @@ int zynqmp_pm_request_wake(const u32 node,
> const u64 address,
> const enum zynqmp_pm_request_ack ack);
> int zynqmp_pm_get_rpu_mode(u32 node_id, enum rpu_oper_mode *rpu_mode);
> -int zynqmp_pm_set_rpu_mode(u32 node_id, u32 arg1);
> -int zynqmp_pm_set_tcm_config(u32 node_id, u32 arg1);
> +int zynqmp_pm_set_rpu_mode(u32 node_id, enum rpu_oper_mode rpu_mode);
> +int zynqmp_pm_set_tcm_config(u32 node_id, enum rpu_tcm_comb tcm_mode);
> int zynqmp_pm_set_sd_config(u32 node, enum pm_sd_config_type config, u32 value);
> int zynqmp_pm_set_gem_config(u32 node, enum pm_gem_config_type config,
> u32 value);
> @@ -849,12 +849,12 @@ static inline int zynqmp_pm_get_rpu_mode(u32 node_id, enum rpu_oper_mode *rpu_mo
> return -ENODEV;
> }
>
> -static inline int zynqmp_pm_set_rpu_mode(u32 node_id, u32 arg1)
> +static inline int zynqmp_pm_set_rpu_mode(u32 node_id, enum rpu_oper_mode rpu_mode)
> {
> return -ENODEV;
> }
>
> -static inline int zynqmp_pm_set_tcm_config(u32 node_id, u32 arg1)
> +static inline int zynqmp_pm_set_tcm_config(u32 node_id, enum rpu_tcm_comb tcm_mode)
> {
> return -ENODEV;
> }
> --
> 2.39.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-01-17 19:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 16:41 [PATCH] firmware: zynqmp: fix declarations for gcc-13 Arnd Bergmann
2023-01-17 19:53 ` Tanmay Shah [this message]
2023-01-17 20:03 ` Arnd Bergmann
2023-01-17 20:14 ` Tanmay Shah
2023-01-18 7:29 ` Michal Simek
2023-01-18 7:31 ` Arnd Bergmann
2023-01-18 7:38 ` Michal Simek
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=d6166b85-01df-405b-3112-d9bde16b6bd9@amd.com \
--to=tanmays@amd.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=ben.levinsky@amd.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=michal.simek@xilinx.com \
--cc=ronak.jain@xilinx.com \
--cc=soc@kernel.org \
--cc=tanmay.shah@xilinx.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).