Skip to contentSkip to conversation

dmaengine: ppc4xx: make ppc440spe_adma_chan_list static

PATCH Applied Krzysztof Kozlowski 2 participants 3 messages Oct 19, 2020 – Oct 28, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dmaengine: ppc4xx: make ppc440spe_adma_chan_list static

The ppc440spe_adma_chan_list file-scope variable is not used outside of the unit so it can be made static.

---
 drivers/dma/ppc4xx/adma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/ppc4xx/adma.c +1 -1
index 71cdaaa8134c..fea598550582 100644
@@ -69,7 +69,7 @@ struct ppc_dma_chan_ref {
 };
 
 /* The list of channels exported by ppc440spe ADMA */
-struct list_head
+static struct list_head
 ppc440spe_adma_chan_list = LIST_HEAD_INIT(ppc440spe_adma_chan_list);
 
 /* This flag is set when want to refetch the xor chain in the interrupt
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 dmaengine: ppc4xx: remove xor_hw_desc assignment without reading

The xor_hw_desc local variable is assigned but never read:

drivers/dma/ppc4xx/adma.c: In function ‘ppc440spe_desc_set_src_mult’:
drivers/dma/ppc4xx/adma.c:562:17: warning: variable ‘xor_hw_desc’ set but not used [-Wunused-but-set-variable]

---
 drivers/dma/ppc4xx/adma.c | 2 --
 1 file changed, 2 deletions(-)
drivers/dma/ppc4xx/adma.c +0 -2
index fea598550582..df7704053d91 100644
@@ -559,7 +559,6 @@ static void ppc440spe_desc_set_src_mult(struct ppc440spe_adma_desc_slot *desc,
 			int sg_index, unsigned char mult_value)
 {
 	struct dma_cdb *dma_hw_desc;
-	struct xor_cb *xor_hw_desc;
 	u32 *psgu;
 
 	switch (chan->device->id) {
@@ -590,7 +589,6 @@ static void ppc440spe_desc_set_src_mult(struct ppc440spe_adma_desc_slot *desc,
 		*psgu |= cpu_to_le32(mult_value << mult_index);
 		break;
 	case PPC440SPE_XOR_ID:
-		xor_hw_desc = desc->hw_desc;
 		break;
 	default:
 		BUG();
Signature · 1 line
2.25.1
maintainer Applied
#2 lore raw
In reply to Krzysztof Kozlowski
Quoted 2 lines · Krzysztof Kozlowski

The ppc440spe_adma_chan_list file-scope variable is not used outside of the unit so it can be made static.

Applied both, thanks

Signature · 1 line
~Vinod