diff mbox series

[01/10] tpm: Move tpm-utils header under the include directory

Message ID 20220224180552.26901-2-sughosh.ganu@linaro.org
State Superseded
Headers show
Series tpm: rng: Move TPM RNG functionality to driver model | expand

Commit Message

Sughosh Ganu Feb. 24, 2022, 6:05 p.m. UTC
The random number generation functions of TPM will be moved under a
dedicated driver. With this, the function declarations along with
some other relevant macro definitions need to be moved under a
common header file directory. Move the tpm-utils.h header file under
the common include directory.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 {lib => include}/tpm-utils.h | 0
 lib/tpm-common.c             | 2 +-
 lib/tpm-v1.c                 | 2 +-
 lib/tpm-v2.c                 | 2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename {lib => include}/tpm-utils.h (100%)

Comments

Heinrich Schuchardt Feb. 24, 2022, 6:36 p.m. UTC | #1
On 2/24/22 19:05, Sughosh Ganu wrote:
> The random number generation functions of TPM will be moved under a
> dedicated driver. With this, the function declarations along with
> some other relevant macro definitions need to be moved under a
> common header file directory. Move the tpm-utils.h header file under
> the common include directory.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>   {lib => include}/tpm-utils.h | 0
>   lib/tpm-common.c             | 2 +-
>   lib/tpm-v1.c                 | 2 +-
>   lib/tpm-v2.c                 | 2 +-
>   4 files changed, 3 insertions(+), 3 deletions(-)
>   rename {lib => include}/tpm-utils.h (100%)
>
> diff --git a/lib/tpm-utils.h b/include/tpm-utils.h
> similarity index 100%
> rename from lib/tpm-utils.h
> rename to include/tpm-utils.h
> diff --git a/lib/tpm-common.c b/lib/tpm-common.c
> index 82ffdc5341..26506f0b99 100644
> --- a/lib/tpm-common.c
> +++ b/lib/tpm-common.c
> @@ -11,7 +11,7 @@
>   #include <log.h>
>   #include <asm/unaligned.h>
>   #include <tpm-common.h>
> -#include "tpm-utils.h"
> +#include <tpm-utils.h>
>
>   enum tpm_version tpm_get_version(struct udevice *dev)
>   {
> diff --git a/lib/tpm-v1.c b/lib/tpm-v1.c
> index 22a769c587..467992e04e 100644
> --- a/lib/tpm-v1.c
> +++ b/lib/tpm-v1.c
> @@ -13,7 +13,7 @@
>   #include <u-boot/sha1.h>
>   #include <tpm-common.h>
>   #include <tpm-v1.h>
> -#include "tpm-utils.h"
> +#include <tpm-utils.h>
>
>   #ifdef CONFIG_TPM_AUTH_SESSIONS
>
> diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
> index 1bf627853a..2f16b0007b 100644
> --- a/lib/tpm-v2.c
> +++ b/lib/tpm-v2.c
> @@ -9,7 +9,7 @@
>   #include <tpm-common.h>
>   #include <tpm-v2.h>
>   #include <linux/bitops.h>
> -#include "tpm-utils.h"
> +#include <tpm-utils.h>
>
>   u32 tpm2_startup(struct udevice *dev, enum tpm2_startup_types mode)
>   {
Ilias Apalodimas Feb. 25, 2022, 3:15 p.m. UTC | #2
On Thu, Feb 24, 2022 at 11:35:43PM +0530, Sughosh Ganu wrote:
> The random number generation functions of TPM will be moved under a
> dedicated driver. With this, the function declarations along with
> some other relevant macro definitions need to be moved under a
> common header file directory. Move the tpm-utils.h header file under
> the common include directory.
> 
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
>  {lib => include}/tpm-utils.h | 0
>  lib/tpm-common.c             | 2 +-
>  lib/tpm-v1.c                 | 2 +-
>  lib/tpm-v2.c                 | 2 +-
>  4 files changed, 3 insertions(+), 3 deletions(-)
>  rename {lib => include}/tpm-utils.h (100%)
> 
> diff --git a/lib/tpm-utils.h b/include/tpm-utils.h
> similarity index 100%
> rename from lib/tpm-utils.h
> rename to include/tpm-utils.h
> diff --git a/lib/tpm-common.c b/lib/tpm-common.c
> index 82ffdc5341..26506f0b99 100644
> --- a/lib/tpm-common.c
> +++ b/lib/tpm-common.c
> @@ -11,7 +11,7 @@
>  #include <log.h>
>  #include <asm/unaligned.h>
>  #include <tpm-common.h>
> -#include "tpm-utils.h"
> +#include <tpm-utils.h>
>  
>  enum tpm_version tpm_get_version(struct udevice *dev)
>  {
> diff --git a/lib/tpm-v1.c b/lib/tpm-v1.c
> index 22a769c587..467992e04e 100644
> --- a/lib/tpm-v1.c
> +++ b/lib/tpm-v1.c
> @@ -13,7 +13,7 @@
>  #include <u-boot/sha1.h>
>  #include <tpm-common.h>
>  #include <tpm-v1.h>
> -#include "tpm-utils.h"
> +#include <tpm-utils.h>
>  
>  #ifdef CONFIG_TPM_AUTH_SESSIONS
>  
> diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
> index 1bf627853a..2f16b0007b 100644
> --- a/lib/tpm-v2.c
> +++ b/lib/tpm-v2.c
> @@ -9,7 +9,7 @@
>  #include <tpm-common.h>
>  #include <tpm-v2.h>
>  #include <linux/bitops.h>
> -#include "tpm-utils.h"
> +#include <tpm-utils.h>
>  
>  u32 tpm2_startup(struct udevice *dev, enum tpm2_startup_types mode)
>  {
> -- 
> 2.17.1
> 

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/lib/tpm-utils.h b/include/tpm-utils.h
similarity index 100%
rename from lib/tpm-utils.h
rename to include/tpm-utils.h
diff --git a/lib/tpm-common.c b/lib/tpm-common.c
index 82ffdc5341..26506f0b99 100644
--- a/lib/tpm-common.c
+++ b/lib/tpm-common.c
@@ -11,7 +11,7 @@ 
 #include <log.h>
 #include <asm/unaligned.h>
 #include <tpm-common.h>
-#include "tpm-utils.h"
+#include <tpm-utils.h>
 
 enum tpm_version tpm_get_version(struct udevice *dev)
 {
diff --git a/lib/tpm-v1.c b/lib/tpm-v1.c
index 22a769c587..467992e04e 100644
--- a/lib/tpm-v1.c
+++ b/lib/tpm-v1.c
@@ -13,7 +13,7 @@ 
 #include <u-boot/sha1.h>
 #include <tpm-common.h>
 #include <tpm-v1.h>
-#include "tpm-utils.h"
+#include <tpm-utils.h>
 
 #ifdef CONFIG_TPM_AUTH_SESSIONS
 
diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
index 1bf627853a..2f16b0007b 100644
--- a/lib/tpm-v2.c
+++ b/lib/tpm-v2.c
@@ -9,7 +9,7 @@ 
 #include <tpm-common.h>
 #include <tpm-v2.h>
 #include <linux/bitops.h>
-#include "tpm-utils.h"
+#include <tpm-utils.h>
 
 u32 tpm2_startup(struct udevice *dev, enum tpm2_startup_types mode)
 {