amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Arvind Yadav (9):
[PATCH 1/9] coresight: constify amba_id
[PATCH 2/9] coresight: etb10: constify amba_id
[PATCH 3/9] coresight: etm3x: constify amba_id
[PATCH 4/9] coresight: etm4x: constify amba_id
[PATCH 5/9] coresight: funnel: constify amba_id
[PATCH 6/9] coresight: replicator: constify amba_id
[PATCH 7/9] coresight: stm: constify amba_id
[PATCH 8/9] coresight: tmc: constify amba_id
[PATCH 9/9] coresight: tpiu: constify amba_id
drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +-
drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
drivers/hwtracing/coresight/coresight-etm3x.c | 2 +-
drivers/hwtracing/coresight/coresight-etm4x.c | 2 +-
drivers/hwtracing/coresight/coresight-funnel.c | 2 +-
drivers/hwtracing/coresight/coresight-replicator-qcom.c | 2 +-
drivers/hwtracing/coresight/coresight-stm.c | 2 +-
drivers/hwtracing/coresight/coresight-tmc.c | 2 +-
drivers/hwtracing/coresight/coresight-tpiu.c | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c
index 64a77e0..6ea62c6 100644
--- a/drivers/hwtracing/coresight/coresight-cpu-debug.c
+++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c
@@ -667,7 +667,7 @@ static int debug_remove(struct amba_device *adev)
return 0;
}
-static struct amba_id debug_ids[] = {
+static const struct amba_id debug_ids[] = {
{ /* Debug for Cortex-A53 */
.id = 0x000bbd03,
.mask = 0x000fffff,
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index d5b9642..33c5f58 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -728,7 +728,7 @@ static const struct dev_pm_ops etb_dev_pm_ops = {
SET_RUNTIME_PM_OPS(etb_runtime_suspend, etb_runtime_resume, NULL)
};
-static struct amba_id etb_ids[] = {
+static const struct amba_id etb_ids[] = {
{
.id = 0x0003b907,
.mask = 0x0003ffff,
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-etm4x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index 532adc9..c466a2e 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -1048,7 +1048,7 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
return ret;
}
-static struct amba_id etm4_ids[] = {
+static const struct amba_id etm4_ids[] = {
{ /* ETM 4.0 - Cortex-A53 */
.id = 0x000bb95d,
.mask = 0x000fffff,
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-tpiu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-tpiu.c b/drivers/hwtracing/coresight/coresight-tpiu.c
index 0673baf..330769b 100644
--- a/drivers/hwtracing/coresight/coresight-tpiu.c
+++ b/drivers/hwtracing/coresight/coresight-tpiu.c
@@ -192,7 +192,7 @@ static const struct dev_pm_ops tpiu_dev_pm_ops = {
SET_RUNTIME_PM_OPS(tpiu_runtime_suspend, tpiu_runtime_resume, NULL)
};
-static struct amba_id tpiu_ids[] = {
+static const struct amba_id tpiu_ids[] = {
{
.id = 0x0003b912,
.mask = 0x0003ffff,
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-tmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c
index 8644887..142001c 100644
--- a/drivers/hwtracing/coresight/coresight-tmc.c
+++ b/drivers/hwtracing/coresight/coresight-tmc.c
@@ -391,7 +391,7 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
return ret;
}
-static struct amba_id tmc_ids[] = {
+static const struct amba_id tmc_ids[] = {
{
.id = 0x0003b961,
.mask = 0x0003ffff,
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-replicator-qcom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-replicator-qcom.c b/drivers/hwtracing/coresight/coresight-replicator-qcom.c
index 0a3d15f..e1ab121 100644
--- a/drivers/hwtracing/coresight/coresight-replicator-qcom.c
+++ b/drivers/hwtracing/coresight/coresight-replicator-qcom.c
@@ -175,7 +175,7 @@ static const struct dev_pm_ops replicator_dev_pm_ops = {
NULL)
};
-static struct amba_id replicator_ids[] = {
+static const struct amba_id replicator_ids[] = {
{
.id = 0x0003b909,
.mask = 0x0003ffff,
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-stm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
index 93fc26f..903fe2a 100644
--- a/drivers/hwtracing/coresight/coresight-stm.c
+++ b/drivers/hwtracing/coresight/coresight-stm.c
@@ -914,7 +914,7 @@ static const struct dev_pm_ops stm_dev_pm_ops = {
SET_RUNTIME_PM_OPS(stm_runtime_suspend, stm_runtime_resume, NULL)
};
-static struct amba_id stm_ids[] = {
+static const struct amba_id stm_ids[] = {
{
.id = 0x0003b962,
.mask = 0x0003ffff,
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-funnel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c
index 860fe6e..73cd42f 100644
--- a/drivers/hwtracing/coresight/coresight-funnel.c
+++ b/drivers/hwtracing/coresight/coresight-funnel.c
@@ -246,7 +246,7 @@ static const struct dev_pm_ops funnel_dev_pm_ops = {
SET_RUNTIME_PM_OPS(funnel_runtime_suspend, funnel_runtime_resume, NULL)
};
-static struct amba_id funnel_ids[] = {
+static const struct amba_id funnel_ids[] = {
{
.id = 0x0003b908,
.mask = 0x0003ffff,
--
2.7.4
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/hwtracing/coresight/coresight-etm3x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c
index 93ee8fc..29b4e47 100644
--- a/drivers/hwtracing/coresight/coresight-etm3x.c
+++ b/drivers/hwtracing/coresight/coresight-etm3x.c
@@ -885,7 +885,7 @@ static const struct dev_pm_ops etm_dev_pm_ops = {
SET_RUNTIME_PM_OPS(etm_runtime_suspend, etm_runtime_resume, NULL)
};
-static struct amba_id etm_ids[] = {
+static const struct amba_id etm_ids[] = {
{ /* ETM 3.3 */
.id = 0x0003b921,
.mask = 0x0003ffff,
--
2.7.4
On 24 August 2017 at 10:35, Arvind Yadav <[email protected]> wrote:
> amba_id are not supposed to change at runtime. All functions
> working with const amba_id. So mark the non-const structs as const.
The real explanation here is that coresight IDs are only referenced in
the amba driver declaration where the "id_table" field of struct
amba_driver is a const. Given the widespread usage of the pattern I
would have expected this set to be part of a wide effort. Also did
you find this manually or by using a tool? If so please provide a
description of what that tool is.
Thanks,
Mathieu
>
> Arvind Yadav (9):
> [PATCH 1/9] coresight: constify amba_id
> [PATCH 2/9] coresight: etb10: constify amba_id
> [PATCH 3/9] coresight: etm3x: constify amba_id
> [PATCH 4/9] coresight: etm4x: constify amba_id
> [PATCH 5/9] coresight: funnel: constify amba_id
> [PATCH 6/9] coresight: replicator: constify amba_id
> [PATCH 7/9] coresight: stm: constify amba_id
> [PATCH 8/9] coresight: tmc: constify amba_id
> [PATCH 9/9] coresight: tpiu: constify amba_id
>
> drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +-
> drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
> drivers/hwtracing/coresight/coresight-etm3x.c | 2 +-
> drivers/hwtracing/coresight/coresight-etm4x.c | 2 +-
> drivers/hwtracing/coresight/coresight-funnel.c | 2 +-
> drivers/hwtracing/coresight/coresight-replicator-qcom.c | 2 +-
> drivers/hwtracing/coresight/coresight-stm.c | 2 +-
> drivers/hwtracing/coresight/coresight-tmc.c | 2 +-
> drivers/hwtracing/coresight/coresight-tpiu.c | 2 +-
> 9 files changed, 9 insertions(+), 9 deletions(-)
>
> --
> 2.7.4
>
Hi,
On Friday 25 August 2017 09:50 PM, Mathieu Poirier wrote:
> On 24 August 2017 at 10:35, Arvind Yadav <[email protected]> wrote:
>> amba_id are not supposed to change at runtime. All functions
>> working with const amba_id. So mark the non-const structs as const.
> The real explanation here is that coresight IDs are only referenced in
> the amba driver declaration where the "id_table" field of struct
> amba_driver is a const. Given the widespread usage of the pattern I
> would have expected this set to be part of a wide effort. Also did
> you find this manually or by using a tool? If so please provide a
> description of what that tool is.
I am not using any tools. I have push same change for other subsystem.
So I thought to change coresight ids.
>
> Thanks,
> Mathieu
>
>> Arvind Yadav (9):
>> [PATCH 1/9] coresight: constify amba_id
>> [PATCH 2/9] coresight: etb10: constify amba_id
>> [PATCH 3/9] coresight: etm3x: constify amba_id
>> [PATCH 4/9] coresight: etm4x: constify amba_id
>> [PATCH 5/9] coresight: funnel: constify amba_id
>> [PATCH 6/9] coresight: replicator: constify amba_id
>> [PATCH 7/9] coresight: stm: constify amba_id
>> [PATCH 8/9] coresight: tmc: constify amba_id
>> [PATCH 9/9] coresight: tpiu: constify amba_id
>>
>> drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +-
>> drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
>> drivers/hwtracing/coresight/coresight-etm3x.c | 2 +-
>> drivers/hwtracing/coresight/coresight-etm4x.c | 2 +-
>> drivers/hwtracing/coresight/coresight-funnel.c | 2 +-
>> drivers/hwtracing/coresight/coresight-replicator-qcom.c | 2 +-
>> drivers/hwtracing/coresight/coresight-stm.c | 2 +-
>> drivers/hwtracing/coresight/coresight-tmc.c | 2 +-
>> drivers/hwtracing/coresight/coresight-tpiu.c | 2 +-
>> 9 files changed, 9 insertions(+), 9 deletions(-)
>>
>> --
>> 2.7.4
>>
~arvind
On 24 August 2017 at 10:35, Arvind Yadav <[email protected]> wrote:
> amba_id are not supposed to change at runtime. All functions
> working with const amba_id. So mark the non-const structs as const.
>
> Arvind Yadav (9):
> [PATCH 1/9] coresight: constify amba_id
> [PATCH 2/9] coresight: etb10: constify amba_id
> [PATCH 3/9] coresight: etm3x: constify amba_id
> [PATCH 4/9] coresight: etm4x: constify amba_id
> [PATCH 5/9] coresight: funnel: constify amba_id
> [PATCH 6/9] coresight: replicator: constify amba_id
> [PATCH 7/9] coresight: stm: constify amba_id
> [PATCH 8/9] coresight: tmc: constify amba_id
> [PATCH 9/9] coresight: tpiu: constify amba_id
>
> drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +-
> drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
> drivers/hwtracing/coresight/coresight-etm3x.c | 2 +-
> drivers/hwtracing/coresight/coresight-etm4x.c | 2 +-
> drivers/hwtracing/coresight/coresight-funnel.c | 2 +-
> drivers/hwtracing/coresight/coresight-replicator-qcom.c | 2 +-
> drivers/hwtracing/coresight/coresight-stm.c | 2 +-
> drivers/hwtracing/coresight/coresight-tmc.c | 2 +-
> drivers/hwtracing/coresight/coresight-tpiu.c | 2 +-
> 9 files changed, 9 insertions(+), 9 deletions(-)
>
Applied.
Thanks,
Mathieu
> --
> 2.7.4
>