From patchwork Sat Jan 6 14:11:33 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: 185637 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp127385dyq; Sat, 6 Jan 2024 06:12:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0VO1Uwkcxc2rFWx/6wjMyBxOglYIu8pWcW+4hmFhw2aFTH+NS9nwc4coleROpHu/3HddO X-Received: by 2002:a50:cd4c:0:b0:557:a2c:d2b7 with SMTP id d12-20020a50cd4c000000b005570a2cd2b7mr539950edj.6.1704550351939; Sat, 06 Jan 2024 06:12:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704550351; cv=none; d=google.com; s=arc-20160816; b=CEz/IfrWqTDtj5NCDNpUKHxNFuxt9E8+pAh26DXDmty8shT6kAiKniu7QN47sBdy4+ BVcOUqMhJ/zoOwg21VGC8hd+1ijUocnRVlZUyN9IzIHZOX7ZLVxHEI2ZPEXIj/QHtFIw iL6hEAqDGTJ9zYCKksDC6HQV/acfj3Y3VgZwAPHnWpv3zs8PLJaTWw1MCYQ/uPGuJnUe ZFQCVJ35XHWA5Lx07SFSy4q3Ehq7p6I7FfLvZcF+lsbda93s9aJin04EFIZahTLVNQjV 7X7gRQuhywcLayoFVw6pu7AkjsUILPLZI11HsbeEsRtK9hm21hcig/F2zGdDem4uLUrM fljA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from; bh=ryCBYAGyokNfWGJ3XgGQVthP5hCjqjD2lPxn9Lcymm8=; fh=xu7r/koAfpn3gcpnn3OUAQpIIfSId/PvKQ41+04+eXY=; b=n30eFvBBF86F+hkDe2KF0cvKTJ33myDprCgragAX91y+HZimFXEnmPpSyt/7wf/Ood zawIjXZjb1GB1x8gDhWs09qita3yl3sp3rjrppqHrdZax8uNAmUNa/c7RL9fzdTV+/76 dBKCTOoRETJGGnUNJX8RorFTVfjTKHKDPATmfT2LC1EVSi/x80DHMMZC9WzPpfB4/pNL hCc/VuXpJDiRmHGwyZrpsWpgdnBzHyN1j5kB4NScHsUnm+EFAY8RQUg3unP+xVzKNI1c kHTtFAVi/vi+RpA9GvAEtMrOZBj9gfNwkDT2yrp2jRmnsANFZlfX1vS9QZiKOq4Rv3kd ecfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-18590-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18590-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 v14-20020a50d58e000000b00555bded5b7csi1543063edi.640.2024.01.06.06.12.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 06:12:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18590-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-18590-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18590-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 8C5C71F226E6 for ; Sat, 6 Jan 2024 14:12:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9451679F0; Sat, 6 Jan 2024 14:12:18 +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 162057494 for ; Sat, 6 Jan 2024 14:12:12 +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 758DA84071; Sat, 6 Jan 2024 15:12:04 +0100 (CET) From: =?utf-8?q?Duje_Mihanovi=C4=87?= Date: Sat, 06 Jan 2024 15:11:33 +0100 Subject: [PATCH v2] soc: pxa: ssp: fix casts Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240106-pxa-ssp-v2-1-69ac9f028bba@skole.hr> X-B4-Tracking: v=1; b=H4sIAJRfmWUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyjHQUlJIzE vPSU3UzU4B8JSMDIxMDQwMz3YKKRN3i4gJdUyMjcxPTFBMjE0MLJaDqgqLUtMwKsEnRsbW1AHa lQ3lZAAAA To: Arnd Bergmann , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Robert Jarzmik Cc: Lubomir Rintel , zhang songyi , soc@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Duje_Mihanovi=C4=87?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1552; i=duje.mihanovic@skole.hr; h=from:subject:message-id; bh=nG1Ud3E/McbOgiucrgVOFbNv69PsS0D3QewrfR7q2qI=; b=owEBbQKS/ZANAwAIAZoRnrBCLZbhAcsmYgBlmV+erp7NYDOlDGSNcq79EREE1t7nDQqu0YJxQ CpPJ52xTf2JAjMEAAEIAB0WIQRT351NnD/hEPs2LXiaEZ6wQi2W4QUCZZlfngAKCRCaEZ6wQi2W 4XezEACZ5xs9RVZqA8fSBiecFOpVS6RMzaeMScr8A02opWHWnRLJb5mGbECUwjRsFqT1vX2Bl+t T9NMx5aLt4jhYTE1Uj0qN3mooLCes/VIKg6+VJMELbnFe5F7e/YR/MHVoP0MlRJ6PPL0zuwCi3k 4TY0/jzpRWi/OfNyhDT0G9VBFQahAHMyAQdSEPJ7iARzGRicXq4bTyIXvrIq11EQ0l5bDEHEQ6C 4/HWJL18DKOSOQGW0bhaIX+Terkt5sLiP1he60rdqlf4/Yv8vX1nUVxGWUmbj2w3TphbIeO4jBa 0jIrsOGPgQrI6R+PDYmVqAlDN48ccKUx32aueMABRPknJckb2fVYC7miJSmEHuo0/eu41mAJpLW 1Lj6tSouB8TiQc20pZEXGYVuvJ9D2q/D7s8QMO+5HYoxblyVsEPDZhuoqGVTrqy3VwVIV+QJ+nk FUU+8UnmYGAOS1NT46/NFTWV2T83g4u09tiOKG0M3nGc5bInfgcIpnAWjpx85KKw7X6/boN75gy fYBOZm1gjun8MMcE+UL743T/dobU64ujdEgO5VRFD+zeTNetcuS47yZ54+nv1UQiYIrOqkBHs4R l86dEDA1HVzG/um26eg3ZusbpcDJGRE4D3iac7kPjdDi7gOk3bpBIYUfjC0mvubq1CujTZ6l2lG W8G8qP6LIJo1kjQ== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=53DF9D4D9C3FE110FB362D789A119EB0422D96E1 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787350589770113445 X-GMAIL-MSGID: 1787350589770113445 On ARM64 platforms, id->data is a 64-bit value and casting it to a 32-bit integer causes build errors. Cast it to uintptr_t instead. The id->driver_data cast is unnecessary, so drop it. Signed-off-by: Duje Mihanović Reviewed-by: Uwe Kleine-König --- 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/ Changes in v2: - Change first cast to (uintptr_t) - Drop second cast - Link to v1: https://lore.kernel.org/20240103210604.16877-1-duje.mihanovic@skole.hr --- drivers/soc/pxa/ssp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a change-id: 20240106-pxa-ssp-522745d42418 Best regards, diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c index a1e8a07f7275..7af04e8b8163 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 = (uintptr_t) id->data; } else { const struct platform_device_id *id = platform_get_device_id(pdev); - ssp->type = (int) id->driver_data; + ssp->type = id->driver_data; /* PXA2xx/3xx SSP ports starts from 1 and the internal pdev->id * starts from 0, do a translation here