From patchwork Tue Feb 4 15:35:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 13959387 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 46FBFC3DA4A for ; Tue, 4 Feb 2025 15:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nURbKZbgJGMpV8SkaQBQmVjxIPmHUbz2tC93glGl61c=; b=LsEow9KpjNs1ud /JVuOKZyVqdRT99CN8XQ1vb6KTMUw9C2rOIcfspyukyFZZvgZZLRopBwqAOiNPCGOzm0e4z9Qn6uu 2nR/dySiJaGK+GrEtKaqhyh/k0A2O3LupnNtSgidSk3+tsYpBvSGsJGH4jSfHvEGupdV1JK//SP9n Y+bEEc+Ey4ivTXmoYjrwWk7h/HXAP0FBfk15TUg4t7wvPON3QbLlt8RupdEwG3wqymJIdjQbwt90H LOc71nzlLxYVIiC3OqJNCXpZXLl32Rh4xDua0IJizHtHeWNEt3K4IT9cAPFcZ5cYlpAZppvTUp3Bl n9vWS/DnjBufbXVXdsRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tfLCA-00000000sRY-0aJ3; Tue, 04 Feb 2025 15:50:38 +0000 Received: from sender4-op-o15.zoho.com ([136.143.188.15]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tfKz4-00000000qKL-0Alb; Tue, 04 Feb 2025 15:37:07 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1738683404; cv=none; d=zohomail.com; s=zohoarc; b=TruEShvCeSHdknqE2cfbwhaTTig5fKKWLc8uPb8qMY4tpNWEKIa+EUCEHc3skaB8ISWYoNQJr5+5ZBsdFvib/2HUejN+JNTFmfhJ24YhjzW+cClBeCyYfYxa0uFhtsbviearCG3uFFynS8wCwLB6ZILIi15dSZo28Qr9LBWxnNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1738683404; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=ee+aIEbx0Uoz73M7xvQb4aORnr+guJuf8bM3GRunjkY=; b=jgZdxD4Hu3jlizBylhq+Sb5yd7e/OxrnCHArwBbmvRfDE191dq4gCakLBCLoaLhCbRWUZvp7Tt2Osq6wHEmXR34Cbk6BzVAHFCXsLOU38hrD2b5U0qsl4CmehJ/fwIwzWL9CExnHLxm8nn/pyE9Z2+2LTfkQfpAAgd4ZzlrX58s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1738683404; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:Date:Date:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Message-Id:References:In-Reply-To:To:To:Cc:Cc:Reply-To; bh=ee+aIEbx0Uoz73M7xvQb4aORnr+guJuf8bM3GRunjkY=; b=IimQtL+ZEWbMj2SBAAlLGCUuG/5v9wS9pE+7QEmkTwvqkFo0rIGWnDGy4XKuP71G ugoroqv0C9r8hU5WodBkO4gGbee4JalGujWSKhL66oWIjqeWj5c8vxcuBqCeXQULR85 oqmTsPLNzutcCMrPXLRDWYrLMXGVevWM/u3zugso= Received: by mx.zohomail.com with SMTPS id 1738683398844646.1655143013911; Tue, 4 Feb 2025 07:36:38 -0800 (PST) From: Nicolas Frattaroli Date: Tue, 04 Feb 2025 16:35:49 +0100 Subject: [PATCH v2 4/7] hwrng: rockchip: eliminate some unnecessary dereferences MIME-Version: 1.0 Message-Id: <20250204-rk3588-trng-submission-v2-4-608172b6fd91@collabora.com> References: <20250204-rk3588-trng-submission-v2-0-608172b6fd91@collabora.com> In-Reply-To: <20250204-rk3588-trng-submission-v2-0-608172b6fd91@collabora.com> To: Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Olivia Mackall , Herbert Xu , Daniel Golle , Aurelien Jarno Cc: Sebastian Reichel , kernel@collabora.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Nicolas Frattaroli X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250204_073706_147282_8D1E7C9F X-CRM114-Status: GOOD ( 12.20 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Despite assigning a temporary variable the value of &pdev->dev early on in the probe function, the probe function then continues to use this construct when it could just use the local dev variable instead. Simplify this by using the local dev variable directly. Signed-off-by: Nicolas Frattaroli --- drivers/char/hw_random/rockchip-rng.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/rockchip-rng.c b/drivers/char/hw_random/rockchip-rng.c index b1b510087e5862b3b2ed97cefbf10620bcf9b020..082daea27e937e147195070454f9511a71c8c67e 100644 --- a/drivers/char/hw_random/rockchip-rng.c +++ b/drivers/char/hw_random/rockchip-rng.c @@ -148,7 +148,7 @@ static int rk_rng_probe(struct platform_device *pdev) return dev_err_probe(dev, rk_rng->clk_num, "Failed to get clks property\n"); - rst = devm_reset_control_array_get_exclusive(&pdev->dev); + rst = devm_reset_control_array_get_exclusive(dev); if (IS_ERR(rst)) return dev_err_probe(dev, PTR_ERR(rst), "Failed to get reset property\n"); @@ -171,11 +171,11 @@ static int rk_rng_probe(struct platform_device *pdev) pm_runtime_use_autosuspend(dev); ret = devm_pm_runtime_enable(dev); if (ret) - return dev_err_probe(&pdev->dev, ret, "Runtime pm activation failed.\n"); + return dev_err_probe(dev, ret, "Runtime pm activation failed.\n"); ret = devm_hwrng_register(dev, &rk_rng->rng); if (ret) - return dev_err_probe(&pdev->dev, ret, "Failed to register Rockchip hwrng\n"); + return dev_err_probe(dev, ret, "Failed to register Rockchip hwrng\n"); return 0; }