linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] crypto: ccp - Remove unnecessary includes
@ 2019-08-02 23:20 Bjorn Helgaas
  2019-08-02 23:20 ` [PATCH 1/2] crypto: ccp - Include DMA declarations explicitly Bjorn Helgaas
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2019-08-02 23:20 UTC (permalink / raw)
  To: Tom Lendacky, Gary Hook
  Cc: Herbert Xu, David S . Miller, linux-crypto, linux-kernel, Bjorn Helgaas

From: Bjorn Helgaas <bhelgaas@google.com>

CCP includes <linux/pci.h> many times unnecessarily.  Add a couple
DMA-related includes for dma_direction and dma_get_mask(), which were
previously included indirectly via <linux/pci.h>.  Then remove the
unnecessary includes of <linux/pci.h>.

Bjorn Helgaas (2):
  crypto: ccp - Include DMA declarations explicitly
  crypto: ccp - Remove unnecessary linux/pci.h include

 drivers/crypto/ccp/ccp-crypto.h    | 1 -
 drivers/crypto/ccp/ccp-dev-v3.c    | 1 -
 drivers/crypto/ccp/ccp-dev-v5.c    | 1 -
 drivers/crypto/ccp/ccp-dev.h       | 2 +-
 drivers/crypto/ccp/ccp-dmaengine.c | 1 +
 drivers/crypto/ccp/ccp-ops.c       | 1 -
 drivers/crypto/ccp/psp-dev.h       | 1 -
 drivers/crypto/ccp/sp-dev.h        | 1 -
 8 files changed, 2 insertions(+), 7 deletions(-)

-- 
2.22.0.770.g0f2c4a37fd-goog


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

* [PATCH 1/2] crypto: ccp - Include DMA declarations explicitly
  2019-08-02 23:20 [PATCH 0/2] crypto: ccp - Remove unnecessary includes Bjorn Helgaas
@ 2019-08-02 23:20 ` Bjorn Helgaas
  2019-08-06 16:44   ` Gary R Hook
  2019-08-02 23:20 ` [PATCH 2/2] crypto: ccp - Remove unnecessary linux/pci.h include Bjorn Helgaas
  2019-08-09  6:20 ` [PATCH 0/2] crypto: ccp - Remove unnecessary includes Herbert Xu
  2 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2019-08-02 23:20 UTC (permalink / raw)
  To: Tom Lendacky, Gary Hook
  Cc: Herbert Xu, David S . Miller, linux-crypto, linux-kernel, Bjorn Helgaas

From: Bjorn Helgaas <bhelgaas@google.com>

ccp-dev.h uses dma_direction, which is defined in linux/dma-direction.h.
Include that explicitly instead of relying on it being included via
linux/pci.h, since ccp-dev.h requires nothing else from linux/pci.h.

Similarly, ccp-dmaengine.c uses dma_get_mask(), which is defined in
linux/dma-mapping.h, so include that explicitly since it requires nothing
else from linux/pci.h.

A future patch will remove the includes of linux/pci.h where it is not
needed.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/crypto/ccp/ccp-dev.h       | 1 +
 drivers/crypto/ccp/ccp-dmaengine.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
index 5e624920fd99..89aee0900a06 100644
--- a/drivers/crypto/ccp/ccp-dev.h
+++ b/drivers/crypto/ccp/ccp-dev.h
@@ -17,6 +17,7 @@
 #include <linux/mutex.h>
 #include <linux/list.h>
 #include <linux/wait.h>
+#include <linux/dma-direction.h>
 #include <linux/dmapool.h>
 #include <linux/hw_random.h>
 #include <linux/bitops.h>
diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c
index 7f22a45bbc11..f69d495873f0 100644
--- a/drivers/crypto/ccp/ccp-dmaengine.c
+++ b/drivers/crypto/ccp/ccp-dmaengine.c
@@ -9,6 +9,7 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
 #include <linux/spinlock.h>
 #include <linux/mutex.h>
-- 
2.22.0.770.g0f2c4a37fd-goog


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

* [PATCH 2/2] crypto: ccp - Remove unnecessary linux/pci.h include
  2019-08-02 23:20 [PATCH 0/2] crypto: ccp - Remove unnecessary includes Bjorn Helgaas
  2019-08-02 23:20 ` [PATCH 1/2] crypto: ccp - Include DMA declarations explicitly Bjorn Helgaas
