lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 Apr 2020 12:08:18 -0600
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Douglas Anderson <dianders@...omium.org>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Mike Leach <mike.leach@...aro.org>
Subject: Re: [PATCH v2 1/2] coresight: Include required headers in C files

Hi Stephen,

On Tue, Apr 28, 2020 at 11:10:09AM -0700, Stephen Boyd wrote:
> We should include headers that C files use in the C files that use them
> and avoid relying on implicit includes as much as possible. This helps
> avoid compiler errors in the future about missing declarations when
> header files change includes in the future.
> 
> Cc: Douglas Anderson <dianders@...omium.org>
> Cc: Suzuki K Poulose <suzuki.poulose@....com>
> Cc: Mike Leach <mike.leach@...aro.org>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>
> ---
>  .../hwtracing/coresight/coresight-cti-platform.c    |  8 +++++++-
>  drivers/hwtracing/coresight/coresight-cti-sysfs.c   |  7 +++++++
>  drivers/hwtracing/coresight/coresight-cti.c         | 13 +++++++++++++
>  drivers/hwtracing/coresight/coresight-cti.h         |  8 +++++++-
>  4 files changed, 34 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-cti-platform.c b/drivers/hwtracing/coresight/coresight-cti-platform.c
> index c6c0c9b4827e..ab3bd4ed0910 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-platform.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-platform.c
> @@ -2,11 +2,17 @@
>  /*
>   * Copyright (c) 2019, The Linaro Limited. All rights reserved.
>   */
> +#include <linux/coresight.h>
> +#include <linux/device.h>
> +#include <linux/err.h>
> +#include <linux/of.h>
> +#include <linux/property.h>
> +#include <linux/slab.h>
>  
>  #include <dt-bindings/arm/coresight-cti-dt.h>
> -#include <linux/of.h>
>  
>  #include "coresight-cti.h"
> +#include "coresight-priv.h"
>  
>  /* Number of CTI signals in the v8 architecturally defined connection */
>  #define NR_V8PE_IN_SIGS		2
> diff --git a/drivers/hwtracing/coresight/coresight-cti-sysfs.c b/drivers/hwtracing/coresight/coresight-cti-sysfs.c
> index aeea39cbd161..77e14e770806 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-sysfs.c
> @@ -4,7 +4,14 @@
>   * Author: Mike Leach <mike.leach@...aro.org>
>   */
>  
> +#include <linux/atomic.h>
>  #include <linux/coresight.h>
> +#include <linux/device.h>
> +#include <linux/io.h>
> +#include <linux/kernel.h>
> +#include <linux/slab.h>
> +#include <linux/spinlock.h>
> +#include <linux/sysfs.h>

What is io.h and slab.h used for in coresight-cti-sysfs.c ?

>  
>  #include "coresight-cti.h"
>  
> diff --git a/drivers/hwtracing/coresight/coresight-cti.c b/drivers/hwtracing/coresight/coresight-cti.c
> index 7fc1fc8d7738..be61c1705916 100644
> --- a/drivers/hwtracing/coresight/coresight-cti.c
> +++ b/drivers/hwtracing/coresight/coresight-cti.c
> @@ -4,7 +4,20 @@
>   * Author: Mike Leach <mike.leach@...aro.org>
>   */
>  
> +#include <linux/amba/bus.h>
> +#include <linux/atomic.h>
> +#include <linux/bits.h>
> +#include <linux/coresight.h>
> +#include <linux/device.h>
> +#include <linux/io.h>

Same comment as above.

No need to send another version if these are mistakes - just let me know and
I'll do the adjustment.

Thanks,
Mathieu

> +#include <linux/kernel.h>
> +#include <linux/list.h>
> +#include <linux/mutex.h>
> +#include <linux/pm_runtime.h>
>  #include <linux/property.h>
> +#include <linux/spinlock.h>
> +
> +#include "coresight-priv.h"
>  #include "coresight-cti.h"
>  
>  /**
> diff --git a/drivers/hwtracing/coresight/coresight-cti.h b/drivers/hwtracing/coresight/coresight-cti.h
> index 004df3ab9dd0..acf7b545e6b9 100644
> --- a/drivers/hwtracing/coresight/coresight-cti.h
> +++ b/drivers/hwtracing/coresight/coresight-cti.h
> @@ -7,8 +7,14 @@
>  #ifndef _CORESIGHT_CORESIGHT_CTI_H
>  #define _CORESIGHT_CORESIGHT_CTI_H
>  
> -#include <asm/local.h>
> +#include <linux/coresight.h>
> +#include <linux/device.h>
> +#include <linux/fwnode.h>
> +#include <linux/list.h>
>  #include <linux/spinlock.h>
> +#include <linux/sysfs.h>
> +#include <linux/types.h>
> +
>  #include "coresight-priv.h"
>  
>  /*
> -- 
> Sent by a computer, using git, on the internet
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