Skip to contentSkip to conversation

iommu/vt-d: Fix W=1 clang warning in intel/perf.c

PATCH In review Joerg Roedel 4 participants 5 messages Jun 17, 2021 – Jun 18, 2021

Subsystems (2)
lore
Share & tools
lore

Joerg Roedel

author maintainer
#0 lore raw

PATCH 1/1 iommu/vt-d: Fix W=1 clang warning in intel/perf.c

From: Joerg Roedel <[email protected]>

Fix this warning when compiled with clang and W=1:

drivers/iommu/intel/perf.c:16: warning: Function parameter or member 'latency_lock' not described in 'DEFINE_SPINLOCK' drivers/iommu/intel/perf.c:16: warning: expecting prototype for perf.c(). Prototype was for DEFINE_SPINLOCK() instead

Cc Lu Baolu <[email protected]>
Fixes 55ee5e67a59a ("iommu/vt-d: Add common code for dmar latency performance monitors")
---
 drivers/iommu/intel/perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel/perf.c +1 -1
index 73b7ec705552..0e8e03252d92 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * perf.c - performance monitor
  *
  * Copyright (C) 2021 Intel Corporation
Signature · 1 line
2.31.1
#1 lore raw
Quoted 7 lines · Joerg Roedel

From: Joerg Roedel <[email protected]>

Fix this warning when compiled with clang and W=1:

drivers/iommu/intel/perf.c:16: warning: Function parameter or member 'latency_lock' not described in 'DEFINE_SPINLOCK' drivers/iommu/intel/perf.c:16: warning: expecting prototype for perf.c(). Prototype was for DEFINE_SPINLOCK() instead

I think these warnings are actually produced by kernel-doc? (not clang)

Quoted 27 lines
Cc Lu Baolu <[email protected]>
Fixes 55ee5e67a59a ("iommu/vt-d: Add common code for dmar latency performance monitors")
---
 drivers/iommu/intel/perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel/perf.c +1 -2
index 73b7ec705552..0e8e03252d92 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * perf.c - performance monitor
  *
  * Copyright (C) 2021 Intel Corporation
--

2.31.1

--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210617145339.2692-1-joro%408bytes.org.

Signature · 2 lines
Thanks,
~Nick Desaulniers
#2 lore raw
Quoted 10 lines · Nick Desaulniers
Quoted 7 lines · Joerg Roedel

From: Joerg Roedel <[email protected]>

Fix this warning when compiled with clang and W=1:

drivers/iommu/intel/perf.c:16: warning: Function parameter or member 'latency_lock' not described in 'DEFINE_SPINLOCK' drivers/iommu/intel/perf.c:16: warning: expecting prototype for perf.c(). Prototype was for DEFINE_SPINLOCK() instead

I think these warnings are actually produced by kernel-doc? (not clang)

Will kernel-doc check automatically when COMPILER=clang is set and W=1? Because I did not explicitly enable any kernel-doc checks.

Regards,

Joerg

#3 lore raw
Quoted 10 lines · Joerg Roedel
Quoted 9 lines · Nick Desaulniers
Quoted 7 lines · Joerg Roedel

From: Joerg Roedel <[email protected]>

Fix this warning when compiled with clang and W=1:

drivers/iommu/intel/perf.c:16: warning: Function parameter or member 'latency_lock' not described in 'DEFINE_SPINLOCK' drivers/iommu/intel/perf.c:16: warning: expecting prototype for perf.c(). Prototype was for DEFINE_SPINLOCK() instead

Quoted 9 lines
Quoted 1 line

I think these warnings are actually produced by kernel-doc? (not clang)

Will kernel-doc check automatically when COMPILER=clang is set and W=1? Because I did not explicitly enable any kernel-doc checks.

Regards,

Joerg

kernel-doc is run automatically with W=1, regardless of gcc versus clang.

Cheers,
Nathan

#4 lore raw
Quoted 1 line · Nathan Chancellor

kernel-doc is run automatically with W=1, regardless of gcc versus clang.

I see, thanks. Will update the commit message.

Thanks,

Joerg