All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups
@ 2017-03-13 18:47 Krzysztof Kozlowski
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 1/3] hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-03-13 18:47 UTC (permalink / raw)
  To: Igor Mitsyanko, Peter Maydell, Paolo Bonzini, qemu-arm, qemu-devel
  Cc: eblake, Philippe Mathieu-Daudé, Krzysztof Kozlowski

Hi,

Minor cleanups, no dependencies.

Changes since v1
================
1. Patch 1/3: Address missed Philippe's comments about error reporting
   verbosity.

Changes since v2
================
1. Patch 1/3: Address Eric's comment.
2. Patch 2/3: Address Peter's comments about "const".
3. Patch 3/3: Use "unsigned int". I had impression that no consensus was
   reached during discussion. If that is wrong impression, let me know.

Best regards,
Krzysztof



Krzysztof Kozlowski (3):
  hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report
  hw/char/exynos4210_uart: Constify static array and few arguments
  hw/misc/exynos4210_pmu: Reorder local variables for readability

 hw/arm/exynos4_boards.c   |  6 +++---
 hw/char/exynos4210_uart.c |  8 ++++----
 hw/misc/exynos4210_pmu.c  |  4 ++--
 hw/timer/exynos4210_mct.c |  6 ++++--
 hw/timer/exynos4210_pwm.c | 13 +++++++------
 hw/timer/exynos4210_rtc.c | 19 ++++++++++---------
 6 files changed, 30 insertions(+), 26 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH v3 1/3] hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report
  2017-03-13 18:47 [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups Krzysztof Kozlowski
@ 2017-03-13 18:47 ` Krzysztof Kozlowski
  2017-03-13 19:26   ` Philippe Mathieu-Daudé
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 2/3] hw/char/exynos4210_uart: Constify static array and few arguments Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-03-13 18:47 UTC (permalink / raw)
  To: Igor Mitsyanko, Peter Maydell, Paolo Bonzini, qemu-arm, qemu-devel
  Cc: eblake, Philippe Mathieu-Daudé, Krzysztof Kozlowski

qemu_log_mask() and error_report() are preferred over fprintf() for
logging errors.  Also remove square brackets [] and additional new line
characters in printed messages.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 hw/arm/exynos4_boards.c   |  6 +++---
 hw/timer/exynos4210_mct.c |  6 ++++--
 hw/timer/exynos4210_pwm.c | 13 +++++++------
 hw/timer/exynos4210_rtc.c | 19 ++++++++++---------
 4 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index 0efa19405409..0a352815b86d 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -22,6 +22,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 #include "qemu-common.h"
 #include "cpu.h"
 #include "sysemu/sysemu.h"
@@ -101,9 +102,8 @@ static Exynos4210State *exynos4_boards_init_common(MachineState *machine,
     MachineClass *mc = MACHINE_GET_CLASS(machine);
 
     if (smp_cpus != EXYNOS4210_NCPUS && !qtest_enabled()) {
-        fprintf(stderr, "%s board supports only %d CPU cores. Ignoring smp_cpus"
-                " value.\n",
-                mc->name, EXYNOS4210_NCPUS);
+        error_report("%s board supports only %d CPU cores, ignoring smp_cpus value",
+                     mc->name, EXYNOS4210_NCPUS);
     }
 
     exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type];
diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
index 6069116942a4..e4ef4cfd3625 100644
--- a/hw/timer/exynos4210_mct.c
+++ b/hw/timer/exynos4210_mct.c
@@ -53,6 +53,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "hw/sysbus.h"
 #include "qemu/timer.h"
 #include "qemu/main-loop.h"
@@ -1364,8 +1365,9 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset,
     case L0_TCNTO: case L1_TCNTO:
     case L0_ICNTO: case L1_ICNTO:
     case L0_FRCNTO: case L1_FRCNTO:
-        fprintf(stderr, "\n[exynos4210.mct: write to RO register "
-                TARGET_FMT_plx "]\n\n", offset);
+        qemu_log_mask(LOG_GUEST_ERROR,
+                      "exynos4210.mct: write to RO register " TARGET_FMT_plx,
+                      offset);
         break;
 
     case L0_INT_CSTAT: case L1_INT_CSTAT:
