From: Damien Le Moal <damien.lemoal@opensource.wdc.com> To: linux-ide@vger.kernel.org Cc: Arnd Bergmann <arnd@arndb.de>, linux-arm-kernel@lists.infradead.org, Patrice Chotard <patrice.chotard@foss.st.com>, linux-renesas-soc@vger.kernel.org, Sergey Shtylyov <s.shtylyov@omp.ru>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de> Subject: [PATCH 3/6] ata: ahci_brcm: Fix compilation warning Date: Mon, 17 Oct 2022 12:22:02 +0900 [thread overview] Message-ID: <20221017032205.2210188-4-damien.lemoal@opensource.wdc.com> (raw) In-Reply-To: <20221017032205.2210188-1-damien.lemoal@opensource.wdc.com> When compiling with clang and W=1, the following warning is generated: drivers/ata/ahci_brcm.c:451:18: error: cast to smaller integer type 'enum brcm_ahci_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] priv->version = (enum brcm_ahci_version)of_id->data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by using a cast to unsigned long to match the "void *" type size of of_id->data. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> --- drivers/ata/ahci_brcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c index f61795c546cf..6f216eb25610 100644 --- a/drivers/ata/ahci_brcm.c +++ b/drivers/ata/ahci_brcm.c @@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev) if (!of_id) return -ENODEV; - priv->version = (enum brcm_ahci_version)of_id->data; + priv->version = (unsigned long)of_id->data; priv->dev = dev; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl"); -- 2.37.3
WARNING: multiple messages have this Message-ID (diff)
From: Damien Le Moal <damien.lemoal@opensource.wdc.com> To: linux-ide@vger.kernel.org Cc: Arnd Bergmann <arnd@arndb.de>, linux-arm-kernel@lists.infradead.org, Patrice Chotard <patrice.chotard@foss.st.com>, linux-renesas-soc@vger.kernel.org, Sergey Shtylyov <s.shtylyov@omp.ru>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de> Subject: [PATCH 3/6] ata: ahci_brcm: Fix compilation warning Date: Mon, 17 Oct 2022 12:22:02 +0900 [thread overview] Message-ID: <20221017032205.2210188-4-damien.lemoal@opensource.wdc.com> (raw) In-Reply-To: <20221017032205.2210188-1-damien.lemoal@opensource.wdc.com> When compiling with clang and W=1, the following warning is generated: drivers/ata/ahci_brcm.c:451:18: error: cast to smaller integer type 'enum brcm_ahci_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] priv->version = (enum brcm_ahci_version)of_id->data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by using a cast to unsigned long to match the "void *" type size of of_id->data. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> --- drivers/ata/ahci_brcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c index f61795c546cf..6f216eb25610 100644 --- a/drivers/ata/ahci_brcm.c +++ b/drivers/ata/ahci_brcm.c @@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev) if (!of_id) return -ENODEV; - priv->version = (enum brcm_ahci_version)of_id->data; + priv->version = (unsigned long)of_id->data; priv->dev = dev; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl"); -- 2.37.3 _______________________________________________ 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:[~2022-10-17 3:22 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-17 3:21 [PATCH 0/6] Fix compilation warnings Damien Le Moal 2022-10-17 3:21 ` Damien Le Moal 2022-10-17 3:22 ` [PATCH 1/6] ata: ahci_st: Fix compilation warning Damien Le Moal 2022-10-17 3:22 ` Damien Le Moal 2022-10-17 3:22 ` [PATCH 2/6] ata: sata_rcar: " Damien Le Moal 2022-10-17 3:22 ` Damien Le Moal 2022-10-17 7:13 ` Geert Uytterhoeven 2022-10-17 7:13 ` Geert Uytterhoeven 2022-10-17 19:08 ` Sergey Shtylyov 2022-10-17 19:08 ` Sergey Shtylyov 2022-10-17 3:22 ` Damien Le Moal [this message] 2022-10-17 3:22 ` [PATCH 3/6] ata: ahci_brcm: " Damien Le Moal 2022-10-17 19:57 ` Florian Fainelli 2022-10-17 19:57 ` Florian Fainelli 2022-10-17 3:22 ` [PATCH 4/6] ata: ahci_xgene: " Damien Le Moal 2022-10-17 3:22 ` Damien Le Moal 2022-10-17 3:22 ` [PATCH 5/6] ata: ahci_imx: " Damien Le Moal 2022-10-17 3:22 ` Damien Le Moal 2022-10-17 3:22 ` [PATCH 6/6] ata: ahci_qoriq: " Damien Le Moal 2022-10-17 3:22 ` Damien Le Moal 2022-10-17 7:25 ` [PATCH 0/6] Fix compilation warnings Arnd Bergmann 2022-10-17 7:25 ` Arnd Bergmann
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=20221017032205.2210188-4-damien.lemoal@opensource.wdc.com \ --to=damien.lemoal@opensource.wdc.com \ --cc=arnd@arndb.de \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-ide@vger.kernel.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=patrice.chotard@foss.st.com \ --cc=s.hauer@pengutronix.de \ --cc=s.shtylyov@omp.ru \ --cc=shawnguo@kernel.org \ /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: linkBe 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.