From patchwork Tue Dec 26 20:01:12 2023 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: 183366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1070440dyb; Tue, 26 Dec 2023 12:01:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCcvgmhBteo0OKZ1mwh2mZGtAbYuRQvGXxhgGDWVT1c2pVVsXMel/2kt3KKf6BVgxpSvCj X-Received: by 2002:a05:600c:3b06:b0:40d:5b80:bdf1 with SMTP id m6-20020a05600c3b0600b0040d5b80bdf1mr579791wms.1.1703620914852; Tue, 26 Dec 2023 12:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703620914; cv=none; d=google.com; s=arc-20160816; b=VXy7zJqx/RxSR9O54L19CFedg31rs/xP3dEWaVLob/1g+lpH7d9HLuYB3tv2Xjj/Dj En4q+QkF681YbHr8BLMGGajK4BoR/UtnxR4YBQIRQxGyEOsDjQ8jm34GnJamxF2LWhpq Dh0hOI9DBWEpPgiIX1lKwK9e1PE3t5nK7c5HcLWHoZ71Arp0q7YyuUcmNnAZN1wPfYD2 CyXN3toq1iSEgrV/wVAn1U10ynVgGSALcw28EIV7pGf3gNCcqfeKKFTPUQ2NGYgWExxH BkDj4J4vunrqdjBkWKtWdGFVW5WdZKZ/uU7BeftYT62V1bEzvn79qJsGt4TzfM0wVT/U gCRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=G4AM82oZYIXq2htDHH8TV1zOK+hr62MWik7xdTn6Olk=; fh=DQ7KPVpAhxYTTDeTqJBMsrOpk08z4C7WXj5hbW7QRz4=; b=xMr2UesoXgDbFA5N4kxhT/Lv3diGECcoJ44XDiwpweZk8dj+WW/25putD3aYSi9h+X titTDmolHwRJZbjg3G53DKpsfIIHVsxrmkuY0fzCRQpeZJLgtmZP4rzdw8kDPfuff69Q Uf1PU4rnh1b+oiFiZ3FtQH5MSK1bq5iVhCfBCAhIuNKx31WTeDSG5DBVKR9rggoOxyLj jzNQwMfILBoUOr/EBPS/xVUl9vpLXXCnFLZSrdYtKbr2Pm2OmqdeY0MbRnB2Wyr1tyFG pNpsKUrzqMpSKv3rxRA4OkZFQSQCDpkVQYc0JROhdnCz3VU7Eu7zrnkx5m/RHwqpL9aG Y7GA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-11664-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11664-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o8-20020a170906288800b00a2341b26dc8si5864366ejd.569.2023.12.26.12.01.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 12:01:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11664-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-11664-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11664-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 759CF1F21922 for ; Tue, 26 Dec 2023 20:01:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC5CA4C97; Tue, 26 Dec 2023 20:01:37 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B4C423C6 for ; Tue, 26 Dec 2023 20:01:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=skole.hr Authentication-Results: smtp.subspace.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 4299384035 for ; Tue, 26 Dec 2023 21:01:30 +0100 (CET) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= Subject: [PATCH RFC] soc: pxa: ssp: Cast to enum pxa_ssp_type instead of int Date: Tue, 26 Dec 2023 21:01:12 +0100 Message-ID: <20231226200113.31551-1-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786376004602462879 X-GMAIL-MSGID: 1786376004602462879 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