diff --git a/hw/timer/exynos4210_pwm.c b/hw/timer/exynos4210_pwm.c
index f5765075c720..87f63f057e14 100644
--- a/hw/timer/exynos4210_pwm.c
+++ b/hw/timer/exynos4210_pwm.c
@@ -21,6 +21,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "hw/sysbus.h"
 #include "qemu/timer.h"
 #include "qemu-common.h"
@@ -252,9 +253,9 @@ static uint64_t exynos4210_pwm_read(void *opaque, hwaddr offset,
         break;
 
     default:
-        fprintf(stderr,
-                "[exynos4210.pwm: bad read offset " TARGET_FMT_plx "]\n",
-                offset);
+        qemu_log_mask(LOG_GUEST_ERROR,
+                      "exynos4210.pwm: bad read offset " TARGET_FMT_plx,
+                      offset);
         break;
     }
     return value;
@@ -343,9 +344,9 @@ static void exynos4210_pwm_write(void *opaque, hwaddr offset,
         break;
 
     default:
-        fprintf(stderr,
-                "[exynos4210.pwm: bad write offset " TARGET_FMT_plx "]\n",
-                offset);
+        qemu_log_mask(LOG_GUEST_ERROR,
+                      "exynos4210.pwm: bad write offset " TARGET_FMT_plx,
+                      offset);
         break;
 
     }
diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c
index 1a648c5d9e67..4607833e3e6f 100644
--- a/hw/timer/exynos4210_rtc.c
+++ b/hw/timer/exynos4210_rtc.c
@@ -26,6 +26,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "hw/sysbus.h"
 #include "qemu/timer.h"
 #include "qemu-common.h"
@@ -370,9 +371,9 @@ static uint64_t exynos4210_rtc_read(void *opaque, hwaddr offset,
         break;
 
     default:
-        fprintf(stderr,
-                "[exynos4210.rtc: bad read offset " TARGET_FMT_plx "]\n",
-                offset);
+        qemu_log_mask(LOG_GUEST_ERROR,
+                      "exynos4210.rtc: bad read offset " TARGET_FMT_plx,
+                      offset);
         break;
     }
     return value;
