[PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread

Shivnandan Kumar posted 1 patch 1 year, 6 months ago
There is a newer version of this series
MAINTAINERS                        |  1 +
drivers/soc/qcom/icc-bwmon.c       |  7 +++--
drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 2 deletions(-)
create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
[PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
Posted by Shivnandan Kumar 1 year, 6 months ago
Add tracepoint for tracing the measured traffic in kbps,
up_kbps and down_kbps in bwmon. This information is valuable
for understanding what bwmon hw measures at the system cache
level and at the DDR level which is helpful in debugging
bwmon behavior.

Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
---
 MAINTAINERS                        |  1 +
 drivers/soc/qcom/icc-bwmon.c       |  7 +++--
 drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 242fc612fbc5..1b410c0183bb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18573,6 +18573,7 @@ M:	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
 L:	linux-arm-msm@vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
+F:	drivers/soc/qcom/trace_icc-bwmon.h
 F:	drivers/soc/qcom/icc-bwmon.c

 QUALCOMM IOMMU
diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
index fb323b3364db..9b5ac1e62673 100644
--- a/drivers/soc/qcom/icc-bwmon.c
+++ b/drivers/soc/qcom/icc-bwmon.c
@@ -17,6 +17,8 @@
 #include <linux/pm_opp.h>
 #include <linux/regmap.h>
 #include <linux/sizes.h>
+#define CREATE_TRACE_POINTS
+#include "trace_icc-bwmon.h"

 /*
  * The BWMON samples data throughput within 'sample_ms' time. With three
@@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
 	struct icc_bwmon *bwmon = dev_id;
 	unsigned int irq_enable = 0;
 	struct dev_pm_opp *opp, *target_opp;
-	unsigned int bw_kbps, up_kbps, down_kbps;
+	unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;

-	bw_kbps = bwmon->target_kbps;
+	meas_kbps = bw_kbps = bwmon->target_kbps;

 	target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
 	if (IS_ERR(target_opp) && PTR_ERR(target_opp) == -ERANGE)
@@ -679,6 +681,7 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
 	bwmon_clear_irq(bwmon);
 	bwmon_enable(bwmon, irq_enable);

+	trace_qcom_bwmon_update(dev_name(bwmon->dev), meas_kbps, up_kbps, down_kbps);
 	if (bwmon->target_kbps == bwmon->current_kbps)
 		goto out;

diff --git a/drivers/soc/qcom/trace_icc-bwmon.h b/drivers/soc/qcom/trace_icc-bwmon.h
new file mode 100644
index 000000000000..5bdba0b77b72
--- /dev/null
+++ b/drivers/soc/qcom/trace_icc-bwmon.h
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM icc_bwmon
+
+#if !defined(_TRACE_ICC_BWMON_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_ICC_BWMON_H
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(qcom_bwmon_update,
+
+	TP_PROTO(const char *name,
+		 unsigned int meas_kbps, unsigned int up_kbps, unsigned int down_kbps),
+
+	TP_ARGS(name, meas_kbps, up_kbps, down_kbps),
+
+	TP_STRUCT__entry(
+		__string(name, name)
+		__field(unsigned int, meas_kbps)
+		__field(unsigned int, up_kbps)
+		__field(unsigned int, down_kbps)
+	),
+
+	TP_fast_assign(
+		__assign_str(name);
+		__entry->meas_kbps = meas_kbps;
+		__entry->up_kbps = up_kbps;
+		__entry->down_kbps = down_kbps;
+	),
+
+	TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
+		__get_str(name),
+		__entry->meas_kbps,
+		__entry->up_kbps,
+		__entry->down_kbps)
+);
+
+#endif /* _TRACE_ICC_BWMON_H */
+
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH ../../drivers/soc/qcom/
+
+#undef TRACE_INCLUDE_FILE
+#define TRACE_INCLUDE_FILE trace_icc-bwmon
+
+#include <trace/define_trace.h>
--
2.25.1
Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
Posted by Konrad Dybcio 1 year, 6 months ago

On 6/19/24 15:51, Shivnandan Kumar wrote:
> Add tracepoint for tracing the measured traffic in kbps,
> up_kbps and down_kbps in bwmon. This information is valuable
> for understanding what bwmon hw measures at the system cache
> level and at the DDR level which is helpful in debugging
> bwmon behavior.
> 
> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
> ---
>   MAINTAINERS                        |  1 +
>   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>   3 files changed, 55 insertions(+), 2 deletions(-)
>   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 242fc612fbc5..1b410c0183bb 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -18573,6 +18573,7 @@ M:	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>   L:	linux-arm-msm@vger.kernel.org
>   S:	Maintained
>   F:	Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
> +F:	drivers/soc/qcom/trace_icc-bwmon.h
>   F:	drivers/soc/qcom/icc-bwmon.c
> 
>   QUALCOMM IOMMU
> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
> index fb323b3364db..9b5ac1e62673 100644
> --- a/drivers/soc/qcom/icc-bwmon.c
> +++ b/drivers/soc/qcom/icc-bwmon.c
> @@ -17,6 +17,8 @@
>   #include <linux/pm_opp.h>
>   #include <linux/regmap.h>
>   #include <linux/sizes.h>
> +#define CREATE_TRACE_POINTS
> +#include "trace_icc-bwmon.h"
> 
>   /*
>    * The BWMON samples data throughput within 'sample_ms' time. With three
> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
>   	struct icc_bwmon *bwmon = dev_id;
>   	unsigned int irq_enable = 0;
>   	struct dev_pm_opp *opp, *target_opp;
> -	unsigned int bw_kbps, up_kbps, down_kbps;
> +	unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
> 
> -	bw_kbps = bwmon->target_kbps;
> +	meas_kbps = bw_kbps = bwmon->target_kbps;
> 
>   	target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);

This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
(uninitialized variable) value

Konrad
Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
Posted by Shivnandan Kumar 1 year, 5 months ago

On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
> 
> 
> On 6/19/24 15:51, Shivnandan Kumar wrote:
>> Add tracepoint for tracing the measured traffic in kbps,
>> up_kbps and down_kbps in bwmon. This information is valuable
>> for understanding what bwmon hw measures at the system cache
>> level and at the DDR level which is helpful in debugging
>> bwmon behavior.
>>
>> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
>> ---
>>   MAINTAINERS                        |  1 +
>>   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>>   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>>   3 files changed, 55 insertions(+), 2 deletions(-)
>>   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 242fc612fbc5..1b410c0183bb 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski 
>> <krzysztof.kozlowski@linaro.org>
>>   L:    linux-arm-msm@vger.kernel.org
>>   S:    Maintained
>>   F:    
>> Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
>> +F:    drivers/soc/qcom/trace_icc-bwmon.h
>>   F:    drivers/soc/qcom/icc-bwmon.c
>>
>>   QUALCOMM IOMMU
>> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
>> index fb323b3364db..9b5ac1e62673 100644
>> --- a/drivers/soc/qcom/icc-bwmon.c
>> +++ b/drivers/soc/qcom/icc-bwmon.c
>> @@ -17,6 +17,8 @@
>>   #include <linux/pm_opp.h>
>>   #include <linux/regmap.h>
>>   #include <linux/sizes.h>
>> +#define CREATE_TRACE_POINTS
>> +#include "trace_icc-bwmon.h"
>>
>>   /*
>>    * The BWMON samples data throughput within 'sample_ms' time. With 
>> three
>> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void 
>> *dev_id)
>>       struct icc_bwmon *bwmon = dev_id;
>>       unsigned int irq_enable = 0;
>>       struct dev_pm_opp *opp, *target_opp;
>> -    unsigned int bw_kbps, up_kbps, down_kbps;
>> +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
>>
>> -    bw_kbps = bwmon->target_kbps;
>> +    meas_kbps = bw_kbps = bwmon->target_kbps;
>>
>>       target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
> 
> This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
> (uninitialized variable) value
> 

Thank you for reviewing the patch.
I didn't get it, still the variable "bw_kbps" is being initialized along 
with "meas_kbps". Which variable are you referring to as being fed to 
dev_pm_opp_find_bw_ceil  with an uninitialized value?

Thanks
Shivnandan

> Konrad
Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
Posted by Konrad Dybcio 1 year, 5 months ago

On 6/20/24 10:55, Shivnandan Kumar wrote:
> 
> 
> On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
>>
>>
>> On 6/19/24 15:51, Shivnandan Kumar wrote:
>>> Add tracepoint for tracing the measured traffic in kbps,
>>> up_kbps and down_kbps in bwmon. This information is valuable
>>> for understanding what bwmon hw measures at the system cache
>>> level and at the DDR level which is helpful in debugging
>>> bwmon behavior.
>>>
>>> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
>>> ---
>>>   MAINTAINERS                        |  1 +
>>>   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>>>   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>>>   3 files changed, 55 insertions(+), 2 deletions(-)
>>>   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
>>>
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index 242fc612fbc5..1b410c0183bb 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>   L:    linux-arm-msm@vger.kernel.org
>>>   S:    Maintained
>>>   F: Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
>>> +F:    drivers/soc/qcom/trace_icc-bwmon.h
>>>   F:    drivers/soc/qcom/icc-bwmon.c
>>>
>>>   QUALCOMM IOMMU
>>> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
>>> index fb323b3364db..9b5ac1e62673 100644
>>> --- a/drivers/soc/qcom/icc-bwmon.c
>>> +++ b/drivers/soc/qcom/icc-bwmon.c
>>> @@ -17,6 +17,8 @@
>>>   #include <linux/pm_opp.h>
>>>   #include <linux/regmap.h>
>>>   #include <linux/sizes.h>
>>> +#define CREATE_TRACE_POINTS
>>> +#include "trace_icc-bwmon.h"
>>>
>>>   /*
>>>    * The BWMON samples data throughput within 'sample_ms' time. With three
>>> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
>>>       struct icc_bwmon *bwmon = dev_id;
>>>       unsigned int irq_enable = 0;
>>>       struct dev_pm_opp *opp, *target_opp;
>>> -    unsigned int bw_kbps, up_kbps, down_kbps;
>>> +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
>>>
>>> -    bw_kbps = bwmon->target_kbps;
>>> +    meas_kbps = bw_kbps = bwmon->target_kbps;
>>>
>>>       target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
>>
>> This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
>> (uninitialized variable) value
>>
> 
> Thank you for reviewing the patch.
> I didn't get it, still the variable "bw_kbps" is being initialized along with "meas_kbps". Which variable are you referring to as being fed to dev_pm_opp_find_bw_ceil  with an uninitialized value?

Oh this one's on me, I skipped over the middle assignment.. Sorry!

Konrad
Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
Posted by Dmitry Baryshkov 1 year, 5 months ago
On Thu, Jun 20, 2024 at 12:48:04PM GMT, Konrad Dybcio wrote:
> 
> 
> On 6/20/24 10:55, Shivnandan Kumar wrote:
> > 
> > 
> > On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
> > > 
> > > 
> > > On 6/19/24 15:51, Shivnandan Kumar wrote:
> > > > Add tracepoint for tracing the measured traffic in kbps,
> > > > up_kbps and down_kbps in bwmon. This information is valuable
> > > > for understanding what bwmon hw measures at the system cache
> > > > level and at the DDR level which is helpful in debugging
> > > > bwmon behavior.
> > > > 
> > > > Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
> > > > ---
> > > >   MAINTAINERS                        |  1 +
> > > >   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
> > > >   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
> > > >   3 files changed, 55 insertions(+), 2 deletions(-)
> > > >   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
> > > > 
> > > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > > index 242fc612fbc5..1b410c0183bb 100644
> > > > --- a/MAINTAINERS
> > > > +++ b/MAINTAINERS
> > > > @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > >   L:    linux-arm-msm@vger.kernel.org
> > > >   S:    Maintained
> > > >   F: Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
> > > > +F:    drivers/soc/qcom/trace_icc-bwmon.h
> > > >   F:    drivers/soc/qcom/icc-bwmon.c
> > > > 
> > > >   QUALCOMM IOMMU
> > > > diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
> > > > index fb323b3364db..9b5ac1e62673 100644
> > > > --- a/drivers/soc/qcom/icc-bwmon.c
> > > > +++ b/drivers/soc/qcom/icc-bwmon.c
> > > > @@ -17,6 +17,8 @@
> > > >   #include <linux/pm_opp.h>
> > > >   #include <linux/regmap.h>
> > > >   #include <linux/sizes.h>
> > > > +#define CREATE_TRACE_POINTS
> > > > +#include "trace_icc-bwmon.h"
> > > > 
> > > >   /*
> > > >    * The BWMON samples data throughput within 'sample_ms' time. With three
> > > > @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
> > > >       struct icc_bwmon *bwmon = dev_id;
> > > >       unsigned int irq_enable = 0;
> > > >       struct dev_pm_opp *opp, *target_opp;
> > > > -    unsigned int bw_kbps, up_kbps, down_kbps;
> > > > +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
> > > > 
> > > > -    bw_kbps = bwmon->target_kbps;
> > > > +    meas_kbps = bw_kbps = bwmon->target_kbps;
> > > > 
> > > >       target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
> > > 
> > > This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
> > > (uninitialized variable) value
> > > 
> > 
> > Thank you for reviewing the patch.
> > I didn't get it, still the variable "bw_kbps" is being initialized along with "meas_kbps". Which variable are you referring to as being fed to dev_pm_opp_find_bw_ceil  with an uninitialized value?
> 
> Oh this one's on me, I skipped over the middle assignment.. Sorry!

Still:

CHECK: multiple assignments should be avoided
#57: FILE: drivers/soc/qcom/icc-bwmon.c:652:
+	meas_kbps = bw_kbps = bwmon->target_kbps;

While we are at it:

CHECK: Alignment should match open parenthesis
#88: FILE: drivers/soc/qcom/trace_icc-bwmon.h:14:
+TRACE_EVENT(qcom_bwmon_update,
+

CHECK: Alignment should match open parenthesis
#109: FILE: drivers/soc/qcom/trace_icc-bwmon.h:35:
+	TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
+		__get_str(name),


-- 
With best wishes
Dmitry
Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
Posted by Shivnandan Kumar 1 year, 5 months ago

On 6/21/2024 2:06 AM, Dmitry Baryshkov wrote:
> On Thu, Jun 20, 2024 at 12:48:04PM GMT, Konrad Dybcio wrote:
>>
>>
>> On 6/20/24 10:55, Shivnandan Kumar wrote:
>>>
>>>
>>> On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
>>>>
>>>>
>>>> On 6/19/24 15:51, Shivnandan Kumar wrote:
>>>>> Add tracepoint for tracing the measured traffic in kbps,
>>>>> up_kbps and down_kbps in bwmon. This information is valuable
>>>>> for understanding what bwmon hw measures at the system cache
>>>>> level and at the DDR level which is helpful in debugging
>>>>> bwmon behavior.
>>>>>
>>>>> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
>>>>> ---
>>>>>    MAINTAINERS                        |  1 +
>>>>>    drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>>>>>    drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>>>>>    3 files changed, 55 insertions(+), 2 deletions(-)
>>>>>    create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
>>>>>
>>>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>>>> index 242fc612fbc5..1b410c0183bb 100644
>>>>> --- a/MAINTAINERS
>>>>> +++ b/MAINTAINERS
>>>>> @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>>>    L:    linux-arm-msm@vger.kernel.org
>>>>>    S:    Maintained
>>>>>    F: Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
>>>>> +F:    drivers/soc/qcom/trace_icc-bwmon.h
>>>>>    F:    drivers/soc/qcom/icc-bwmon.c
>>>>>
>>>>>    QUALCOMM IOMMU
>>>>> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
>>>>> index fb323b3364db..9b5ac1e62673 100644
>>>>> --- a/drivers/soc/qcom/icc-bwmon.c
>>>>> +++ b/drivers/soc/qcom/icc-bwmon.c
>>>>> @@ -17,6 +17,8 @@
>>>>>    #include <linux/pm_opp.h>
>>>>>    #include <linux/regmap.h>
>>>>>    #include <linux/sizes.h>
>>>>> +#define CREATE_TRACE_POINTS
>>>>> +#include "trace_icc-bwmon.h"
>>>>>
>>>>>    /*
>>>>>     * The BWMON samples data throughput within 'sample_ms' time. With three
>>>>> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
>>>>>        struct icc_bwmon *bwmon = dev_id;
>>>>>        unsigned int irq_enable = 0;
>>>>>        struct dev_pm_opp *opp, *target_opp;
>>>>> -    unsigned int bw_kbps, up_kbps, down_kbps;
>>>>> +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
>>>>>
>>>>> -    bw_kbps = bwmon->target_kbps;
>>>>> +    meas_kbps = bw_kbps = bwmon->target_kbps;
>>>>>
>>>>>        target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
>>>>
>>>> This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
>>>> (uninitialized variable) value
>>>>
>>>
>>> Thank you for reviewing the patch.
>>> I didn't get it, still the variable "bw_kbps" is being initialized along with "meas_kbps". Which variable are you referring to as being fed to dev_pm_opp_find_bw_ceil  with an uninitialized value?
>>
>> Oh this one's on me, I skipped over the middle assignment.. Sorry!
> 
> Still:
> 
> CHECK: multiple assignments should be avoided

ack

> #57: FILE: drivers/soc/qcom/icc-bwmon.c:652:
> +	meas_kbps = bw_kbps = bwmon->target_kbps;
> 
> While we are at it:
> 
> CHECK: Alignment should match open parenthesis
> #88: FILE: drivers/soc/qcom/trace_icc-bwmon.h:14:
> +TRACE_EVENT(qcom_bwmon_update,
> +

ack

> 
> CHECK: Alignment should match open parenthesis
> #109: FILE: drivers/soc/qcom/trace_icc-bwmon.h:35:
> +	TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
> +		__get_str(name),
> 
> 

Thanks,
Shivnandan