@ 2019-08-02 23:20 ` Bjorn Helgaas
  2019-08-06 16:45   ` Gary R Hook
  2019-08-09  6:20 ` [PATCH 0/2] crypto: ccp - Remove unnecessary includes Herbert Xu
  2 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2019-08-02 23:20 UTC (permalink / raw)
  To: Tom Lendacky, Gary Hook
  Cc: Herbert Xu, David S . Miller, linux-crypto, linux-kernel, Bjorn Helgaas

From: Bjorn Helgaas <bhelgaas@google.com>

Remove unused includes of linux/pci.h.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/crypto/ccp/ccp-crypto.h | 1 -
 drivers/crypto/ccp/ccp-dev-v3.c | 1 -
 drivers/crypto/ccp/ccp-dev-v5.c | 1 -
 drivers/crypto/ccp/ccp-dev.h    | 1 -
 drivers/crypto/ccp/ccp-ops.c    | 1 -
 drivers/crypto/ccp/psp-dev.h    | 1 -
 drivers/crypto/ccp/sp-dev.h     | 1 -
 7 files changed, 7 deletions(-)

diff --git a/drivers/crypto/ccp/ccp-crypto.h b/drivers/crypto/ccp/ccp-crypto.h
index 622b34c17643..903e74e7ad1b 100644
--- a/drivers/crypto/ccp/ccp-crypto.h
+++ b/drivers/crypto/ccp/ccp-crypto.h
@@ -12,7 +12,6 @@
 
 #include <linux/list.h>
 #include <linux/wait.h>
-#include <linux/pci.h>
 #include <linux/ccp.h>
 #include <crypto/algapi.h>
 #include <crypto/aes.h>
diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c
index 2b7d47ed5c74..09924f2c264f 100644
--- a/drivers/crypto/ccp/ccp-dev-v3.c
+++ b/drivers/crypto/ccp/ccp-dev-v3.c
@@ -10,7 +10,6 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/pci.h>
 #include <linux/kthread.h>
 #include <linux/interrupt.h>
 #include <linux/ccp.h>
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index 217e41bbadaf..0b6ef334f9b7 100644
--- a/drivers/crypto/ccp/ccp-dev-v5.c
+++ b/drivers/crypto/ccp/ccp-dev-v5.c
@@ -9,7 +9,6 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/pci.h>
 #include <linux/kthread.h>
 #include <linux/debugfs.h>
 #include <linux/dma-mapping.h>
diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
index 89aee0900a06..57749c5a5373 100644
--- a/drivers/crypto/ccp/ccp-dev.h
+++ b/drivers/crypto/ccp/ccp-dev.h
@@ -12,7 +12,6 @@
 #define __CCP_DEV_H__
 
 #include <linux/device.h>
-#include <linux/pci.h>
 #include <linux/spinlock.h>
 #include <linux/mutex.h>
 #include <linux/list.h>
diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
index c69ed4bae2eb..b565c08bbe28 100644
--- a/drivers/crypto/ccp/ccp-ops.c
+++ b/drivers/crypto/ccp/ccp-ops.c
@@ -10,7 +10,6 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/pci.h>
 #include <linux/interrupt.h>
 #include <crypto/scatterwalk.h>
 #include <crypto/des.h>
diff --git a/drivers/crypto/ccp/psp-dev.h b/drivers/crypto/ccp/psp-dev.h
index c5e06c92d40e..82a084f02990 100644
--- a/drivers/crypto/ccp/psp-dev.h
+++ b/drivers/crypto/ccp/psp-dev.h
@@ -11,7 +11,6 @@
 #define __PSP_DEV_H__
 
 #include <linux/device.h>
-#include <linux/pci.h>
 #include <linux/spinlock.h>
 #include <linux/mutex.h>
 #include <linux/list.h>
diff --git a/drivers/crypto/ccp/sp-dev.h b/drivers/crypto/ccp/sp-dev.h
index 8abe9ea7e76f..53c12562d31e 100644
--- a/drivers/crypto/ccp/sp-dev.h
+++ b/drivers/crypto/ccp/sp-dev.h
@@ -13,7 +13,6 @@
 #define __SP_DEV_H__
 
 #include <linux/device.h>
-#include <linux/pci.h>
 #include <linux/spinlock.h>
 #include <linux/mutex.h>
 #include <linux/list.h>
-- 
2.22.0.770.g0f2c4a37fd-goog


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

* Re: [PATCH 1/2] crypto: ccp - Include DMA declarations explicitly
  2019-08-02 23:20 ` [PATCH 1/2] crypto: ccp - Include DMA declarations explicitly Bjorn Helgaas
