diff mbox

[4/5] hw/timer/exynos4210_mct: Fix checkpatch style errors

Message ID 20170301182618.22395-5-krzk@kernel.org
State New
Headers show

Commit Message

Krzysztof Kozlowski March 1, 2017, 6:26 p.m. UTC
Fix checkpatch errors:
1. ERROR: spaces required around that '+' (ctx:VxV)
2. ERROR: spaces required around that '&' (ctx:VxV)

No functional changes.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 hw/timer/exynos4210_mct.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Peter Maydell March 2, 2017, 4:40 p.m. UTC | #1
On 1 March 2017 at 18:26, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> Fix checkpatch errors:
> 1. ERROR: spaces required around that '+' (ctx:VxV)
> 2. ERROR: spaces required around that '&' (ctx:VxV)
>
> No functional changes.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  hw/timer/exynos4210_mct.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
> index 76634fb1b4fd..4dd3e441e2e6 100644
> --- a/hw/timer/exynos4210_mct.c
> +++ b/hw/timer/exynos4210_mct.c
> @@ -936,7 +936,7 @@ static void exynos4210_mct_update_freq(Exynos4210MCTState *s)
>  {
>      uint32_t freq = s->freq;
>      s->freq = 24000000 /
> -            ((MCT_CFG_GET_PRESCALER(s->reg_mct_cfg)+1) *
> +            ((MCT_CFG_GET_PRESCALER(s->reg_mct_cfg) + 1) *
>                      MCT_CFG_GET_DIVIDER(s->reg_mct_cfg));
>
>      if (freq != s->freq) {
> @@ -1160,7 +1160,7 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset,
>
>          DPRINTF("comparator %d write 0x%llx val << %d\n", index, value, shift);
>
> -        if (offset&0x4) {
> +        if (offset & 0x4) {
>              s->g_timer.reg.wstat |= G_WSTAT_COMP_U(index);
>          } else {
>              s->g_timer.reg.wstat |= G_WSTAT_COMP_L(index);
> --
> 2.9.3

Wow, only 2 checkpatch errors in the whole file? :-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
Peter Maydell March 2, 2017, 4:44 p.m. UTC | #2
On 1 March 2017 at 18:26, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> Fix checkpatch errors:
> 1. ERROR: spaces required around that '+' (ctx:VxV)
> 2. ERROR: spaces required around that '&' (ctx:VxV)
>
> No functional changes.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  hw/timer/exynos4210_mct.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
> index 76634fb1b4fd..4dd3e441e2e6 100644
> --- a/hw/timer/exynos4210_mct.c
> +++ b/hw/timer/exynos4210_mct.c
> @@ -936,7 +936,7 @@ static void exynos4210_mct_update_freq(Exynos4210MCTState *s)
>  {
>      uint32_t freq = s->freq;
>      s->freq = 24000000 /
> -            ((MCT_CFG_GET_PRESCALER(s->reg_mct_cfg)+1) *
> +            ((MCT_CFG_GET_PRESCALER(s->reg_mct_cfg) + 1) *
>                      MCT_CFG_GET_DIVIDER(s->reg_mct_cfg));
>
>      if (freq != s->freq) {
> @@ -1160,7 +1160,7 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset,
>
>          DPRINTF("comparator %d write 0x%llx val << %d\n", index, value, shift);
>
> -        if (offset&0x4) {
> +        if (offset & 0x4) {
>              s->g_timer.reg.wstat |= G_WSTAT_COMP_U(index);
>          } else {
>              s->g_timer.reg.wstat |= G_WSTAT_COMP_L(index);

PS: you can shut the patchew robot up if you want by squashing this
patch into patch 3, since one line is being changed in that patch
anyway and an extra line in what's a "fix whitespace" patch
anyway is no big deal. Or you can leave it the way you have
it now; I don't mind.

thanks
-- PMM
Krzysztof Kozlowski March 2, 2017, 4:48 p.m. UTC | #3
On Thu, Mar 2, 2017 at 6:44 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 1 March 2017 at 18:26, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>> Fix checkpatch errors:
>> 1. ERROR: spaces required around that '+' (ctx:VxV)
>> 2. ERROR: spaces required around that '&' (ctx:VxV)
>>
>> No functional changes.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>> ---
>>  hw/timer/exynos4210_mct.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
>> index 76634fb1b4fd..4dd3e441e2e6 100644
>> --- a/hw/timer/exynos4210_mct.c
>> +++ b/hw/timer/exynos4210_mct.c
>> @@ -936,7 +936,7 @@ static void exynos4210_mct_update_freq(Exynos4210MCTState *s)
>>  {
>>      uint32_t freq = s->freq;
>>      s->freq = 24000000 /
>> -            ((MCT_CFG_GET_PRESCALER(s->reg_mct_cfg)+1) *
>> +            ((MCT_CFG_GET_PRESCALER(s->reg_mct_cfg) + 1) *
>>                      MCT_CFG_GET_DIVIDER(s->reg_mct_cfg));
>>
>>      if (freq != s->freq) {
>> @@ -1160,7 +1160,7 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset,
>>
>>          DPRINTF("comparator %d write 0x%llx val << %d\n", index, value, shift);
>>
>> -        if (offset&0x4) {
>> +        if (offset & 0x4) {
>>              s->g_timer.reg.wstat |= G_WSTAT_COMP_U(index);
>>          } else {
>>              s->g_timer.reg.wstat |= G_WSTAT_COMP_L(index);
>
> PS: you can shut the patchew robot up if you want by squashing this
> patch into patch 3, since one line is being changed in that patch
> anyway and an extra line in what's a "fix whitespace" patch
> anyway is no big deal. Or you can leave it the way you have
> it now; I don't mind.

Yes, I saw the warning. I could also sent them in reversed order. As
of squashing commits I think it is useful to have them separate
because change of indentation creates a difficult to read diff. Such
diff can sneak by other changes and it would not be spotted.

Best regards,
Krzysztof
diff mbox

Patch

diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
index 76634fb1b4fd..4dd3e441e2e6 100644
--- a/hw/timer/exynos4210_mct.c
+++ b/hw/timer/exynos4210_mct.c
@@ -936,7 +936,7 @@  static void exynos4210_mct_update_freq(Exynos4210MCTState *s)
 {
     uint32_t freq = s->freq;
     s->freq = 24000000 /
-            ((MCT_CFG_GET_PRESCALER(s->reg_mct_cfg)+1) *
+            ((MCT_CFG_GET_PRESCALER(s->reg_mct_cfg) + 1) *
                     MCT_CFG_GET_DIVIDER(s->reg_mct_cfg));
 
     if (freq != s->freq) {
@@ -1160,7 +1160,7 @@  static void exynos4210_mct_write(void *opaque, hwaddr offset,
 
         DPRINTF("comparator %d write 0x%llx val << %d\n", index, value, shift);
 
-        if (offset&0x4) {
+        if (offset & 0x4) {
             s->g_timer.reg.wstat |= G_WSTAT_COMP_U(index);
         } else {
             s->g_timer.reg.wstat |= G_WSTAT_COMP_L(index);