From patchwork Wed Jan 3 21:06:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 13510510 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 28F11C3DA6E for ; Wed, 3 Jan 2024 21:09:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id EA4CEC433C9; Wed, 3 Jan 2024 21:09:11 +0000 (UTC) Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 70D11C433C7 for ; Wed, 3 Jan 2024 21:09:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 70D11C433C7 Authentication-Results: smtp.kernel.org; dmarc=none (p=none dis=none) header.from=skole.hr Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=skole.hr Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 88FFB83D74; Wed, 3 Jan 2024 22:08:57 +0100 (CET) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: Arnd Bergmann , Robert Jarzmik List-Id: Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , zhang songyi , 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 Message-ID: <20240103210604.16877-1-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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ć --- 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