hwrng: cctrng - drop redundant initializations
Subsystems (3)
PATCH 1/1 hwrng: cctrng - drop redundant initializations
The variables are reassigned before their initial values are read - drop the redundant initializations.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/char/hw_random/cctrng.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/char/hw_random/cctrng.c +4 -4
@@ -91,7 +91,7 @@ static int cc_trng_pm_get(struct device *dev)static void cc_trng_pm_put_suspend (struct device *dev) { -int rc =0 ; +int rc; rc =pm_runtime_put_autosuspend (dev);if (rc)
@@ -208,7 +208,7 @@ static int cctrng_read(struct hwrng *rng, void *data, size_t max, bool wait)struct cctrng_drvdata *drvdata = (struct cctrng_drvdata *)rng->priv;struct device *dev = &(drvdata->pdev->dev);u32 *buf = (u32 *)drvdata->circ.buf; -size_t copied =0 ; +size_t copied;size_t cnt_w;size_t size;size_t left;
@@ -309,8 +309,8 @@ static void cc_trng_hw_trigger(struct cctrng_drvdata *drvdata)static void cc_trng_compwork_handler (struct work_struct *w) { -u32 isr =0 ; -u32 ehr_valid =0 ; +u32 isr; +u32 ehr_valid;struct cctrng_drvdata *drvdata = container_of(w, struct cctrng_drvdata, compwork);struct device *dev = &(drvdata->pdev->dev);