linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/vt-d: Fix W=1 clang warning in intel/perf.c
@ 2021-06-17 14:53 Joerg Roedel
  2021-06-17 17:16 ` Nick Desaulniers
  0 siblings, 1 reply; 5+ messages in thread
From: Joerg Roedel @ 2021-06-17 14:53 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon
  Cc: David Woodhouse, iommu, linux-kernel, clang-built-linux,
	Joerg Roedel, Lu Baolu, kernel test robot

From: Joerg Roedel <jroedel@suse.de>

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 <baolu.lu@linux.intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 55ee5e67a59a ("iommu/vt-d: Add common code for dmar latency performance monitors")
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/intel/perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/intel/perf.c b/drivers/iommu/intel/perf.c
index 73b7ec705552..0e8e03252d92 100644
--- a/drivers/iommu/intel/perf.c
+++ b/drivers/iommu/intel/perf.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * perf.c - performance monitor
  *
  * Copyright (C) 2021 Intel Corporation
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu/vt-d: Fix W=1 clang warning in intel/perf.c
  2021-06-17 14:53 [PATCH] iommu/vt-d: Fix W=1 clang warning in intel/perf.c Joerg Roedel
@ 2021-06-17 17:16 ` Nick Desaulniers
  2021-06-17 20:30   ` Joerg Roedel
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2021-06-17 17:16 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Will Deacon, David Woodhouse, iommu, LKML, clang-built-linux,
	Joerg Roedel, Lu Baolu, kernel test robot

On Thu, Jun 17, 2021 at 7:54 AM Joerg Roedel <joro@8bytes.org> wrote:
>
> From: Joerg Roedel <jroedel@suse.de>
>
> 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)

>
> Cc: Lu Baolu <baolu.lu@linux.intel.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 55ee5e67a59a ("iommu/vt-d: Add common code for dmar latency performance monitors")
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>  drivers/iommu/intel/perf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/intel/perf.c b/drivers/iommu/intel/perf.c
> index 73b7ec705552..0e8e03252d92 100644
> --- a/drivers/iommu/intel/perf.c
> +++ b/drivers/iommu/intel/perf.c
> @@ -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 clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210617145339.2692-1-joro%408bytes.org.



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu/vt-d: Fix W=1 clang warning in intel/perf.c
  2021-06-17 17:16 ` Nick Desaulniers
@ 2021-06-17 20:30   ` Joerg Roedel
  2021-06-17 20:51     ` Nathan Chancellor
  0 siblings, 1 reply; 5+ messages in thread
From: Joerg Roedel @ 2021-06-17 20:30 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Joerg Roedel, Will Deacon, David Woodhouse, iommu, LKML,
	clang-built-linux, Lu Baolu, kernel test robot

On Thu, Jun 17, 2021 at 10:16:50AM -0700, Nick Desaulniers wrote:
> On Thu, Jun 17, 2021 at 7:54 AM Joerg Roedel <joro@8bytes.org> wrote:
> >
> > From: Joerg Roedel <jroedel@suse.de>
> >
> > 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu/vt-d: Fix W=1 clang warning in intel/perf.c
  2021-06-17 20:30   ` Joerg Roedel
@ 2021-06-17 20:51     ` Nathan Chancellor
  2021-06-18  7:57       ` Joerg Roedel
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2021-06-17 20:51 UTC (permalink / raw)
  To: Joerg Roedel, Nick Desaulniers
  Cc: Joerg Roedel, Will Deacon, David Woodhouse, iommu, LKML,
	clang-built-linux, Lu Baolu, kernel test robot

On 6/17/2021 1:30 PM, Joerg Roedel wrote:
> On Thu, Jun 17, 2021 at 10:16:50AM -0700, Nick Desaulniers wrote:
>> On Thu, Jun 17, 2021 at 7:54 AM Joerg Roedel <joro@8bytes.org> wrote:
>>>
>>> From: Joerg Roedel <jroedel@suse.de>
>>>
>>> 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
> 

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

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu/vt-d: Fix W=1 clang warning in intel/perf.c
  2021-06-17 20:51     ` Nathan Chancellor
@ 2021-06-18  7:57       ` Joerg Roedel
  0 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2021-06-18  7:57 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Nick Desaulniers, Joerg Roedel, Will Deacon, David Woodhouse,
	iommu, LKML, clang-built-linux, Lu Baolu, kernel test robot

On Thu, Jun 17, 2021 at 01:51:24PM -0700, Nathan Chancellor wrote:
> kernel-doc is run automatically with W=1, regardless of gcc versus clang.

I see, thanks. Will update the commit message.

Thanks,

	Joerg

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-18  7:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 14:53 [PATCH] iommu/vt-d: Fix W=1 clang warning in intel/perf.c Joerg Roedel
2021-06-17 17:16 ` Nick Desaulniers
2021-06-17 20:30   ` Joerg Roedel
2021-06-17 20:51     ` Nathan Chancellor
2021-06-18  7:57       ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).