All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe Dubois <jcd@tribudubois.net>
To: qemu-devel@nongnu.org
Cc: Jean-Christophe Dubois <jcd@tribudubois.net>
Subject: [Qemu-devel] [PATCH v13 03/19] i.MX:Fix Coding style for UART emulator.
Date: Thu, 16 Jul 2015 23:21:17 +0200	[thread overview]
Message-ID: <23ab872b7cd30b1399384fb26a2ebb75e9761d7b.1437080501.git.jcd@tribudubois.net> (raw)
In-Reply-To: <cover.1437080501.git.jcd@tribudubois.net>

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
---

Changes since v1:
    * not present on v1
    
Changes since v2:
    * not present on v2
    
Changes since v3:
    * not present on v3

Changes since v4:
    * not present on v4

Changes since v5: 
    * not present on v5 

Changes since v6:
    * not present on v6

Changes since v7:
    * not preset on v7

Changes since v8: 
    * Fix coding style

Changes since v9:
    * no change

Changes since v10:
    * no change

Changes since v11:
    * no change

Changes since v12:
    * Some more coding style fixes from patch 02

 hw/char/imx_serial.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c
index f0ed255..f9da59f 100644
--- a/hw/char/imx_serial.c
+++ b/hw/char/imx_serial.c
@@ -26,7 +26,7 @@
 //#define DEBUG_SERIAL 1
 #ifdef DEBUG_SERIAL
 #define DPRINTF(fmt, args...) \