@ 2019-08-06 16:44   ` Gary R Hook
  0 siblings, 0 replies; 6+ messages in thread
From: Gary R Hook @ 2019-08-06 16:44 UTC (permalink / raw)
  To: Bjorn Helgaas, Lendacky, Thomas, Hook, Gary
  Cc: Herbert Xu, David S . Miller, linux-crypto, linux-kernel, Bjorn Helgaas

On 8/2/19 6:20 PM, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> ccp-dev.h uses dma_direction, which is defined in linux/dma-direction.h.
> Include that explicitly instead of relying on it being included via
> linux/pci.h, since ccp-dev.h requires nothing else from linux/pci.h.
> 
> Similarly, ccp-dmaengine.c uses dma_get_mask(), which is defined in
> linux/dma-mapping.h, so include that explicitly since it requires nothing
> else from linux/pci.h.
> 
> A future patch will remove the includes of linux/pci.h where it is not
> needed.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Acked-by: Gary R Hook <gary.hook@amd.com>

> ---
>   drivers/crypto/ccp/ccp-dev.h       | 1 +
>   drivers/crypto/ccp/ccp-dmaengine.c | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
> index 5e624920fd99..89aee0900a06 100644
> --- a/drivers/crypto/ccp/ccp-dev.h
> +++ b/drivers/crypto/ccp/ccp-dev.h
> @@ -17,6 +17,7 @@
>   #include <linux/mutex.h>
>   #include <linux/list.h>
>   #include <linux/wait.h>
> +#include <linux/dma-direction.h>
>   #include <linux/dmapool.h>
>   #include <linux/hw_random.h>
>   #include <linux/bitops.h>
> diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c
> index 7f22a45bbc11..f69d495873f0 100644
> --- a/drivers/crypto/ccp/ccp-dmaengine.c
> +++ b/drivers/crypto/ccp/ccp-dmaengine.c
> @@ -9,6 +9,7 @@
>   
>   #include <linux/module.h>
>   #include <linux/kernel.h>
> +#include <linux/dma-mapping.h>
>   #include <linux/dmaengine.h>
>   #include <linux/spinlock.h>
>   #include <linux/mutex.h>
> 


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

* Re: [PATCH 2/2] crypto: ccp - Remove unnecessary linux/pci.h include
  2019-08-02 23:20 ` [PATCH 2/2] crypto: ccp - Remove unnecessary linux/pci.h include Bjorn Helgaas
@ 2019-08-06 16:45   ` Gary R Hook
  0 siblings, 0 replies; 6+ messages in thread
From: Gary R Hook @ 2019-08-06 16:45 UTC (permalink / raw)
  To: Bjorn Helgaas, Lendacky, Thomas, Hook, Gary
  Cc: Herbert Xu, David S . Miller, linux-crypto, linux-kernel, Bjorn Helgaas

On 8/2/19 6:20 PM, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> Remove unused includes of linux/pci.h.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Acked-by: Gary R Hook <gary.hook@amd.com>

> ---
>   drivers/crypto/ccp/ccp-crypto.h | 1 -
>   drivers/crypto/ccp/ccp-dev-v3.c | 1 -
>   drivers/crypto/ccp/ccp-dev-v5.c | 1 -
>   drivers/crypto/ccp/ccp-dev.h    | 1 -
>   drivers/crypto/ccp/ccp-ops.c    | 1 -
>   drivers/crypto/ccp/psp-dev.h    | 1 -
>   drivers/crypto/ccp/sp-dev.h     | 1 -
>   7 files changed, 7 deletions(-)
> 
> diff --git a/drivers/crypto/ccp/ccp-crypto.h b/drivers/crypto/ccp/ccp-crypto.h
> index 622b34c17643..903e74e7ad1b 100644
> --- a/drivers/crypto/ccp/ccp-crypto.h
> +++ b/drivers/crypto/ccp/ccp-crypto.h
> @@ -12,7 +12,6 @@
>   
>   #include <linux/list.h>
>   #include <linux/wait.h>
> -#include <linux/pci.h>
>   #include <linux/ccp.h>
>   #include <crypto/algapi.h>
>   #include <crypto/aes.h>
> diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c
> index 2b7d47ed5c74..09924f2c264f 100644
> --- a/drivers/crypto/ccp/ccp-dev-v3.c
> +++ b/drivers/crypto/ccp/ccp-dev-v3.c
> @@ -10,7 +10,6 @@
>   
>   #include <linux/module.h>
>   #include <linux/kernel.h>
> -#include <linux/pci.h>
>   #include <linux/kthread.h>
>   #include <linux/interrupt.h>
>   #include <linux/ccp.h>
> diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
> index 217e41bbadaf..0b6ef334f9b7 100644
> --- a/drivers/crypto/ccp/ccp-dev-v5.c
> +++ b/drivers/crypto/ccp/ccp-dev-v5.c
> @@ -9,7 +9,6 @@
>   
>   #include <linux/module.h>
>   #include <linux/kernel.h>
> -#include <linux/pci.h>
>   #include <linux/kthread.h>
>   #include <linux/debugfs.h>
>   #include <linux/dma-mapping.h>
> diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
> index 89aee0900a06..57749c5a5373 100644
> --- a/drivers/crypto/ccp/ccp-dev.h
> +++ b/drivers/crypto/ccp/ccp-dev.h
> @@ -12,7 +12,6 @@
>   #define __CCP_DEV_H__
>   
>   #include <linux/device.h>
> -#include <linux/pci.h>
>   #include <linux/spinlock.h>
>   #include <linux/mutex.h>
>   #include <linux/list.h>
> diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
> index c69ed4bae2eb..b565c08bbe28 100644
> --- a/drivers/crypto/ccp/ccp-ops.c
> +++ b/drivers/crypto/ccp/ccp-ops.c
> @@ -10,7 +10,6 @@
>   
>   #include <linux/module.h>
>   #include <linux/kernel.h>
> -#include <linux/pci.h>
>   #include <linux/interrupt.h>
>   #include <crypto/scatterwalk.h>
>   #include <crypto/des.h>
> diff --git a/drivers/crypto/ccp/psp-dev.h b/drivers/crypto/ccp/psp-dev.h
> index c5e06c92d40e..82a084f02990 100644
> --- a/drivers/crypto/ccp/psp-dev.h
> +++ b/drivers/crypto/ccp/psp-dev.h
> @@ -11,7 +11,6 @@
>   #define __PSP_DEV_H__
>   
>   #include <linux/device.h>
> -#include <linux/pci.h>
>   #include <linux/spinlock.h>
>   #include <linux/mutex.h>
>   #include <linux/list.h>
> diff --git a/drivers/crypto/ccp/sp-dev.h b/drivers/crypto/ccp/sp-dev.h
> index 8abe9ea7e76f..53c12562d31e 100644
> --- a/drivers/crypto/ccp/sp-dev.h
> +++ b/drivers/crypto/ccp/sp-dev.h
> @@ -13,7 +13,6 @@
>   #define __SP_DEV_H__
>   
>   #include <linux/device.h>
> -#include <linux/pci.h>
>   #include <linux/spinlock.h>
>   #include <linux/mutex.h>
>   #include <linux/list.h>
> 


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

* Re: [PATCH 0/2] crypto: ccp - Remove unnecessary includes
  2019-08-02 23:20 [PATCH 0/2] crypto: ccp - Remove unnecessary includes Bjorn Helgaas
  2019-08-02 23:20 ` [PATCH 1/2] crypto: ccp - Include DMA declarations explicitly Bjorn Helgaas
  2019-08-02 23:20 ` [PATCH 2/2] crypto: ccp - Remove unnecessary linux/pci.h include Bjorn Helgaas
@ 2019-08-09  6:20 ` Herbert Xu
  2 siblings, 0 replies; 6+ messages in thread
