diff mbox

[1/4] rk3399_dmc: Fix line continuation format

Message ID 7d659960e45f66894126fba9e2d54cf25ae1185b.1510845910.git.joe@perches.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Joe Perches Nov. 16, 2017, 3:27 p.m. UTC
Line continuations with excess spacing causes unexpected output.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/devfreq/rk3399_dmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chanwoo Choi Nov. 22, 2017, 5:13 a.m. UTC | #1
On 2017년 11월 17일 00:27, Joe Perches wrote:
> Line continuations with excess spacing causes unexpected output.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/devfreq/rk3399_dmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
> index 5dfbfa3cc878..0938c97d46f0 100644
> --- a/drivers/devfreq/rk3399_dmc.c
> +++ b/drivers/devfreq/rk3399_dmc.c
> @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
>  
>  	/* If get the incorrect rate, set voltage to old value. */
>  	if (dmcfreq->rate != target_rate) {
> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
> +			target_rate, dmcfreq->rate);

IMO, I don't like over 80 char in the one line.

>  		regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
>  				      dmcfreq->volt);
>  		goto out;
>
Joe Perches Nov. 22, 2017, 10:41 a.m. UTC | #2
On Wed, 2017-11-22 at 14:13 +0900, Chanwoo Choi wrote:
> On 2017년 11월 17일 00:27, Joe Perches wrote:
> > Line continuations with excess spacing causes unexpected output.
> > 
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> >  drivers/devfreq/rk3399_dmc.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
> > index 5dfbfa3cc878..0938c97d46f0 100644
> > --- a/drivers/devfreq/rk3399_dmc.c
> > +++ b/drivers/devfreq/rk3399_dmc.c
> > @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
> >  
> >  	/* If get the incorrect rate, set voltage to old value. */
> >  	if (dmcfreq->rate != target_rate) {
> > -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
> > -			Current frequency %lu\n", target_rate, dmcfreq->rate);
> > +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
> > +			target_rate, dmcfreq->rate);
> 
> IMO, I don't like over 80 char in the one line.

Fix it as you chose, but the code I proposed
is what is preferred by CodingStyle.

The current code is unintentional.

Right now there are 3 tabs between "Request frequency"
and "Current frequency" in the output.

> >  		regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
> >  				      dmcfreq->volt);
> >  		goto out;
> > 
> 
>
MyungJoo Ham Nov. 23, 2017, 1:21 a.m. UTC | #3
> On Wed, 2017-11-22 at 14:13 +0900, Chanwoo Choi wrote:
> > On 2017년 11월 17일 00:27, Joe Perches wrote:

> > > Line continuations with excess spacing causes unexpected output.

> > > 

> > > Signed-off-by: Joe Perches <joe@perches.com>

> > > ---

> > >  drivers/devfreq/rk3399_dmc.c | 4 ++--

> > >  1 file changed, 2 insertions(+), 2 deletions(-)

> > > 

> > > diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c

> > > index 5dfbfa3cc878..0938c97d46f0 100644

> > > --- a/drivers/devfreq/rk3399_dmc.c

> > > +++ b/drivers/devfreq/rk3399_dmc.c

> > > @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,

> > >  

> > >  	/* If get the incorrect rate, set voltage to old value. */

> > >  	if (dmcfreq->rate != target_rate) {

> > > -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\

> > > -			Current frequency %lu\n", target_rate, dmcfreq->rate);

> > > +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",

> > > +			target_rate, dmcfreq->rate);

> > 

> > IMO, I don't like over 80 char in the one line.

> 

> Fix it as you chose, but the code I proposed

> is what is preferred by CodingStyle.

> 

> The current code is unintentional.

> 

> Right now there are 3 tabs between "Request frequency"

> and "Current frequency" in the output.


Chanwoo, this is not a simple coding style issue.
I'm seeing these unintentional tabs as well.

If you want to keep it 80 cols with strings (which is not mandatory for strings in double quotes),
We'd better do:

-		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
-			Current frequency %lu\n", target_rate, dmcfreq->rate);
+		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,"
+			" Current frequency %lu\n", target_rate, dmcfreq->rate);

Cheers,
MyungJoo

> 

> > >  		regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,

> > >  				      dmcfreq->volt);

> > >  		goto out;

> > > 

> > 

> > 

>
Chanwoo Choi Nov. 23, 2017, 1:45 a.m. UTC | #4
On 2017년 11월 23일 10:21, MyungJoo Ham wrote:
>> On Wed, 2017-11-22 at 14:13 +0900, Chanwoo Choi wrote:
>>> On 2017년 11월 17일 00:27, Joe Perches wrote:
>>>> Line continuations with excess spacing causes unexpected output.
>>>>
>>>> Signed-off-by: Joe Perches <joe@perches.com>
>>>> ---
>>>>  drivers/devfreq/rk3399_dmc.c | 4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
>>>> index 5dfbfa3cc878..0938c97d46f0 100644
>>>> --- a/drivers/devfreq/rk3399_dmc.c
>>>> +++ b/drivers/devfreq/rk3399_dmc.c
>>>> @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
>>>>  
>>>>  	/* If get the incorrect rate, set voltage to old value. */
>>>>  	if (dmcfreq->rate != target_rate) {
>>>> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
>>>> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
>>>> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
>>>> +			target_rate, dmcfreq->rate);
>>>
>>> IMO, I don't like over 80 char in the one line.
>>
>> Fix it as you chose, but the code I proposed
>> is what is preferred by CodingStyle.
>>
>> The current code is unintentional.
>>
>> Right now there are 3 tabs between "Request frequency"
>> and "Current frequency" in the output.
> 
> Chanwoo, this is not a simple coding style issue.
> I'm seeing these unintentional tabs as well.
> 
> If you want to keep it 80 cols with strings (which is not mandatory for strings in double quotes),
> We'd better do:
> 
> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,"
> +			" Current frequency %lu\n", target_rate, dmcfreq->rate);

I agree with Myungjoo's opinion.
I think the readability is important. So, I prefer to keep one line within 80 char.

> 
> Cheers,
> MyungJoo
> 
>>
>>>>  		regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
>>>>  				      dmcfreq->volt);
>>>>  		goto out;
>>>>
>>>
>>>
>>
> 
> 
>
Joe Perches Nov. 23, 2017, 2:07 a.m. UTC | #5
On Thu, 2017-11-23 at 10:45 +0900, Chanwoo Choi wrote:
> On 2017년 11월 23일 10:21, MyungJoo Ham wrote:
> > > On Wed, 2017-11-22 at 14:13 +0900, Chanwoo Choi wrote:
> > > > On 2017년 11월 17일 00:27, Joe Perches wrote:
> > > > > Line continuations with excess spacing causes unexpected output.
> > > > > 
> > > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > > > ---
> > > > >  drivers/devfreq/rk3399_dmc.c | 4 ++--
> > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
> > > > > index 5dfbfa3cc878..0938c97d46f0 100644
> > > > > --- a/drivers/devfreq/rk3399_dmc.c
> > > > > +++ b/drivers/devfreq/rk3399_dmc.c
> > > > > @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
> > > > >  
> > > > >  	/* If get the incorrect rate, set voltage to old value. */
> > > > >  	if (dmcfreq->rate != target_rate) {
> > > > > -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
> > > > > -			Current frequency %lu\n", target_rate, dmcfreq->rate);
> > > > > +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
> > > > > +			target_rate, dmcfreq->rate);
> > > > 
> > > > IMO, I don't like over 80 char in the one line.
> > > 
> > > Fix it as you chose, but the code I proposed
> > > is what is preferred by CodingStyle.
> > > 
> > > The current code is unintentional.
> > > 
> > > Right now there are 3 tabs between "Request frequency"
> > > and "Current frequency" in the output.
> > 
> > Chanwoo, this is not a simple coding style issue.
> > I'm seeing these unintentional tabs as well.
> > 
> > 
> > If you want to keep it 80 cols with strings (which is r mandatory for strings in double quotes),
> > We'd better do:
> > 
> > -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
> > -			Current frequency %lu\n", target_rate, dmcfreq->rate);
> > +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,"
> > +			" Current frequency %lu\n", target_rate, dmcfreq->rate);
> 
> I agree with Myungjoo's opinion.
> I think the readability is important. So, I prefer to keep one line within 80 char.

