diff mbox

staging: ccree: remove unused pointer cc_base

Message ID 20171109081305.3659-1-colin.king@canonical.com (mailing list archive)
State Not Applicable
Delegated to: Herbert Xu
Headers show

Commit Message

Colin King Nov. 9, 2017, 8:13 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer cc_base is being assigned but is never read, hence it is
redundant and can be removed. Cleans up clang warning:

drivers/staging/ccree/ssi_driver.c:235:2: warning: Value stored to
'cc_base' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/ccree/ssi_driver.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Gilad Ben-Yossef Nov. 9, 2017, 9:21 a.m. UTC | #1
Hi Colin,

Thank you very much for your patch.

On Thu, Nov 9, 2017 at 10:13 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer cc_base is being assigned but is never read, hence it is
> redundant and can be removed. Cleans up clang warning:
>
> drivers/staging/ccree/ssi_driver.c:235:2: warning: Value stored to
> 'cc_base' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/staging/ccree/ssi_driver.c | 3 ---
>  1 file changed, 3 deletions(-)

Your patch is perfectly fine but I just happened to send a patch
series that includes
this fix but also deals with  other occurrences of the same now
no-longer needed cc_base
variable just a second ago before checking my email...

Sorry about that and thanks again.

Gilad
diff mbox

Patch

diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c
index 1a3c481fa92a..f4c0af8047e4 100644
--- a/drivers/staging/ccree/ssi_driver.c
+++ b/drivers/staging/ccree/ssi_driver.c
@@ -199,7 +199,6 @@  int init_cc_regs(struct ssi_drvdata *drvdata, bool is_probe)
 static int init_cc_resources(struct platform_device *plat_dev)
 {
 	struct resource *req_mem_cc_regs = NULL;
-	void __iomem *cc_base = NULL;
 	struct ssi_drvdata *new_drvdata;
 	struct device *dev = &plat_dev->dev;
 	struct device_node *np = dev->of_node;
@@ -232,8 +231,6 @@  static int init_cc_resources(struct platform_device *plat_dev)
 	dev_dbg(dev, "CC registers mapped from %pa to 0x%p\n",
 		&req_mem_cc_regs->start, new_drvdata->cc_base);
 
-	cc_base = new_drvdata->cc_base;
-
 	/* Then IRQ */
 	new_drvdata->irq = platform_get_irq(plat_dev, 0);
 	if (new_drvdata->irq < 0) {