From: Herbert Xu @ 2019-08-09  6:20 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Tom Lendacky, Gary Hook, David S . Miller, linux-crypto,
	linux-kernel, Bjorn Helgaas

On Fri, Aug 02, 2019 at 06:20:10PM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> CCP includes <linux/pci.h> many times unnecessarily.  Add a couple
> DMA-related includes for dma_direction and dma_get_mask(), which were
> previously included indirectly via <linux/pci.h>.  Then remove the
> unnecessary includes of <linux/pci.h>.
> 
> Bjorn Helgaas (2):
>   crypto: ccp - Include DMA declarations explicitly
>   crypto: ccp - Remove unnecessary linux/pci.h include
> 
>  drivers/crypto/ccp/ccp-crypto.h    | 1 -
>  drivers/crypto/ccp/ccp-dev-v3.c    | 1 -
>  drivers/crypto/ccp/ccp-dev-v5.c    | 1 -
>  drivers/crypto/ccp/ccp-dev.h       | 2 +-
>  drivers/crypto/ccp/ccp-dmaengine.c | 1 +
>  drivers/crypto/ccp/ccp-ops.c       | 1 -
>  drivers/crypto/ccp/psp-dev.h       | 1 -
>  drivers/crypto/ccp/sp-dev.h        | 1 -
>  8 files changed, 2 insertions(+), 7 deletions(-)

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2019-08-09  6:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 23:20 [PATCH 0/2] crypto: ccp - Remove unnecessary includes Bjorn Helgaas
2019-08-02 23:20 ` [PATCH 1/2] crypto: ccp - Include DMA declarations explicitly Bjorn Helgaas
2019-08-06 16:44   ` Gary R Hook
2019-08-02 23:20 ` [PATCH 2/2] crypto: ccp - Remove unnecessary linux/pci.h include Bjorn Helgaas
2019-08-06 16:45   ` Gary R Hook
2019-08-09  6:20 ` [PATCH 0/2] crypto: ccp - Remove unnecessary includes Herbert Xu

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).