[02/16] event/octeontx: add define guards to avoid multi-inclusion

Message ID tencent_19CC77F2888048690C124FECA95A848B0E06@qq.com (mailing list archive)
State Superseded, archived
Headers
Series [01/16] bus/dpaa: add define guards to avoid multiple inclusion |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Weiguo Li Feb. 6, 2022, 3:58 a.m. UTC
  Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/event/octeontx/timvf_worker.h | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Thomas Monjalon Feb. 8, 2022, 4:27 p.m. UTC | #1
06/02/2022 04:58, Weiguo Li:
> Supplement define guards to prevent multiple inclusion.
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> ---
> --- a/drivers/event/octeontx/timvf_worker.h
> +++ b/drivers/event/octeontx/timvf_worker.h
> +#ifndef __TIMVF_WORKER_H__
> +#define __TIMVF_WORKER_H__

Why these underscores?
It could be simply
	#ifndef TIMVF_WORKER_H
  

Patch

diff --git a/drivers/event/octeontx/timvf_worker.h b/drivers/event/octeontx/timvf_worker.h
index 3f1e77f1d1..a99ff54245 100644
--- a/drivers/event/octeontx/timvf_worker.h
+++ b/drivers/event/octeontx/timvf_worker.h
@@ -2,6 +2,9 @@ 
  * Copyright(c) 2017 Cavium, Inc
  */
 
+#ifndef __TIMVF_WORKER_H__
+#define __TIMVF_WORKER_H__
+
 #include <eventdev_pmd.h>
 
 #include <rte_common.h>
@@ -443,3 +446,5 @@  timvf_add_entry_brst(struct timvf_ring * const timr, const uint16_t rel_bkt,
 	timr_bkt_dec_lock(bkt);
 	return nb_timers;
 }
+
+#endif /* __TIMVF_WORKER_H__ */