-do { printf("imx_serial: " fmt , ##args); } while (0)
+do { printf("%s: " fmt , TYPE_IMX_SERIAL, ##args); } while (0)
 #else
 #define DPRINTF(fmt, args...) do {} while (0)
 #endif
@@ -38,13 +38,13 @@ do { printf("imx_serial: " fmt , ##args); } while (0)
 //#define DEBUG_IMPLEMENTATION 1
 #ifdef DEBUG_IMPLEMENTATION
 #  define IPRINTF(fmt, args...) \
-    do  { fprintf(stderr, "imx_serial: " fmt, ##args); } while (0)
+    do  { fprintf(stderr, "%s: " fmt, TYPE_IMX_SERIAL, ##args); } while (0)
 #else
 #  define IPRINTF(fmt, args...) do {} while (0)
 #endif
 
 static const VMStateDescription vmstate_imx_serial = {
-    .name = "imx-serial",
+    .name = TYPE_IMX_SERIAL,
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {
@@ -164,13 +164,13 @@ static uint64_t imx_serial_read(void *opaque, hwaddr offset,
         return 0x0; /* TODO */
 
     default:
-        IPRINTF("imx_serial_read: bad offset: 0x%x\n", (int)offset);
+        IPRINTF("%s: bad offset: 0x%x\n", __func__, (int)offset);
         return 0;
     }
 }
 
 static void imx_serial_write(void *opaque, hwaddr offset,
-                      uint64_t value, unsigned size)
+                             uint64_t value, unsigned size)
 {
     IMXSerialState *s = (IMXSerialState *)opaque;
     unsigned char ch;
@@ -220,25 +220,25 @@ static void imx_serial_write(void *opaque, hwaddr offset,
 
     case 0x25: /* USR1 */
         value &= USR1_AWAKE | USR1_AIRINT | USR1_DTRD | USR1_AGTIM |
-            USR1_FRAMERR | USR1_ESCF | USR1_RTSD | USR1_PARTYER;
+                 USR1_FRAMERR | USR1_ESCF | USR1_RTSD | USR1_PARTYER;
         s->usr1 &= ~value;
         break;
 
     case 0x26: /* USR2 */
-       /*
-        * Writing 1 to some bits clears them; all other
-        * values are ignored
-        */
+        /*
+         * Writing 1 to some bits clears them; all other
+         * values are ignored
+         */
         value &= USR2_ADET | USR2_DTRF | USR2_IDLE | USR2_ACST |
-            USR2_RIDELT | USR2_IRINT | USR2_WAKE |
-            USR2_DCDDELT | USR2_RTSF | USR2_BRCD | USR2_ORE;
+                 USR2_RIDELT | USR2_IRINT | USR2_WAKE |
+                 USR2_DCDDELT | USR2_RTSF | USR2_BRCD | USR2_ORE;
         s->usr2 &= ~value;
         break;
 
-        /*
-         * Linux expects to see what it writes to these registers
-         * We don't currently alter the baud rate
-         */
+    /*
+     * Linux expects to see what it writes to these registers
+     * We don't currently alter the baud rate
+     */
     case 0x29: /* UBIR */
         s->ubrc = value & 0xffff;
         break;
@@ -266,7 +266,7 @@ static void imx_serial_write(void *opaque, hwaddr offset,
         break;
 
     default:
-        IPRINTF("imx_serial_write: Bad offset 0x%x\n", (int)offset);
+        IPRINTF("%s: Bad offset 0x%x\n", __func__, (int)offset);
     }
 }
 
-- 
2.1.4

  parent reply	other threads:[~2015-07-16 21:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 21:21 [Qemu-devel] [PATCH v13 00/19] i.MX: Add i.MX25 support through the PDK evaluation board Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 01/19] i.MX: Split UART emulator in a header file and a source file Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 02/19] i.MX: Move serial initialization to init/realize of DeviceClass Jean-Christophe Dubois
2015-07-16 21:21 ` Jean-Christophe Dubois [this message]
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 04/19] i.MX: Split AVIC emulator in a header file and a source file Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 05/19] i.MX: Fix Coding style for AVIC emulator Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 06/19] i.MX: Split CCM emulator in a header file and a source file Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 07/19] i.MX: Fix Coding style for CCM emulator Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 08/19] i.MX: Split EPIT emulator in a header file and a source file Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 09/19] i.MX: Fix Coding style for EPIT emulator Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 10/19] i.MX: Split GPT emulator in a header file and a source file Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 11/19] i.MX: Fix Coding style for GPT emulator Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 12/19] i.MX: Add SOC support for i.MX31 Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 13/19] i.MX: KZM now uses the standalone i.MX31 SOC support Jean-Christophe Dubois
2015-08-07 13:45   ` Peter Maydell
2015-08-10 16:15     ` Jean-Christophe DUBOIS
2015-08-10 16:23       ` Peter Maydell
2015-08-10 17:01         ` Jean-Christophe DUBOIS
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 14/19] i.MX: Add I2C controller emulator Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 15/19] i.MX: Add FEC Ethernet Emulator Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 16/19] i.MX: Add SOC support for i.MX25 Jean-Christophe Dubois
2015-08-07 13:50   ` Peter Maydell
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 17/19] i.MX: Add the i.MX25 PDK plateform Jean-Christophe Dubois
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 18/19] i.MX: Add qtest support for I2C device emulator Jean-Christophe Dubois
2015-08-07 13:05   ` Peter Maydell
2015-08-10 16:19     ` Jean-Christophe DUBOIS
2015-07-16 21:21 ` [Qemu-devel] [PATCH v13 19/19] i.MX: Adding i2C devices to i.MX31 SOC Jean-Christophe Dubois
2015-08-07 14:02   ` Peter Maydell
2015-07-30 21:36 ` [Qemu-devel] [PATCH v13 00/19] i.MX: Add i.MX25 support through the PDK evaluation board Jean-Christophe DUBOIS
2015-07-30 22:32   ` Peter Maydell
2015-08-07 14:13 ` Peter Maydell
2015-08-10 16:20   ` Jean-Christophe DUBOIS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23ab872b7cd30b1399384fb26a2ebb75e9761d7b.1437080501.git.jcd@tribudubois.net \
    --to=jcd@tribudubois.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.