Read Documentation/process/coding-style.rst

What I proposed is by far the common style.
I think you should get used to it.
Chanwoo Choi Nov. 23, 2017, 2:12 a.m. UTC | #6
On 2017년 11월 23일 11:07, Joe Perches wrote:
> On Thu, 2017-11-23 at 10:45 +0900, Chanwoo Choi wrote:
>> On 2017년 11월 23일 10:21, MyungJoo Ham wrote:
>>>> On Wed, 2017-11-22 at 14:13 +0900, Chanwoo Choi wrote:
>>>>> On 2017년 11월 17일 00:27, Joe Perches wrote:
>>>>>> Line continuations with excess spacing causes unexpected output.
>>>>>>
>>>>>> Signed-off-by: Joe Perches <joe@perches.com>
>>>>>> ---
>>>>>>  drivers/devfreq/rk3399_dmc.c | 4 ++--
>>>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
>>>>>> index 5dfbfa3cc878..0938c97d46f0 100644
>>>>>> --- a/drivers/devfreq/rk3399_dmc.c
>>>>>> +++ b/drivers/devfreq/rk3399_dmc.c
>>>>>> @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
>>>>>>  
>>>>>>  	/* If get the incorrect rate, set voltage to old value. */
>>>>>>  	if (dmcfreq->rate != target_rate) {
>>>>>> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
>>>>>> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
>>>>>> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
>>>>>> +			target_rate, dmcfreq->rate);
>>>>>
>>>>> IMO, I don't like over 80 char in the one line.
>>>>
>>>> Fix it as you chose, but the code I proposed
>>>> is what is preferred by CodingStyle.
>>>>
>>>> The current code is unintentional.
>>>>
>>>> Right now there are 3 tabs between "Request frequency"
>>>> and "Current frequency" in the output.
>>>
>>> Chanwoo, this is not a simple coding style issue.
>>> I'm seeing these unintentional tabs as well.
>>>
>>>
>>> If you want to keep it 80 cols with strings (which is r mandatory for strings in double quotes),
>>> We'd better do:
>>>
>>> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
>>> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
>>> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,"
>>> +			" Current frequency %lu\n", target_rate, dmcfreq->rate);
>>
>> I agree with Myungjoo's opinion.
>> I think the readability is important. So, I prefer to keep one line within 80 char.
> 
> Read Documentation/process/coding-style.rst
> 
> What I proposed is by far the common style.
> I think you should get used to it.

Read line.81 in the Documentation/process/coding-style.rst
- "2) Breaking long lines and strings"

