linux-safety.lists.elisa.tech archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ioatdma: remove unused function missed during dma_v2 removal
@ 2020-11-13  8:12 Lukas Bulwahn
  2020-11-13 18:33 ` Nathan Chancellor
  2020-11-16 17:12 ` [linux-safety] " Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Lukas Bulwahn @ 2020-11-13  8:12 UTC (permalink / raw)
  To: Maciej Sosnowski, Vinod Koul, Dan Williams, dmaengine
  Cc: Tom Rix, Nathan Chancellor, Nick Desaulniers, clang-built-linux,
	kernel-janitors, linux-safety, linux-kernel, Lukas Bulwahn

Commit 7f832645d0e5 ("dmaengine: ioatdma: remove ioatdma v2 registration")
missed to remove dca2_tag_map_valid() during its removal. Hence, since
then, dca2_tag_map_valid() is unused and make CC=clang W=1 warns:

  drivers/dma/ioat/dca.c:44:19:
    warning: unused function 'dca2_tag_map_valid' [-Wunused-function]

So, remove this unused function and get rid of a -Wused-function warning.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
applies cleanly on current master and next-20201112

Maciej, please ack.

Vinod, Dan, please pick this minor non-urgent clean-up patch.

 drivers/dma/ioat/dca.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c
index 0be385587c4c..289c59ed74b9 100644
--- a/drivers/dma/ioat/dca.c
+++ b/drivers/dma/ioat/dca.c
@@ -40,16 +40,6 @@
 #define DCA2_TAG_MAP_BYTE3 0x82
 #define DCA2_TAG_MAP_BYTE4 0x82
 
-/* verify if tag map matches expected values */
-static inline int dca2_tag_map_valid(u8 *tag_map)
-{
-	return ((tag_map[0] == DCA2_TAG_MAP_BYTE0) &&
-		(tag_map[1] == DCA2_TAG_MAP_BYTE1) &&
-		(tag_map[2] == DCA2_TAG_MAP_BYTE2) &&
-		(tag_map[3] == DCA2_TAG_MAP_BYTE3) &&
-		(tag_map[4] == DCA2_TAG_MAP_BYTE4));
-}
-
 /*
  * "Legacy" DCA systems do not implement the DCA register set in the
  * I/OAT device.  Software needs direct support for their tag mappings.
-- 
2.17.1

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

* Re: [PATCH] dmaengine: ioatdma: remove unused function missed during dma_v2 removal
  2020-11-13  8:12 [PATCH] dmaengine: ioatdma: remove unused function missed during dma_v2 removal Lukas Bulwahn
@ 2020-11-13 18:33 ` Nathan Chancellor
  2020-11-16 17:12 ` [linux-safety] " Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2020-11-13 18:33 UTC (permalink / raw)
  To: Lukas Bulwahn
  Cc: Maciej Sosnowski, Vinod Koul, Dan Williams, dmaengine, Tom Rix,
	Nick Desaulniers, clang-built-linux, kernel-janitors,
	linux-safety, linux-kernel

On Fri, Nov 13, 2020 at 09:12:48AM +0100, Lukas Bulwahn wrote:
> Commit 7f832645d0e5 ("dmaengine: ioatdma: remove ioatdma v2 registration")
> missed to remove dca2_tag_map_valid() during its removal. Hence, since
> then, dca2_tag_map_valid() is unused and make CC=clang W=1 warns:
> 
>   drivers/dma/ioat/dca.c:44:19:
>     warning: unused function 'dca2_tag_map_valid' [-Wunused-function]
> 
> So, remove this unused function and get rid of a -Wused-function warning.
> 
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
> applies cleanly on current master and next-20201112
> 
> Maciej, please ack.
> 
> Vinod, Dan, please pick this minor non-urgent clean-up patch.
> 
>  drivers/dma/ioat/dca.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c
> index 0be385587c4c..289c59ed74b9 100644
> --- a/drivers/dma/ioat/dca.c
> +++ b/drivers/dma/ioat/dca.c
> @@ -40,16 +40,6 @@
>  #define DCA2_TAG_MAP_BYTE3 0x82
>  #define DCA2_TAG_MAP_BYTE4 0x82
>  
> -/* verify if tag map matches expected values */
> -static inline int dca2_tag_map_valid(u8 *tag_map)
> -{
> -	return ((tag_map[0] == DCA2_TAG_MAP_BYTE0) &&
> -		(tag_map[1] == DCA2_TAG_MAP_BYTE1) &&
> -		(tag_map[2] == DCA2_TAG_MAP_BYTE2) &&
> -		(tag_map[3] == DCA2_TAG_MAP_BYTE3) &&
> -		(tag_map[4] == DCA2_TAG_MAP_BYTE4));
> -}
> -
>  /*
>   * "Legacy" DCA systems do not implement the DCA register set in the
>   * I/OAT device.  Software needs direct support for their tag mappings.
> -- 
> 2.17.1
> 

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

* Re: [linux-safety] [PATCH] dmaengine: ioatdma: remove unused function missed during dma_v2 removal
  2020-11-13  8:12 [PATCH] dmaengine: ioatdma: remove unused function missed during dma_v2 removal Lukas Bulwahn
  2020-11-13 18:33 ` Nathan Chancellor
@ 2020-11-16 17:12 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-11-16 17:12 UTC (permalink / raw)
  To: Lukas Bulwahn
  Cc: Maciej Sosnowski, Dan Williams, dmaengine, Tom Rix,
	Nathan Chancellor, Nick Desaulniers, clang-built-linux,
	kernel-janitors, linux-safety, linux-kernel

On 13-11-20, 09:12, Lukas Bulwahn wrote:
> Commit 7f832645d0e5 ("dmaengine: ioatdma: remove ioatdma v2 registration")
> missed to remove dca2_tag_map_valid() during its removal. Hence, since
> then, dca2_tag_map_valid() is unused and make CC=clang W=1 warns:
> 
>   drivers/dma/ioat/dca.c:44:19:
>     warning: unused function 'dca2_tag_map_valid' [-Wunused-function]
> 
> So, remove this unused function and get rid of a -Wused-function warning.

Applied, thanks

-- 
~Vinod


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#173): https://lists.elisa.tech/g/linux-safety/message/173
Mute This Topic: https://lists.elisa.tech/mt/78225553/5278000
Group Owner: linux-safety+owner@lists.elisa.tech
Unsubscribe: https://lists.elisa.tech/g/linux-safety/unsub [linux-safety@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-



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

end of thread, other threads:[~2020-11-16 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13  8:12 [PATCH] dmaengine: ioatdma: remove unused function missed during dma_v2 removal Lukas Bulwahn
2020-11-13 18:33 ` Nathan Chancellor
2020-11-16 17:12 ` [linux-safety] " 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).