All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Duje Mihanović" <duje.mihanovic@skole.hr>
To: Arnd Bergmann <arnd@arndb.de>, Robert Jarzmik <robert.jarzmik@free.fr>
Cc: "Duje Mihanović" <duje.mihanovic@skole.hr>,
	"Lubomir Rintel" <lkundrak@v3.sk>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"zhang songyi" <zhang.songyi@zte.com.cn>,
	soc@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH RFC RESEND] soc: pxa: ssp: Cast to enum pxa_ssp_type instead of int
Date: Wed,  3 Jan 2024 22:06:03 +0100	[thread overview]
Message-ID: <20240103210604.16877-1-duje.mihanovic@skole.hr> (raw)

On ARM64 platforms, id->data is a 64-bit value and casting it to a
32-bit integer causes build errors. Cast it to the corresponding enum
instead.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
This patch is necessary for my Marvell PXA1908 series to compile successfully
with allyesconfig:
https://lore.kernel.org/all/20231102-pxa1908-lkml-v7-0-cabb1a0cb52b@skole.hr/
---
 drivers/soc/pxa/ssp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c
index a1e8a07f7275..e2ffd8fd7e13 100644
--- a/drivers/soc/pxa/ssp.c
+++ b/drivers/soc/pxa/ssp.c
@@ -152,11 +152,11 @@ static int pxa_ssp_probe(struct platform_device *pdev)
 	if (dev->of_node) {
 		const struct of_device_id *id =
 			of_match_device(of_match_ptr(pxa_ssp_of_ids), dev);
-		ssp->type = (int) id->data;
+		ssp->type = (enum pxa_ssp_type) id->data;
 	} else {
 		const struct platform_device_id *id =
 			platform_get_device_id(pdev);
-		ssp->type = (int) id->driver_data;
+		ssp->type = (enum pxa_ssp_type) id->driver_data;
 
 		/* PXA2xx/3xx SSP ports starts from 1 and the internal pdev->id
 		 * starts from 0, do a translation here
-- 
2.43.0



             reply	other threads:[~2024-01-03 21:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 21:06 Duje Mihanović [this message]
2024-01-04  9:08 ` [PATCH RFC RESEND] soc: pxa: ssp: Cast to enum pxa_ssp_type instead of int Uwe Kleine-König
2024-01-04  9:08   ` Uwe Kleine-König
2024-01-04 10:03   ` Arnd Bergmann
2024-01-04 10:03     ` Arnd Bergmann
2024-01-04 12:02     ` Uwe Kleine-König
2024-01-04 12:02       ` Uwe Kleine-König
2024-01-04 14:23     ` Duje Mihanović
2024-01-04 14:23       ` Duje Mihanović
2024-01-06 12:08       ` Uwe Kleine-König
2024-01-06 12:08         ` Uwe Kleine-König

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=20240103210604.16877-1-duje.mihanovic@skole.hr \
    --to=duje.mihanovic@skole.hr \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=robert.jarzmik@free.fr \
    --cc=soc@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=zhang.songyi@zte.com.cn \
    /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.