From patchwork Wed Aug 23 11:15:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Coardos X-Patchwork-Id: 13362140 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 3BB5AEE49B5 for ; Wed, 23 Aug 2023 11:16:42 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=wbSyR1Asjq3iOu2e7ykwhgWMCXKXEOpZbF0AaF+u43I=; b=Uq79TjLrc5vxh3 A7aoNW5TqdQ2YtlWmLsMiBxJ8Zs7uXeqPr/E34tRo2ba7ZqsjQkm+O51jgSTuFx9afQ2TLSr93fT5 //6tK9jVZKHWGViAqK1Y4z7E2rjQNNJH2sbh2ktnOerRdgCz+xLCNQy4Kb2DwmodGp0/qNZRiVCQo T6cBz3zyvgUqj3suMuPQ2Fm6x3gIuE6+UlD5czUz+w4Z70tVfkltl7MczoCTKrnMmADU8uQixcUxs SZCcrAp9WFkshxVJ+fvnR79S+QlQ67ZFx1x1Jcl8/8CQv3IQ0QanFPulUSnSVWu2JwbIDpxf8ozyl HEgjKiF3b+y/o/jKTabg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYlqW-000Ph8-0u; Wed, 23 Aug 2023 11:16:20 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYlqR-000Pfj-1j; Wed, 23 Aug 2023 11:16:16 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2bcc14ea414so43722741fa.0; Wed, 23 Aug 2023 04:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692789373; x=1693394173; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=n1IOz8Tm2ZzuO8iIkjY/bq2n8EiedFOrmA9uVirfi0Y=; b=G/ua5zsN3H9V3SIILarO74A834T6Ed2jkbdnFyp39cmmWTVPHWEEeLWy4bNRRUScU+ r+pWlq/OGftfZhmxC2I+nEV80fvGiILBQYhybBLxoVjTb+0FwUrQoKkJIy97/4HhqpIf cv/bEYYKrXf44rJ/NYHZeabNw1yG4yXfzlQM5Lx2n+XoUyyxukdEVMHokCmlZnYNWHv2 40JDpm5+60QKMU7ONXXxrQCVam5UnHmV/9bajBT8J2FFEzbSxgYeHSTumAZJQe9eiZeY qBFGJWbxW8/oyX08PJ+ENtAAysbUxyRTUCm2kW5zcOnn3Uw6F8p2znXnRJLDXc9sMKH2 HjzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692789373; x=1693394173; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=n1IOz8Tm2ZzuO8iIkjY/bq2n8EiedFOrmA9uVirfi0Y=; b=XfxhTDHKYb9LzzLJGpBBzFNFSq1JMUKkNXQ2ES2U2FBczt/tJWV2wflfF+acwsw3r0 /Zthp0GKtxwBEVSq+y+/obeRaq8ggRbmZed8ou0M9kBE18as4atiDRQcSQF60vjj4HfZ s6rKAzb4AJ/W1ti7eNIZXeYPt2cmuO4/I8i78i0lby6jVwVrooOLa55JKLa7RCA7giN8 ik4uq/ktqflQEZrdNYL1ANI4AvpMzU3Qjm2PMOKZQj83rN1g+PyB+GH5GqqHJLf0G8ET H0ZJoqR3GkwqNS3JCe+IPVJ5Bo0Xw63wx+MjX8xQzyB8Cn4TQbkJDWQp5bSoXB0GNFRA sjbA== X-Gm-Message-State: AOJu0Yz7Ityge20l+Hwzvd1Qnzlueh8nDSQtxYMvj8lqpuPJIvWmOJzy DnOOTMGzhFIkIZKRnLilVeM= X-Google-Smtp-Source: AGHT+IHNAimyqRB4bWSQDI618KWVc3sWSbdrqrCFyo/ll6MuCbBwSgsqO0JHIoB9n+rzqt3DEhGwMA== X-Received: by 2002:a2e:9096:0:b0:2bc:d5f1:b9cf with SMTP id l22-20020a2e9096000000b002bcd5f1b9cfmr2705704ljg.27.1692789372380; Wed, 23 Aug 2023 04:16:12 -0700 (PDT) Received: from localhost.localdomain ([92.85.190.61]) by smtp.gmail.com with ESMTPSA id m18-20020a7bce12000000b003fbc0a49b57sm18419720wmc.6.2023.08.23.04.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 04:16:12 -0700 (PDT) From: Andrei Coardos To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-crypto@vger.kernel.org Cc: alex@shruggie.ro, Jason@zx2c4.com, bcm-kernel-feedback-list@broadcom.com, sbranden@broadcom.com, rjui@broadcom.com, florian.fainelli@broadcom.com, herbert@gondor.apana.org.au, olivia@selenic.com, Andrei Coardos Subject: [PATCH] char: hw_random: bcm2835-rng: removed call to platform_set_drvdata() Date: Wed, 23 Aug 2023 14:15:55 +0300 Message-Id: <20230823111555.3734-1-aboutphysycs@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230823_041615_574628_7B5D5E9B X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file. Signed-off-by: Andrei Coardos Reviewed-by: Martin Kaiser Reviewed-by: Alexandru Ardelean --- drivers/char/hw_random/bcm2835-rng.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c index e98fcac578d6..0238f487f9ab 100644 --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c @@ -150,8 +150,6 @@ static int bcm2835_rng_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - platform_set_drvdata(pdev, priv); - /* map peripheral */ priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base))