Or, we better to modify the error message within 80 char.
Joe Perches Nov. 23, 2017, 2:18 a.m. UTC | #7
On Thu, 2017-11-23 at 11:12 +0900, Chanwoo Choi wrote:
> On 2017년 11월 23일 11:07, Joe Perches wrote:
> > On Thu, 2017-11-23 at 10:45 +0900, Chanwoo Choi wrote:
> > > On 2017년 11월 23일 10:21, MyungJoo Ham wrote:
> > > > > On Wed, 2017-11-22 at 14:13 +0900, Chanwoo Choi wrote:
> > > > > > On 2017년 11월 17일 00:27, Joe Perches wrote:
> > > > > > > Line continuations with excess spacing causes unexpected output.
> > > > > > > 
> > > > > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > > > > > ---
> > > > > > >  drivers/devfreq/rk3399_dmc.c | 4 ++--
> > > > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > > > 
> > > > > > > diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
> > > > > > > index 5dfbfa3cc878..0938c97d46f0 100644
> > > > > > > --- a/drivers/devfreq/rk3399_dmc.c
> > > > > > > +++ b/drivers/devfreq/rk3399_dmc.c
> > > > > > > @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
> > > > > > >  
> > > > > > >  	/* If get the incorrect rate, set voltage to old value. */
> > > > > > >  	if (dmcfreq->rate != target_rate) {
> > > > > > > -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
> > > > > > > -			Current frequency %lu\n", target_rate, dmcfreq->rate);
> > > > > > > +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
> > > > > > > +			target_rate, dmcfreq->rate);
> > > > > > 
> > > > > > IMO, I don't like over 80 char in the one line.
> > > > > 
> > > > > Fix it as you chose, but the code I proposed
> > > > > is what is preferred by CodingStyle.
> > > > > 
> > > > > The current code is unintentional.
> > > > > 
> > > > > Right now there are 3 tabs between "Request frequency"
> > > > > and "Current frequency" in the output.
> > > > 
> > > > Chanwoo, this is not a simple coding style issue.
> > > > I'm seeing these unintentional tabs as well.
> > > > 
> > > > 
> > > > If you want to keep it 80 cols with strings (which is r mandatory for strings in double quotes),
> > > > We'd better do:
> > > > 
> > > > -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
> > > > -			Current frequency %lu\n", target_rate, dmcfreq->rate);
> > > > +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,"
> > > > +			" Current frequency %lu\n", target_rate, dmcfreq->rate);
> > > 
> > > I agree with Myungjoo's opinion.
> > > I think the readability is important. So, I prefer to keep one line within 80 char.
> > 
> > Read Documentation/process/coding-style.rst
> > 
> > What I proposed is by far the common style.
> > I think you should get used to it.
> 
> Read line.81 in the Documentation/process/coding-style.rst
> - "2) Breaking long lines and strings"
> 
> Or, we better to modify the error message within 80 char.

Exactly!

line 94:

never break user-visible strings such as
printk messages, because that breaks the ability to grep for them
Chanwoo Choi Nov. 23, 2017, 2:23 a.m. UTC | #8
On 2017년 11월 23일 11:18, Joe Perches wrote:
> On Thu, 2017-11-23 at 11:12 +0900, Chanwoo Choi wrote:
>> On 2017년 11월 23일 11:07, Joe Perches wrote:
>>> On Thu, 2017-11-23 at 10:45 +0900, Chanwoo Choi wrote:
>>>> On 2017년 11월 23일 10:21, MyungJoo Ham wrote:
>>>>>> On Wed, 2017-11-22 at 14:13 +0900, Chanwoo Choi wrote:
>>>>>>> On 2017년 11월 17일 00:27, Joe Perches wrote:
>>>>>>>> Line continuations with excess spacing causes unexpected output.
>>>>>>>>
>>>>>>>> Signed-off-by: Joe Perches <joe@perches.com>
>>>>>>>> ---
>>>>>>>>  drivers/devfreq/rk3399_dmc.c | 4 ++--
>>>>>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
>>>>>>>> index 5dfbfa3cc878..0938c97d46f0 100644
>>>>>>>> --- a/drivers/devfreq/rk3399_dmc.c
>>>>>>>> +++ b/drivers/devfreq/rk3399_dmc.c
>>>>>>>> @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
>>>>>>>>  
>>>>>>>>  	/* If get the incorrect rate, set voltage to old value. */
>>>>>>>>  	if (dmcfreq->rate != target_rate) {
>>>>>>>> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
>>>>>>>> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
>>>>>>>> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
>>>>>>>> +			target_rate, dmcfreq->rate);
>>>>>>>
>>>>>>> IMO, I don't like over 80 char in the one line.
>>>>>>
>>>>>> Fix it as you chose, but the code I proposed
>>>>>> is what is preferred by CodingStyle.
>>>>>>
>>>>>> The current code is unintentional.
>>>>>>
>>>>>> Right now there are 3 tabs between "Request frequency"
>>>>>> and "Current frequency" in the output.
>>>>>
>>>>> Chanwoo, this is not a simple coding style issue.
>>>>> I'm seeing these unintentional tabs as well.
>>>>>
>>>>>
>>>>> If you want to keep it 80 cols with strings (which is r mandatory for strings in double quotes),
>>>>> We'd better do:
>>>>>
>>>>> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
>>>>> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
>>>>> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,"
>>>>> +			" Current frequency %lu\n", target_rate, dmcfreq->rate);
>>>>
>>>> I agree with Myungjoo's opinion.
>>>> I think the readability is important. So, I prefer to keep one line within 80 char.
>>>
>>> Read Documentation/process/coding-style.rst
>>>
>>> What I proposed is by far the common style.
>>> I think you should get used to it.
>>
>> Read line.81 in the Documentation/process/coding-style.rst
>> - "2) Breaking long lines and strings"
>>
>> Or, we better to modify the error message within 80 char.
> 
> Exactly!
> 
> line 94:
> 
> never break user-visible strings such as
> printk messages, because that breaks the ability to grep for them

