diff mbox series

[1/2] firmware: ti_sci: Include linux/err.h in ti_sci_protocol.h

Message ID 20210727232440.26468-2-s-anna@ti.com
State Accepted
Commit 04662755000c7fb7d5716953a7899560863648e6
Delegated to: Tom Rini
Headers show
Series Minor misc. cleanups for TI K3 SoCs | expand

Commit Message

Suman Anna July 27, 2021, 11:24 p.m. UTC
The common TI SCI header file uses some macros from err.h and these
get exercised when CONFIG_TI_SCI_PROTOCOL is not defined. Include
the linux/err.h header file in this header file directly rather
than relying on source files to include it to eliminate any
potential build errors.

While at this, reorder the existing header file include to the
beginning of the file.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 include/linux/soc/ti/ti_sci_protocol.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Nishanth Menon Aug. 27, 2021, 3:52 p.m. UTC | #1
On 18:24-20210727, Suman Anna wrote:
> The common TI SCI header file uses some macros from err.h and these
> get exercised when CONFIG_TI_SCI_PROTOCOL is not defined. Include
> the linux/err.h header file in this header file directly rather
> than relying on source files to include it to eliminate any
> potential build errors.
> 
> While at this, reorder the existing header file include to the
> beginning of the file.
> 
> Signed-off-by: Suman Anna <s-anna@ti.com>
> ---
>  include/linux/soc/ti/ti_sci_protocol.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
> index 794737923cf1..7f9941894cdf 100644
> --- a/include/linux/soc/ti/ti_sci_protocol.h
> +++ b/include/linux/soc/ti/ti_sci_protocol.h
> @@ -11,6 +11,9 @@
>  #ifndef __TISCI_PROTOCOL_H
>  #define __TISCI_PROTOCOL_H
>  
> +#include <linux/bitops.h>
> +#include <linux/err.h>
> +
>  /**
>   * struct ti_sci_version_info - version information structure
>   * @abi_major:	Major ABI version. Change here implies risk of backward
> @@ -20,7 +23,6 @@
>   * @firmware_revision:	Firmware revision (not usually used).
>   * @firmware_description: Firmware description (not usually used).
>   */
> -#include <linux/bitops.h>
>  struct ti_sci_version_info {
>  	u8 abi_major;
>  	u8 abi_minor;

Reviewed-by: Nishanth Menon <nm@ti.com>
Tom Rini Sept. 17, 2021, 10:53 p.m. UTC | #2
On Tue, Jul 27, 2021 at 06:24:39PM -0500, Suman Anna wrote:

> The common TI SCI header file uses some macros from err.h and these
> get exercised when CONFIG_TI_SCI_PROTOCOL is not defined. Include
> the linux/err.h header file in this header file directly rather
> than relying on source files to include it to eliminate any
> potential build errors.
> 
> While at this, reorder the existing header file include to the
> beginning of the file.
> 
> Signed-off-by: Suman Anna <s-anna@ti.com>
> Reviewed-by: Nishanth Menon <nm@ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index 794737923cf1..7f9941894cdf 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -11,6 +11,9 @@ 
 #ifndef __TISCI_PROTOCOL_H
 #define __TISCI_PROTOCOL_H
 
+#include <linux/bitops.h>
+#include <linux/err.h>
+
 /**
  * struct ti_sci_version_info - version information structure
  * @abi_major:	Major ABI version. Change here implies risk of backward
@@ -20,7 +23,6 @@ 
  * @firmware_revision:	Firmware revision (not usually used).
  * @firmware_description: Firmware description (not usually used).
  */
-#include <linux/bitops.h>
 struct ti_sci_version_info {
 	u8 abi_major;
 	u8 abi_minor;