Skip to contentSkip to conversation

dmaengine: ti: edma: Remove the unused function edma_and()

PATCH In review Jiapeng Chong 3 participants 4 messages Oct 18, 2022 – Nov 4, 2022 1 message not in the archive

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

PATCH 1/1 dmaengine: ti: edma: Remove the unused function edma_and()

The function edma_and() is defined in the edma.c file, but not called elsewhere, so remove this unused function.

drivers/dma/ti/edma.c:321:20: warning: unused function 'edma_and'.

---
 drivers/dma/ti/edma.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/dma/ti/edma.c +0 -8
index fa06d7e6d8e3..9ea91c640c32 100644
@@ -318,14 +318,6 @@ static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and,
 	edma_write(ecc, offset, val);
 }
 
-static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and)
-{
-	unsigned val = edma_read(ecc, offset);
-
-	val &= and;
-	edma_write(ecc, offset, val);
-}
-
 static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or)
 {
 	unsigned val = edma_read(ecc, offset);
Signature · 1 line
2.20.1.7.g153144c
maintainer
#1 lore raw
Quoted 7 lines · Jiapeng Chong

The function edma_and() is defined in the edma.c file, but not called elsewhere, so remove this unused function.

drivers/dma/ti/edma.c:321:20: warning: unused function 'edma_and'.

Where is this report?

Quoted 26 lines
---
 drivers/dma/ti/edma.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/dma/ti/edma.c +0 -8
index fa06d7e6d8e3..9ea91c640c32 100644
@@ -318,14 +318,6 @@ static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and,
 	edma_write(ecc, offset, val);
 }
 
-static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and)
-{
-	unsigned val = edma_read(ecc, offset);
-
-	val &= and;
-	edma_write(ecc, offset, val);
-}
-
 static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or)
 {
 	unsigned val = edma_read(ecc, offset);
Signature · 1 line
2.20.1.7.g153144c
Signature · 1 line
~Vinod

A message that is not in the archive (sent off-list or not yet received): 354896d0-3a48-44a1-81bf-8e46caf55a7e.jiapeng.chong@linux.alibaba.com

maintainer
#3 lore raw
Quoted 1 line · Jiapeng.Chong

The report is the link, which can be seen in the submitted patch description. Thank you.

Pls dont top post!

Quoted 1 line

This bug says: "ABACI reported the following bug by code static scanning"

Where is the ABACI report?

Quoted 43 lines

------------------------------------------------------------------
发件人:Vinod Koul <[email protected]>
发送时间:2022年10月19日(星期三) 21:46
收件人:Jiapeng Chong <[email protected]>
抄 送:peter.ujfalusi <[email protected]>; dmaengine <[email protected]>; linux-kernel <[email protected]>; Abaci Robot <[email protected]> 主 题:Re: [PATCH] dmaengine: ti: edma: Remove the unused function edma_and()

Quoted 7 lines · Jiapeng Chong

The function edma_and() is defined in the edma.c file, but not called elsewhere, so remove this unused function.

drivers/dma/ti/edma.c:321:20: warning: unused function 'edma_and'.

Where is this report?

Quoted 26 lines

---
drivers/dma/ti/edma.c | 8 --------

1 file changed, 8 deletions(-)
drivers/dma/ti/edma.c +0 -8
index fa06d7e6d8e3..9ea91c640c32 100644
@@ -318,14 +318,6 @@ static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and,
 edma_write(ecc, offset, val);
 }
 
-static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and)
-{
- unsigned val = edma_read(ecc, offset);
-
- val &= and;
- edma_write(ecc, offset, val);
-}
-
 static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or)
 {
 unsigned val = edma_read(ecc, offset);
Signature · 1 line
2.20.1.7.g153144c
Signature · 1 line
~Vinod
Signature · 1 line
~Vinod
Acked-by on v1 1/1
#4 lore raw
In reply to Jiapeng Chong
Quoted 4 lines · Jiapeng Chong

The function edma_and() is defined in the edma.c file, but not called elsewhere, so remove this unused function.

drivers/dma/ti/edma.c:321:20: warning: unused function 'edma_and'.

0f4c5b29e333 dmaengine: ti: edma: Remove some unused functions dropped edma_param_and() but left the edma_and() behind...

Quoted 27 lines
---
  drivers/dma/ti/edma.c | 8 --------
  1 file changed, 8 deletions(-)
drivers/dma/ti/edma.c +0 -8
index fa06d7e6d8e3..9ea91c640c32 100644
@@ -318,14 +318,6 @@ static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and,
  	edma_write(ecc, offset, val);
  }
 
-static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and)
-{
-	unsigned val = edma_read(ecc, offset);
-
-	val &= and;
-	edma_write(ecc, offset, val);
-}
-
  static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or)
  {
  	unsigned val = edma_read(ecc, offset);
Signature · 1 line
Péter