So, I suggested "Or, we better to modify the error message within 80 char.".
Joe Perches Nov. 23, 2017, 2:29 a.m. UTC | #9
On Thu, 2017-11-23 at 11:23 +0900, Chanwoo Choi wrote:
> On 2017년 11월 23일 11:18, Joe Perches wrote:
> > never break user-visible strings such as
> > printk messages, because that breaks the ability to grep for them
> 
> So, I suggested "Or, we better to modify the error message within 80 char.".

Run checkpatch on your suggestion.
You will get a "split_string" warning.

cheers, Joe
Chanwoo Choi Nov. 23, 2017, 2:35 a.m. UTC | #10
On 2017년 11월 23일 11:29, Joe Perches wrote:
> On Thu, 2017-11-23 at 11:23 +0900, Chanwoo Choi wrote:
>> On 2017년 11월 23일 11:18, Joe Perches wrote:
>>> never break user-visible strings such as
>>> printk messages, because that breaks the ability to grep for them
>>
>> So, I suggested "Or, we better to modify the error message within 80 char.".
> 
> Run checkpatch on your suggestion.
> You will get a "split_string" warning.

I knew about this. I don't like to hurt the readability
in order to fix the warning with the improper way.

If you want to fix it, I suggested that you better to modify
the error message within 80 char. Or I prefer the Myungjoo's opinion.
Joe Perches Nov. 23, 2017, 2:38 a.m. UTC | #11
On Thu, 2017-11-23 at 11:35 +0900, Chanwoo Choi wrote:
> On 2017년 11월 23일 11:29, Joe Perches wrote:
> > On Thu, 2017-11-23 at 11:23 +0900, Chanwoo Choi wrote:
> > > On 2017년 11월 23일 11:18, Joe Perches wrote:
> > > > never break user-visible strings such as
> > > > printk messages, because that breaks the ability to grep for them
> > > 
> > > So, I suggested "Or, we better to modify the error message within 80 char.".
> > 
> > Run checkpatch on your suggestion.
> > You will get a "split_string" warning.
> 
> I knew about this. I don't like to hurt the readability
> in order to fix the warning with the improper way.
> 
> If you want to fix it, I suggested that you better to modify
> the error message within 80 char. Or I prefer the Myungjoo's opinion.

Again, I don't really care how it's fixed,
but the 3 tabs in the middle of the message
are stupid.

Please fix it.
diff mbox

Patch

diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
index 5dfbfa3cc878..0938c97d46f0 100644
--- a/drivers/devfreq/rk3399_dmc.c
+++ b/drivers/devfreq/rk3399_dmc.c
@@ -146,8 +146,8 @@  static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
 
 	/* If get the incorrect rate, set voltage to old value. */
 	if (dmcfreq->rate != target_rate) {
-		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
-			Current frequency %lu\n", target_rate, dmcfreq->rate);
+		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
+			target_rate, dmcfreq->rate);
 		regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
 				      dmcfreq->volt);
 		goto out;