[1/6] bus/dpaa: fix the curly braces mismatch problem

Message ID tencent_11E278C24E0122CE74ECBE0347A845C06209@qq.com (mailing list archive)
State Superseded, archived
Headers
Series [1/6] bus/dpaa: fix the curly braces mismatch problem |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Weiguo Li Feb. 6, 2022, 12:44 a.m. UTC
  Supplement the missing half of braces for the extern "C" block

Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations")
Fixes: 919eeaccb2ba ("bus/dpaa: introduce NXP DPAA bus driver skeleton")
Cc: shreyansh.jain@nxp.com

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/bus/dpaa/include/fsl_fman.h | 5 +++++
 drivers/bus/dpaa/rte_dpaa_bus.h     | 4 ++++
 2 files changed, 9 insertions(+)
  

Comments

Bruce Richardson Feb. 7, 2022, 9:26 a.m. UTC | #1
On Sun, Feb 06, 2022 at 08:44:09AM +0800, Weiguo Li wrote:
> Supplement the missing half of braces for the extern "C" block
> 
> Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations")
> Fixes: 919eeaccb2ba ("bus/dpaa: introduce NXP DPAA bus driver skeleton")
> Cc: shreyansh.jain@nxp.com
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> ---
>  drivers/bus/dpaa/include/fsl_fman.h | 5 +++++
>  drivers/bus/dpaa/rte_dpaa_bus.h     | 4 ++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
> index acb344584f..a10845f0a0 100644
> --- a/drivers/bus/dpaa/include/fsl_fman.h
> +++ b/drivers/bus/dpaa/include/fsl_fman.h
> @@ -186,4 +186,9 @@ static inline void fman_if_disable_all_rx(void)
>  	list_for_each_entry(__if, fman_if_list, node)
>  		fman_if_disable_rx(__if);
>  }
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
>  #endif /* __FSL_FMAN_H */

Judging from the filename, this looks to be an internal-only header. Does
it really need the c++ guards?

/Bruce
  

Patch

diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
index acb344584f..a10845f0a0 100644
--- a/drivers/bus/dpaa/include/fsl_fman.h
+++ b/drivers/bus/dpaa/include/fsl_fman.h
@@ -186,4 +186,9 @@  static inline void fman_if_disable_all_rx(void)
 	list_for_each_entry(__if, fman_if_list, node)
 		fman_if_disable_rx(__if);
 }
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __FSL_FMAN_H */
diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index 31a5ea3fca..54bb1436fd 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -17,6 +17,10 @@ 
 #include <fsl_bman.h>
 #include <netcfg.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* This sequence number field is used to store event entry index for
  * driver specific usage. For parallel mode queues, invalid
  * index will be set and for atomic mode queues, valid value