@@ -433,9 +434,9 @@ static void exynos4210_rtc_write(void *opaque, hwaddr offset,
         if (value > TICNT_THRESHOLD) {
             s->reg_ticcnt = value;
         } else {
-            fprintf(stderr,
-                    "[exynos4210.rtc: bad TICNT value %u ]\n",
-                    (uint32_t)value);
+            qemu_log_mask(LOG_GUEST_ERROR,
+                          "exynos4210.rtc: bad TICNT value %u",
+                          (uint32_t)value);
         }
         break;
 
@@ -500,9 +501,9 @@ static void exynos4210_rtc_write(void *opaque, hwaddr offset,
         break;
 
     default:
-        fprintf(stderr,
-                "[exynos4210.rtc: bad write offset " TARGET_FMT_plx "]\n",
-                offset);
+        qemu_log_mask(LOG_GUEST_ERROR,
+                      "exynos4210.rtc: bad write offset " TARGET_FMT_plx,
+                      offset);
         break;
 
     }
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH v3 2/3] hw/char/exynos4210_uart: Constify static array and few arguments
  2017-03-13 18:47 [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups Krzysztof Kozlowski
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 1/3] hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report Krzysztof Kozlowski
@ 2017-03-13 18:47 ` Krzysztof Kozlowski
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability Krzysztof Kozlowski
  2017-04-04 11:52 ` [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-03-13 18:47 UTC (permalink / raw)
  To: Igor Mitsyanko, Peter Maydell, Paolo Bonzini, qemu-arm, qemu-devel
  Cc: eblake, Philippe Mathieu-Daudé, Krzysztof Kozlowski

The static array exynos4210_uart_regs with register values is not
modified so it can be made const.

Few other functions accept driver or uart state as an argument but they
do not change it and do not cast it so this can be made const for code
safeness.

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

diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index b75f28d473bf..bff706ab3a68 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -102,7 +102,7 @@ typedef struct Exynos4210UartReg {
     uint32_t            reset_value;
 } Exynos4210UartReg;
 
-static Exynos4210UartReg exynos4210_uart_regs[] = {
+static const Exynos4210UartReg exynos4210_uart_regs[] = {
     {"ULCON",    ULCON,    0x00000000},
     {"UCON",     UCON,     0x00003000},
     {"UFCON",    UFCON,    0x00000000},
@@ -220,7 +220,7 @@ static uint8_t fifo_retrieve(Exynos4210UartFIFO *q)
     return  ret;
 }
 
-static int fifo_elements_number(Exynos4210UartFIFO *q)
+static int fifo_elements_number(const Exynos4210UartFIFO *q)
 {
     if (q->sp < q->rp) {
         return q->size - q->rp + q->sp;
@@ -229,7 +229,7 @@ static int fifo_elements_number(Exynos4210UartFIFO *q)
     return q->sp - q->rp;
 }
 
-static int fifo_empty_elements_number(Exynos4210UartFIFO *q)
+static int fifo_empty_elements_number(const Exynos4210UartFIFO *q)
 {
     return q->size - fifo_elements_number(q);
 }
@@ -245,7 +245,7 @@ static void fifo_reset(Exynos4210UartFIFO *q)
     q->rp = 0;
 }
 
-static uint32_t exynos4210_uart_Tx_FIFO_trigger_level(Exynos4210UartState *s)
+static uint32_t exynos4210_uart_Tx_FIFO_trigger_level(const Exynos4210UartState *s)
 {
     uint32_t level = 0;
     uint32_t reg;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH v3 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability
  2017-03-13 18:47 [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups Krzysztof Kozlowski
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 1/3] hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report Krzysztof Kozlowski
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 2/3] hw/char/exynos4210_uart: Constify static array and few arguments Krzysztof Kozlowski
@ 2017-03-13 18:47 ` Krzysztof Kozlowski
  2017-03-13 19:28   ` Philippe Mathieu-Daudé
  2017-04-04 11:52 ` [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups Peter Maydell
  3 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-03-13 18:47 UTC (permalink / raw)
  To: Igor Mitsyanko, Peter Maydell, Paolo Bonzini, qemu-arm, qemu-devel
  Cc: eblake, Philippe Mathieu-Daudé, Krzysztof Kozlowski

Short declaration of 'i' was in the middle of declarations with
assignments.  Make it a little bit more readable.  Additionally switch
from "unsigned" to "unsigned int" as this pattern is more widely used.
No functional change.

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

diff --git a/hw/misc/exynos4210_pmu.c b/hw/misc/exynos4210_pmu.c
index e30dbc7d3d83..63a8ccd35559 100644
--- a/hw/misc/exynos4210_pmu.c
+++ b/hw/misc/exynos4210_pmu.c
@@ -401,8 +401,8 @@ static uint64_t exynos4210_pmu_read(void *opaque, hwaddr offset,
                                     unsigned size)
 {
     Exynos4210PmuState *s = (Exynos4210PmuState *)opaque;
-    unsigned i;
     const Exynos4210PmuReg *reg_p = exynos4210_pmu_regs;
+    unsigned int i;
 
     for (i = 0; i < PMU_NUM_OF_REGISTERS; i++) {
         if (reg_p->offset == offset) {
@@ -420,8 +420,8 @@ static void exynos4210_pmu_write(void *opaque, hwaddr offset,
                                  uint64_t val, unsigned size)
 {
     Exynos4210PmuState *s = (Exynos4210PmuState *)opaque;
-    unsigned i;
     const Exynos4210PmuReg *reg_p = exynos4210_pmu_regs;
+    unsigned int i;
 
     for (i = 0; i < PMU_NUM_OF_REGISTERS; i++) {
         if (reg_p->offset == offset) {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH v3 1/3] hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 1/3] hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report Krzysztof Kozlowski
@ 2017-03-13 19:26   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-03-13 19:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Igor Mitsyanko, Peter Maydell,
	Paolo Bonzini, qemu-arm, qemu-devel

On 03/13/2017 03:47 PM, Krzysztof Kozlowski wrote:
> qemu_log_mask() and error_report() are preferred over fprintf() for
> logging errors.  Also remove square brackets [] and additional new line
> characters in printed messages.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/arm/exynos4_boards.c   |  6 +++---
>  hw/timer/exynos4210_mct.c |  6 ++++--
>  hw/timer/exynos4210_pwm.c | 13 +++++++------
>  hw/timer/exynos4210_rtc.c | 19 ++++++++++---------
>  4 files changed, 24 insertions(+), 20 deletions(-)
>
> diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
> index 0efa19405409..0a352815b86d 100644
> --- a/hw/arm/exynos4_boards.c
> +++ b/hw/arm/exynos4_boards.c
> @@ -22,6 +22,7 @@
>   */
>
>  #include "qemu/osdep.h"
> +#include "qemu/error-report.h"
>  #include "qemu-common.h"
>  #include "cpu.h"
>  #include "sysemu/sysemu.h"
> @@ -101,9 +102,8 @@ static Exynos4210State *exynos4_boards_init_common(MachineState *machine,
>      MachineClass *mc = MACHINE_GET_CLASS(machine);
>
>      if (smp_cpus != EXYNOS4210_NCPUS && !qtest_enabled()) {
> -        fprintf(stderr, "%s board supports only %d CPU cores. Ignoring smp_cpus"
> -                " value.\n",
> -                mc->name, EXYNOS4210_NCPUS);
> +        error_report("%s board supports only %d CPU cores, ignoring smp_cpus value",
> +                     mc->name, EXYNOS4210_NCPUS);
>      }
>
>      exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type];
> diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
> index 6069116942a4..e4ef4cfd3625 100644
> --- a/hw/timer/exynos4210_mct.c
> +++ b/hw/timer/exynos4210_mct.c
> @@ -53,6 +53,7 @@
>   */
>
>  #include "qemu/osdep.h"
> +#include "qemu/log.h"
>  #include "hw/sysbus.h"
>  #include "qemu/timer.h"
>  #include "qemu/main-loop.h"
> @@ -1364,8 +1365,9 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset,
>      case L0_TCNTO: case L1_TCNTO:
>      case L0_ICNTO: case L1_ICNTO:
>      case L0_FRCNTO: case L1_FRCNTO:
> -        fprintf(stderr, "\n[exynos4210.mct: write to RO register "
> -                TARGET_FMT_plx "]\n\n", offset);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "exynos4210.mct: write to RO register " TARGET_FMT_plx,
> +                      offset);
>          break;
>
>      case L0_INT_CSTAT: case L1_INT_CSTAT:
> diff --git a/hw/timer/exynos4210_pwm.c b/hw/timer/exynos4210_pwm.c
> index f5765075c720..87f63f057e14 100644
> --- a/hw/timer/exynos4210_pwm.c
> +++ b/hw/timer/exynos4210_pwm.c
> @@ -21,6 +21,7 @@
>   */
>
>  #include "qemu/osdep.h"
> +#include "qemu/log.h"
>  #include "hw/sysbus.h"
>  #include "qemu/timer.h"
>  #include "qemu-common.h"
> @@ -252,9 +253,9 @@ static uint64_t exynos4210_pwm_read(void *opaque, hwaddr offset,
>          break;
>
>      default:
> -        fprintf(stderr,
> -                "[exynos4210.pwm: bad read offset " TARGET_FMT_plx "]\n",
> -                offset);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "exynos4210.pwm: bad read offset " TARGET_FMT_plx,
> +                      offset);
>          break;
>      }
>      return value;
> @@ -343,9 +344,9 @@ static void exynos4210_pwm_write(void *opaque, hwaddr offset,
>          break;
>
>      default:
> -        fprintf(stderr,
> -                "[exynos4210.pwm: bad write offset " TARGET_FMT_plx "]\n",
> -                offset);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "exynos4210.pwm: bad write offset " TARGET_FMT_plx,
> +                      offset);
>          break;
>
>      }
> diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c
> index 1a648c5d9e67..4607833e3e6f 100644
> --- a/hw/timer/exynos4210_rtc.c
> +++ b/hw/timer/exynos4210_rtc.c
> @@ -26,6 +26,7 @@
>   */
>
>  #include "qemu/osdep.h"
> +#include "qemu/log.h"
>  #include "hw/sysbus.h"
>  #include "qemu/timer.h"
>  #include "qemu-common.h"
> @@ -370,9 +371,9 @@ static uint64_t exynos4210_rtc_read(void *opaque, hwaddr offset,
>          break;
>
>      default:
> -        fprintf(stderr,
> -                "[exynos4210.rtc: bad read offset " TARGET_FMT_plx "]\n",
> -                offset);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "exynos4210.rtc: bad read offset " TARGET_FMT_plx,
> +                      offset);
>          break;
>      }
>      return value;
> @@ -433,9 +434,9 @@ static void exynos4210_rtc_write(void *opaque, hwaddr offset,
>          if (value > TICNT_THRESHOLD) {
>              s->reg_ticcnt = value;
>          } else {
> -            fprintf(stderr,
> -                    "[exynos4210.rtc: bad TICNT value %u ]\n",
> -                    (uint32_t)value);
> +            qemu_log_mask(LOG_GUEST_ERROR,
> +                          "exynos4210.rtc: bad TICNT value %u",
> +                          (uint32_t)value);
>          }
>          break;
>
> @@ -500,9 +501,9 @@ static void exynos4210_rtc_write(void *opaque, hwaddr offset,
>          break;
>
>      default:
> -        fprintf(stderr,
> -                "[exynos4210.rtc: bad write offset " TARGET_FMT_plx "]\n",
> -                offset);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "exynos4210.rtc: bad write offset " TARGET_FMT_plx,
> +                      offset);
>          break;
>
>      }
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH v3 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability Krzysztof Kozlowski
@ 2017-03-13 19:28   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-03-13 19:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Igor Mitsyanko, Peter Maydell,
	Paolo Bonzini, qemu-arm, qemu-devel

On 03/13/2017 03:47 PM, Krzysztof Kozlowski wrote:
> Short declaration of 'i' was in the middle of declarations with
> assignments.  Make it a little bit more readable.  Additionally switch
> from "unsigned" to "unsigned int" as this pattern is more widely used.
> No functional change.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/misc/exynos4210_pmu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/misc/exynos4210_pmu.c b/hw/misc/exynos4210_pmu.c
> index e30dbc7d3d83..63a8ccd35559 100644
> --- a/hw/misc/exynos4210_pmu.c
> +++ b/hw/misc/exynos4210_pmu.c
> @@ -401,8 +401,8 @@ static uint64_t exynos4210_pmu_read(void *opaque, hwaddr offset,
>                                      unsigned size)
>  {
>      Exynos4210PmuState *s = (Exynos4210PmuState *)opaque;
> -    unsigned i;
>      const Exynos4210PmuReg *reg_p = exynos4210_pmu_regs;
> +    unsigned int i;
>
>      for (i = 0; i < PMU_NUM_OF_REGISTERS; i++) {
>          if (reg_p->offset == offset) {
> @@ -420,8 +420,8 @@ static void exynos4210_pmu_write(void *opaque, hwaddr offset,
>                                   uint64_t val, unsigned size)
>  {
>      Exynos4210PmuState *s = (Exynos4210PmuState *)opaque;
> -    unsigned i;
>      const Exynos4210PmuReg *reg_p = exynos4210_pmu_regs;
> +    unsigned int i;
>
>      for (i = 0; i < PMU_NUM_OF_REGISTERS; i++) {
>          if (reg_p->offset == offset) {
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups
  2017-03-13 18:47 [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability Krzysztof Kozlowski
@ 2017-04-04 11:52 ` Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2017-04-04 11:52 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Igor Mitsyanko, Paolo Bonzini, qemu-arm, QEMU Developers,
	Eric Blake, Philippe Mathieu-Daudé

On 13 March 2017 at 18:47, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> Hi,
>
> Minor cleanups, no dependencies.
>
> Changes since v1
> ================
> 1. Patch 1/3: Address missed Philippe's comments about error reporting
>    verbosity.
>
> Changes since v2
> ================
> 1. Patch 1/3: Address Eric's comment.
> 2. Patch 2/3: Address Peter's comments about "const".
> 3. Patch 3/3: Use "unsigned int". I had impression that no consensus was
>    reached during discussion. If that is wrong impression, let me know.

Applied to target-arm.next for 2.10, thanks.

(I wrapped a long line in patch 1 that checkpatch complains about.)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-04 11:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 18:47 [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups Krzysztof Kozlowski
2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 1/3] hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report Krzysztof Kozlowski
2017-03-13 19:26   ` Philippe Mathieu-Daudé
2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 2/3] hw/char/exynos4210_uart: Constify static array and few arguments Krzysztof Kozlowski
2017-03-13 18:47 ` [Qemu-devel] [PATCH v3 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability Krzysztof Kozlowski
2017-03-13 19:28   ` Philippe Mathieu-Daudé
2017-04-04 11:52 ` [Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.