From f55f61225a2b98fd3eef56428edee767dc43d21d Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 29 Aug 2018 15:04:25 -0500 Subject: [PATCH 1/2] soc: fsl/qe: Use of_get_child_by_name helper Use the of_get_child_by_name() helper instead of open coding searching for the 'firmware' child node. This removes directly accessing the name pointer as well. Cc: Qiang Zhao Cc: Li Yang Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Acked-by: Qiang Zhao Signed-off-by: Li Yang --- drivers/soc/fsl/qe/qe.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 2ef6fc6487c1..612d9c551be5 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -588,11 +588,7 @@ struct qe_firmware_info *qe_get_firmware_info(void) } /* Find the 'firmware' child node */ - for_each_child_of_node(qe, fw) { - if (strcmp(fw->name, "firmware") == 0) - break; - } - + fw = of_get_child_by_name(qe, "firmware"); of_node_put(qe); /* Did we find the 'firmware' node? */ From afa86d264a7ce62ba214bc7c6012e2129141421e Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 29 Aug 2018 10:27:46 +0100 Subject: [PATCH 2/2] soc: fsl: dpio: remove redundant pointer 'priv' Pointer 'priv' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'priv' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Signed-off-by: Li Yang --- drivers/soc/fsl/dpio/dpio-driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c index b60b77bfaffa..e58fcc9096e8 100644 --- a/drivers/soc/fsl/dpio/dpio-driver.c +++ b/drivers/soc/fsl/dpio/dpio-driver.c @@ -50,13 +50,10 @@ static void unregister_dpio_irq_handlers(struct fsl_mc_device *dpio_dev) static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu) { - struct dpio_priv *priv; int error; struct fsl_mc_device_irq *irq; cpumask_t mask; - priv = dev_get_drvdata(&dpio_dev->dev); - irq = dpio_dev->irqs[0]; error = devm_request_irq(&dpio_dev->dev, irq->msi_desc->irq,