lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220218101712.530576-4-claudiu.beznea@microchip.com>
Date:   Fri, 18 Feb 2022 12:17:08 +0200
From:   Claudiu Beznea <claudiu.beznea@...rochip.com>
To:     <mpm@...enic.com>, <herbert@...dor.apana.org.au>,
        <nicolas.ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
        <linux-crypto@...r.kernel.org>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>
Subject: [PATCH 3/7] hwrnd: atmel - rename enable/disable functions to init/cleanup

s/atmel_trng_disable/atmel_trng_cleanup/g and
s/atmel_trng_enable/atmel_trng_init/g to cope with
struct hwrng::{init, cleanup} members.

Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
---
 drivers/char/hw_random/atmel-rng.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index b7ef951927fb..17f02049c112 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -74,12 +74,12 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
 	return ret;
 }
 
-static void atmel_trng_enable(struct atmel_trng *trng)
+static void atmel_trng_init(struct atmel_trng *trng)
 {
 	writel(TRNG_KEY | 1, trng->base + TRNG_CR);
 }
 
-static void atmel_trng_disable(struct atmel_trng *trng)
+static void atmel_trng_cleanup(struct atmel_trng *trng)
 {
 	writel(TRNG_KEY, trng->base + TRNG_CR);
 }
@@ -117,7 +117,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	atmel_trng_enable(trng);
+	atmel_trng_init(trng);
 	trng->rng.name = pdev->name;
 	trng->rng.read = atmel_trng_read;
 
@@ -131,7 +131,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
 
 err_register:
 	clk_disable_unprepare(trng->clk);
-	atmel_trng_disable(trng);
+	atmel_trng_cleanup(trng);
 	return ret;
 }
 
@@ -140,7 +140,7 @@ static int atmel_trng_remove(struct platform_device *pdev)
 	struct atmel_trng *trng = platform_get_drvdata(pdev);
 
 
-	atmel_trng_disable(trng);
+	atmel_trng_cleanup(trng);
 	clk_disable_unprepare(trng->clk);
 
 	return 0;
@@ -151,7 +151,7 @@ static int atmel_trng_suspend(struct device *dev)
 {
 	struct atmel_trng *trng = dev_get_drvdata(dev);
 
-	atmel_trng_disable(trng);
+	atmel_trng_cleanup(trng);
 	clk_disable_unprepare(trng->clk);
 
 	return 0;
@@ -166,7 +166,7 @@ static int atmel_trng_resume(struct device *dev)
 	if (ret)
 		return ret;
 
-	atmel_trng_enable(trng);
+	atmel_trng_init(trng);
 
 	return 0;
 }
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