linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dmaengine: ppc4xx: make ppc440spe_adma_chan_list static
@ 2020-10-19 15:57 Krzysztof Kozlowski
  2020-10-19 15:57 ` [PATCH 2/2] dmaengine: ppc4xx: remove xor_hw_desc assignment without reading Krzysztof Kozlowski
  2020-10-28  6:25 ` [PATCH 1/2] dmaengine: ppc4xx: make ppc440spe_adma_chan_list static Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2020-10-19 15:57 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams, dmaengine, linux-kernel
  Cc: kbuild-all, Andrew Morton, Linux Memory Management List,
	Geert Uytterhoeven, Arnd Bergmann, Krzysztof Kozlowski,
	kernel test robot

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

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/dma/ppc4xx/adma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index 71cdaaa8134c..fea598550582 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -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
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] dmaengine: ppc4xx: remove xor_hw_desc assignment without reading
  2020-10-19 15:57 [PATCH 1/2] dmaengine: ppc4xx: make ppc440spe_adma_chan_list static Krzysztof Kozlowski
@ 2020-10-19 15:57 ` Krzysztof Kozlowski
  2020-10-28  6:25 ` [PATCH 1/2] dmaengine: ppc4xx: make ppc440spe_adma_chan_list static Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2020-10-19 15:57 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams, dmaengine, linux-kernel
  Cc: kbuild-all, Andrew Morton, Linux Memory Management List,
	Geert Uytterhoeven, Arnd Bergmann, Krzysztof Kozlowski

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]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/dma/ppc4xx/adma.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index fea598550582..df7704053d91 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -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();
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] dmaengine: ppc4xx: make ppc440spe_adma_chan_list static
  2020-10-19 15:57 [PATCH 1/2] dmaengine: ppc4xx: make ppc440spe_adma_chan_list static Krzysztof Kozlowski
  2020-10-19 15:57 ` [PATCH 2/2] dmaengine: ppc4xx: remove xor_hw_desc assignment without reading Krzysztof Kozlowski
@ 2020-10-28  6:25 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-10-28  6:25 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Dan Williams, dmaengine, linux-kernel, kbuild-all, Andrew Morton,
	Linux Memory Management List, Geert Uytterhoeven, Arnd Bergmann,
	kernel test robot

On 19-10-20, 17:57, Krzysztof Kozlowski wrote:
> The ppc440spe_adma_chan_list file-scope variable is not used outside of
> the unit so it can be made static.

Applied both, thanks

-- 
~Vinod


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-28  6:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 15:57 [PATCH 1/2] dmaengine: ppc4xx: make ppc440spe_adma_chan_list static Krzysztof Kozlowski
2020-10-19 15:57 ` [PATCH 2/2] dmaengine: ppc4xx: remove xor_hw_desc assignment without reading Krzysztof Kozlowski
2020-10-28  6:25 ` [PATCH 1/2] dmaengine: ppc4xx: make ppc440spe_adma_chan_list static Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).