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] [day] [month] [year] [list]
Message-ID: <20220228165406.GA1278407@p14s>
Date:   Mon, 28 Feb 2022 09:54:06 -0700
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Anshuman Khandual <anshuman.khandual@....com>
Cc:     linux-arm-kernel@...ts.infradead.org,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>, coresight@...ts.linaro.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] coresight: Drop unused 'none' enum value for each
 component

Good morning,

On Wed, Feb 16, 2022 at 03:21:58PM +0530, Anshuman Khandual wrote:
> CORESIGHT_DEV_TYPE_NONE/CORESIGHT_DEV_SUBTYPE_XXXX_NONE values are not used
> any where. Actual enumeration can start from 0. Just drop these unused enum
> values.
> 
> Cc: Mathieu Poirier <mathieu.poirier@...aro.org>
> Cc: Suzuki K Poulose <suzuki.poulose@....com>
> Cc: Mike Leach <mike.leach@...aro.org>
> Cc: Leo Yan <leo.yan@...aro.org>
> Cc: coresight@...ts.linaro.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
>  drivers/hwtracing/coresight/coresight-core.c | 3 ---
>  include/linux/coresight.h                    | 5 -----
>  2 files changed, 8 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> index 88653d1c06a4..af00dca8d1ac 100644
> --- a/drivers/hwtracing/coresight/coresight-core.c
> +++ b/drivers/hwtracing/coresight/coresight-core.c
> @@ -1278,9 +1278,6 @@ static struct attribute *coresight_source_attrs[] = {
>  ATTRIBUTE_GROUPS(coresight_source);
>  
>  static struct device_type coresight_dev_type[] = {
> -	{
> -		.name = "none",
> -	},
>  	{
>  		.name = "sink",
>  		.groups = coresight_sink_groups,
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index 93a2922b7653..9f445f09fcfe 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -36,7 +36,6 @@
>  extern struct bus_type coresight_bustype;
>  
>  enum coresight_dev_type {
> -	CORESIGHT_DEV_TYPE_NONE,
>  	CORESIGHT_DEV_TYPE_SINK,
>  	CORESIGHT_DEV_TYPE_LINK,
>  	CORESIGHT_DEV_TYPE_LINKSINK,
> @@ -46,7 +45,6 @@ enum coresight_dev_type {
>  };
>  
>  enum coresight_dev_subtype_sink {
> -	CORESIGHT_DEV_SUBTYPE_SINK_NONE,
>  	CORESIGHT_DEV_SUBTYPE_SINK_PORT,
>  	CORESIGHT_DEV_SUBTYPE_SINK_BUFFER,
>  	CORESIGHT_DEV_SUBTYPE_SINK_SYSMEM,
> @@ -54,21 +52,18 @@ enum coresight_dev_subtype_sink {
>  };
>  
>  enum coresight_dev_subtype_link {
> -	CORESIGHT_DEV_SUBTYPE_LINK_NONE,
>  	CORESIGHT_DEV_SUBTYPE_LINK_MERG,
>  	CORESIGHT_DEV_SUBTYPE_LINK_SPLIT,
>  	CORESIGHT_DEV_SUBTYPE_LINK_FIFO,
>  };
>  
>  enum coresight_dev_subtype_source {
> -	CORESIGHT_DEV_SUBTYPE_SOURCE_NONE,
>  	CORESIGHT_DEV_SUBTYPE_SOURCE_PROC,
>  	CORESIGHT_DEV_SUBTYPE_SOURCE_BUS,
>  	CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE,
>  };
>  
>  enum coresight_dev_subtype_helper {
> -	CORESIGHT_DEV_SUBTYPE_HELPER_NONE,
>  	CORESIGHT_DEV_SUBTYPE_HELPER_CATU,
>  };

These have never been used in the 7 years the subsystem has existed and I don't
see in what kind of situation they could be...

I have applied this patch.

Thanks,
Mathieu

>  
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