From patchwork Thu May 13 08:47:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 437279 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp127423jao; Thu, 13 May 2021 01:47:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoWkU1EQP7teFYKoDs15y/HAOonz+IS1NyKbLZ9chjrpQo097WFB4MrC53GfBqdws4bnor X-Received: by 2002:a50:cd57:: with SMTP id d23mr47951949edj.5.1620895661075; Thu, 13 May 2021 01:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620895661; cv=none; d=google.com; s=arc-20160816; b=sdAmP47IdLz9cp0MW+J910/ZkzZyNHcRKUZcp0Eoh0Sm+xH+vwyWAwvicascAeLHwj PNPAuF42hW+LNFNEv/eVGFNAddeUze+ol8CKklQSD+1cR+jE9TQOwL2W4kt1+H1xguB/ tQ60J05tjtm4/eR96mYTAL+nTIoNVuiQIYSMojpp5BZAJv+4M+BE1bvhun+5L5/U0OWc UIGgG0kSHvbKZYCnyqqoOnZ2regrxUh6KOJz1kyqTgrq7mJz9HCf/KfynCpjMfGg1DJF vycrJ+A+S6Okc0oWoeIn3UKe58ncnwa7grpgQZDOSIu3eabV1hyZZoJSfJ30w5j0LxEj v89A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Vgxld/f3SUwpcMSWNYdxMjxyAHMeE/P2VEowI+v3Huw=; b=vphvAHkDn5gPK+e6Wkm3/GncTHbcN1ikmh6OVDKJ43v9AXPh39n8nCdOI7Et1HnwJc vaojbzpfoSs/8yzEfyJya4dl7FsI+e7TlJBI2ipDF+fkdecwve1OvImn8ZVk2RBr9Isk EEXhhzt/uVr2Jlkl4JOHqfO3XTACHlNuK/JbLC3nxjvlvOhhPDn4KqbxHq90U6wcvGNe dP+i+58we5st5LdmyznU52AHzBaiLfLR1wL361/t/yEn/LpPxbDMtO6NbJCmAHuFjjNF 1m4cGPz2DN2QlhYpJCU4d+CSVxq3QthsnyMbZJuwE5oF2cmGDUSMa3rHoxX1CcDtmBNW pvXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PTb1zlco; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si2247959edt.295.2021.05.13.01.47.40; Thu, 13 May 2021 01:47:41 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PTb1zlco; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232152AbhEMIsr (ORCPT + 7 others); Thu, 13 May 2021 04:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232149AbhEMIsn (ORCPT ); Thu, 13 May 2021 04:48:43 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27FC5C061761 for ; Thu, 13 May 2021 01:47:32 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id l14so26158059wrx.5 for ; Thu, 13 May 2021 01:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vgxld/f3SUwpcMSWNYdxMjxyAHMeE/P2VEowI+v3Huw=; b=PTb1zlco1SeiGL9syojiYeA5mxMqkyG/mPz+g5UKeA7WAXxfXf5KrYwTHIZvPd1Srl fVihb2GqeXAT0VH6M2JuzLtDcTnCceCcgGBuBFUrPyJTOOwza5IbRQrJzrEgWPzEeD5s Hhg90srR4fRiDMInVffEztpa9Wl2pZuEc3EYJeVqzwM7l6Rej4t78UDYkUK2RT0NDFk4 SeDd8QbriPI+MWV8iWJrZyB3oKB6ZcTZNu1Akvdh3gMaFKQbpVpGcLF4m76WkTXFVXbv pV9Mwfe7A6mMVXa0hPGRYanPPVd2GdR76EAq4NakvVWQFlmGNU4Lwzx9weUsD7JwB+ya mIBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vgxld/f3SUwpcMSWNYdxMjxyAHMeE/P2VEowI+v3Huw=; b=dfIs7MBE7GB0/Pcmtv4X/Qbdt4H0Y/Kr0Dlm1NoTK5tFVAo+lhWcMwMK5aur4IRLca sGk0SNAV0G8SoKYTiqjudh4ffb3+q2j2194usNU0FMIxNVKNV84qd7ih5GaM6U4wND9C X+kvdMXMvxwK+rSaZyNcwSILPbEl0Bw+7JddHz26dxUkGX361GVoWygf0/jcHt99G+p/ j5FfRFq2M8Cry7fsFFRSd7ezZcm55XQyqyHtcNyd39UuGXDUpdCq/KwROOk81p8MOB6b 0tr28IVEBuczP8nw8L0O5k6v/F5Ye4uL/6ZC/xgTt98t6DduB+00SRTEFhW1Aa+ef/LO Ftxg== X-Gm-Message-State: AOAM533IRn4Fg7/Q0OD0ROZsrLF4tYHKPo20DvmrqnUUA43FMz/wBlos YyJYZvnYh33GSWrL1cN4NhuiEQ== X-Received: by 2002:adf:f80f:: with SMTP id s15mr50554175wrp.341.1620895650909; Thu, 13 May 2021 01:47:30 -0700 (PDT) Received: from arch-thunder.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id h15sm1730282wmq.4.2021.05.13.01.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 01:47:30 -0700 (PDT) From: Rui Miguel Silva To: Greg Kroah-Hartman , Sebastian Siewior , Laurent Pinchart , Rob Herring Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, Rui Miguel Silva Subject: [PATCH v4 3/9] usb: isp1760: use relaxed primitives Date: Thu, 13 May 2021 09:47:11 +0100 Message-Id: <20210513084717.2487366-4-rui.silva@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210513084717.2487366-1-rui.silva@linaro.org> References: <20210513084717.2487366-1-rui.silva@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Use io relaxed access memory primitives to satisfy strict type checking (__force). This will fix some existing sparse warnings: sparse: warning: cast to restricted __le32 Signed-off-by: Rui Miguel Silva --- drivers/usb/isp1760/isp1760-hcd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.31.1 diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c index 20d142140574..2cc0555e029d 100644 --- a/drivers/usb/isp1760/isp1760-hcd.c +++ b/drivers/usb/isp1760/isp1760-hcd.c @@ -246,7 +246,7 @@ static void bank_reads8(void __iomem *src_base, u32 src_offset, u32 bank_addr, if (src_offset < PAYLOAD_OFFSET) { while (bytes >= 4) { - *dst = le32_to_cpu(__raw_readl(src)); + *dst = readl_relaxed(src); bytes -= 4; src++; dst++; @@ -267,7 +267,7 @@ static void bank_reads8(void __iomem *src_base, u32 src_offset, u32 bank_addr, * allocated. */ if (src_offset < PAYLOAD_OFFSET) - val = le32_to_cpu(__raw_readl(src)); + val = readl_relaxed(src); else val = __raw_readl(src); @@ -301,7 +301,7 @@ static void mem_writes8(void __iomem *dst_base, u32 dst_offset, if (dst_offset < PAYLOAD_OFFSET) { while (bytes >= 4) { - __raw_writel(cpu_to_le32(*src), dst); + writel_relaxed(*src, dst); bytes -= 4; src++; dst++; @@ -322,7 +322,7 @@ static void mem_writes8(void __iomem *dst_base, u32 dst_offset, */ if (dst_offset < PAYLOAD_OFFSET) - __raw_writel(cpu_to_le32(*src), dst); + writel_relaxed(*src, dst); else __raw_writel(*src, dst); }