Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1121733lqp; Fri, 22 Mar 2024 06:21:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV89MQ/IiOyD4EsdBJ82/QjdKVKVMYaVH4OOwmMNpHTrCsK0RQTV8S8KBueWMj957/JFCkXZZ+x2q1If2bQdNYX2iXmd3wxPeaQavhvrQ== X-Google-Smtp-Source: AGHT+IFjlrFcOim6mBlcpX8yJBJuXnhpJEbsxqk4Jo6jUX/29gX9Yc0Dk8H5XMigKhp08PZi0jpH X-Received: by 2002:a05:620a:986:b0:78a:3414:14ba with SMTP id x6-20020a05620a098600b0078a341414bamr2256527qkx.6.1711113703562; Fri, 22 Mar 2024 06:21:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711113703; cv=pass; d=google.com; s=arc-20160816; b=yn1a9RkMfCLUMnBXqAF0WVu28Pgx5nDFyLRESct3BOhcKp83TfrvUYBPPUTNn1G5Y8 Y04YovcFCAMyvxODSwwgTYSiDnQS1UiEj4vMqSnk2ghAMCadA3Zj2yBz4M/Q2ZGjtrV1 4X07mnpaYq3j8Ho8XHbpxtIfQrd174nLCrz75GINvqDc22hkpm7tHzkhblhg+W2vQD5Z O3AMUI+UrP/+EsODBYLjPCt7BBekf2UaETSqLmR3G8iqvoJnMTfmjEVPMzzi/GAnjoVU AHyo4R5+HAIl8r38u2K/VgsIJSA2eayMJT5l9PDlQOFJEA/OuMo8mKbu+rHwReytnGDT o96Q== ARC-Message-Signature: i=2; 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:dkim-signature; bh=sYcSI7qjFUeOc38yZ6Ye6IEvfQgzWoZNcZiF4VisERQ=; fh=ub5ziNwuEOpyBaEXfOc1ZyYuGztjvRSWSSRMpW1FNI0=; b=jabmV/vkxcCiEzzs3yE297e9TvQlAFJzlIaP8SxCLVO8itI89YDFGeqiD8Y2311A/a SGtgzxpA81WJTSOULX73D0u79fW8AGp82USvK8B2G0jSuWMcejT91wIzdqy4a+XpHfln B0TMybt/hEKnHKf8N6X+nky6nQ1elizrudwGzaALggpP17TSQkgY7tCCfT1VmjeS4kK0 MTD6a9vdQ9lqCbkotVkfJxhvosj6lJZqGf+KNeikaZOWINErM1iP/n5x980G/yXP1ApG MuAnQ9wvQ/TfzTNxkH7q3BXrzoBHFo1bn+lNDdbuNu4+ygEw2XNk4q/3t8qKrM7NW2Y6 95hA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SDIyjHHY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a27-20020a05620a103b00b00789dfc96bffsi1873183qkk.641.2024.03.22.06.21.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 06:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SDIyjHHY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C5EEE1C2129C for ; Fri, 22 Mar 2024 13:21:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12D1746B8B; Fri, 22 Mar 2024 13:21:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SDIyjHHY" 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.subspace.kernel.org (Postfix) with ESMTPS id 3351F46436; Fri, 22 Mar 2024 13:21:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711113684; cv=none; b=Jt3l9mnHhorap+AaUPRlSxU6i6Gp04VQwaOWxZ6efyRfHrIm7j0La3Blru46sL3pI2EXIkkZTCVBs2/Cvqi7NNa0QJJTdFx1TrDlBw+tb/ZzOiq53M/Eaodq3WTUxHIu8v3fJGa2kiL6I+ylAFuhMUgaDKV8yR3YmOOrR8nPX48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711113684; c=relaxed/simple; bh=jvyFcumM0Kgc3cvxmljqPEI3TA1ssaHzM5qXST5wFWU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GJkVKGaZKewCP/4D9+YKUBa3QgrhlA3MxM9/Kt2IVIogdVDnqk8GnQxKZmi+1rPuL7T1DQ+h8ulXUq34Vu6OYOq/j1WUuMG/bmstwvuSHzEIl22dJihhrCFdMpMEl5QVtC2IIqfqb/tMc7BaUDRsGPVL88UKyckLIfl+RiOW164= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SDIyjHHY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38A03C433A6; Fri, 22 Mar 2024 13:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711113683; bh=jvyFcumM0Kgc3cvxmljqPEI3TA1ssaHzM5qXST5wFWU=; h=From:To:Cc:Subject:Date:From; b=SDIyjHHYzIzkM1ZxDVfDOZHT6vMxkUjSs4aE6DL1byMVyt+l9ZVvb56So8nucENaA PCTY15jtxyqPU6g5mgcvJGodAaiN+2fOjHh323i4WnkcJkBsEV7ZC+KNr/G5+U6gr5 c/FOW+tZPpXXMPrqOUxDHc3ybQ5pLQ5aGCdcdy0dvN5QZ6nRoofp06wb1IYr6jiipF GujyavHdDLOPUjAzrNCI02AHdLyLHyWi1QCxjRwFk+JlV+HksHB8XD4P3jGVvbyfyh ST7nvBUKQx3qFnH9hi60KK2k9/3JqR9RGfdsP246vhWM45efhlJ97d+YyR9QN50rBo naQOrMhliewpQ== From: Arnd Bergmann To: Vinod Koul , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Manivannan Sadhasivam , Nathan Chancellor Cc: Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Randy Dunlap , Rob Herring , Zhang Jianhua , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] dmaengine: owl: fix register access functions Date: Fri, 22 Mar 2024 14:21:07 +0100 Message-Id: <20240322132116.906475-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann When building with 'make W=1', clang notices that the computed register values are never actually written back but instead the wrong variable is set: drivers/dma/owl-dma.c:244:6: error: variable 'regval' set but not used [-Werror,-Wunused-but-set-variable] 244 | u32 regval; | ^ drivers/dma/owl-dma.c:268:6: error: variable 'regval' set but not used [-Werror,-Wunused-but-set-variable] 268 | u32 regval; | ^ Change these to what was most likely intended. Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver") Signed-off-by: Arnd Bergmann --- drivers/dma/owl-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c index 4e76c4ec2d39..e001f4f7aa64 100644 --- a/drivers/dma/owl-dma.c +++ b/drivers/dma/owl-dma.c @@ -250,7 +250,7 @@ static void pchan_update(struct owl_dma_pchan *pchan, u32 reg, else regval &= ~val; - writel(val, pchan->base + reg); + writel(regval, pchan->base + reg); } static void pchan_writel(struct owl_dma_pchan *pchan, u32 reg, u32 data) @@ -274,7 +274,7 @@ static void dma_update(struct owl_dma *od, u32 reg, u32 val, bool state) else regval &= ~val; - writel(val, od->base + reg); + writel(regval, od->base + reg); } static void dma_writel(struct owl_dma *od, u32 reg, u32 data) -- 2.39.2