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 <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Anshuman Khandual <[email protected]>
---
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,
};
--
2.20.1
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 <[email protected]>
> Cc: Suzuki K Poulose <[email protected]>
> Cc: Mike Leach <[email protected]>
> Cc: Leo Yan <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Anshuman Khandual <[email protected]>
> ---
> 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
>