qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: "Yi Wang" <wang.yi59@zte.com.cn>,
	"Thomas Huth" <thuth@redhat.com>,
	qemu-trivial@nongnu.org, "Laurent Vivier" <laurent@vivier.eu>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Liao Pingfang" <liao.pingfang@zte.com.cn>
Subject: [PULL 07/44] hw: Remove superfluous breaks
Date: Tue,  1 Sep 2020 16:09:17 +0200	[thread overview]
Message-ID: <20200901140954.889743-8-laurent@vivier.eu> (raw)
In-Reply-To: <20200901140954.889743-1-laurent@vivier.eu>

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove superfluous breaks, as there is a "return" before them.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1594631126-36631-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/block/pflash_cfi01.c     |  1 -
 hw/display/cirrus_vga.c     |  1 -
 hw/display/qxl-logger.c     |  2 --
 hw/gpio/max7310.c           |  3 ---
 hw/i386/intel_iommu.c       |  1 -
 hw/input/pxa2xx_keypad.c    | 10 ----------
 hw/intc/armv7m_nvic.c       |  1 -
 hw/net/lan9118.c            |  2 --
 hw/usb/ccid-card-emulated.c |  1 -
 9 files changed, 22 deletions(-)

diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 8ab1d66310b4..f0fcd63f84e8 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -213,7 +213,6 @@ static uint32_t pflash_devid_query(PFlashCFI01 *pfl, hwaddr offset)
     default:
         trace_pflash_device_info(offset);
         return 0;
-        break;
     }
     /* Replicate responses for each device in bank. */
     if (pfl->device_width < pfl->bank_width) {
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 212d6f5e6145..02d9ed0bd465 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -1637,7 +1637,6 @@ static int cirrus_vga_read_cr(CirrusVGAState * s, unsigned reg_index)
 	return s->vga.cr[s->vga.cr_index];
     case 0x26:			// Attribute Controller Index Readback (R)
 	return s->vga.ar_index & 0x3f;
-	break;
     default:
         qemu_log_mask(LOG_GUEST_ERROR,
                       "cirrus: inport cr_index 0x%02x\n", reg_index);
diff --git a/hw/display/qxl-logger.c b/hw/display/qxl-logger.c
index 2ec6d8fa3d6c..c15175bce322 100644
--- a/hw/display/qxl-logger.c
+++ b/hw/display/qxl-logger.c
@@ -161,7 +161,6 @@ static int qxl_log_cmd_draw(PCIQXLDevice *qxl, QXLDrawable *draw, int group_id)
     switch (draw->type) {
     case QXL_DRAW_COPY:
         return qxl_log_cmd_draw_copy(qxl, &draw->u.copy, group_id);
-        break;
     }
     return 0;
 }
@@ -180,7 +179,6 @@ static int qxl_log_cmd_draw_compat(PCIQXLDevice *qxl, QXLCompatDrawable *draw,
     switch (draw->type) {
     case QXL_DRAW_COPY:
         return qxl_log_cmd_draw_copy(qxl, &draw->u.copy, group_id);
-        break;
     }
     return 0;
 }
diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c
index bebb4030d276..4f78774dc8f2 100644
--- a/hw/gpio/max7310.c
+++ b/hw/gpio/max7310.c
@@ -51,11 +51,9 @@ static uint8_t max7310_rx(I2CSlave *i2c)
     switch (s->command) {
     case 0x00:	/* Input port */
         return s->level ^ s->polarity;
-        break;
 
     case 0x01:	/* Output port */
         return s->level & ~s->direction;
-        break;
 
     case 0x02:	/* Polarity inversion */
         return s->polarity;
@@ -65,7 +63,6 @@ static uint8_t max7310_rx(I2CSlave *i2c)
 
     case 0x04:	/* Timeout */
         return s->status;
-        break;
 
     case 0xff:	/* Reserved */
         return 0xff;
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 5284bb68b6e4..0d7c4303b4bc 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3168,7 +3168,6 @@ static int vtd_irte_get(IntelIOMMUState *iommu, uint16_t index,
                               index, entry->irte.sid_vtype);
             /* Take this as verification failure. */
             return -VTD_FR_IR_SID_ERR;
-            break;
         }
     }
 
diff --git a/hw/input/pxa2xx_keypad.c b/hw/input/pxa2xx_keypad.c
index 62aa6f6b15a0..7f2f739fb335 100644
--- a/hw/input/pxa2xx_keypad.c
+++ b/hw/input/pxa2xx_keypad.c
@@ -192,10 +192,8 @@ static uint64_t pxa2xx_keypad_read(void *opaque, hwaddr offset,
             s->kpc &= ~(KPC_DI);
         qemu_irq_lower(s->irq);
         return tmp;
-        break;
     case KPDK:
         return s->kpdk;
-        break;
     case KPREC:
         tmp = s->kprec;
         if(tmp & KPREC_OF1)
@@ -207,31 +205,23 @@ static uint64_t pxa2xx_keypad_read(void *opaque, hwaddr offset,
         if(tmp & KPREC_UF0)
             s->kprec &= ~(KPREC_UF0);
         return tmp;
-        break;
     case KPMK:
         tmp = s->kpmk;
         if(tmp & KPMK_MKP)
             s->kpmk &= ~(KPMK_MKP);
         return tmp;
-        break;
     case KPAS:
         return s->kpas;
-        break;
     case KPASMKP0:
         return s->kpasmkp[0];
-        break;
     case KPASMKP1:
         return s->kpasmkp[1];
-        break;
     case KPASMKP2:
         return s->kpasmkp[2];
-        break;
     case KPASMKP3:
         return s->kpasmkp[3];
-        break;
     case KPKDI:
         return s->kpkdi;
-        break;
     default:
         qemu_log_mask(LOG_GUEST_ERROR,
                       "%s: Bad read offset 0x%"HWADDR_PRIx"\n",
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 277a98b87b91..7876c1ba07ec 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -1290,7 +1290,6 @@ static uint32_t nvic_readl(NVICState *s, uint32_t offset, MemTxAttrs attrs)
     case 0xd90: /* MPU_TYPE */
         /* Unified MPU; if the MPU is not present this value is zero */
         return cpu->pmsav7_dregion << 8;
-        break;
     case 0xd94: /* MPU_CTRL */
         return cpu->env.v7m.mpu_ctrl[attrs.secure];
     case 0xd98: /* MPU_RNR */
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index 8e2a432179cb..e35f00fb9fea 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -931,10 +931,8 @@ static uint32_t do_mac_read(lan9118_state *s, int reg)
                | (s->conf.macaddr.a[2] << 16) | (s->conf.macaddr.a[3] << 24);
     case MAC_HASHH:
         return s->mac_hashh;
-        break;
     case MAC_HASHL:
         return s->mac_hashl;
-        break;
     case MAC_MII_ACC:
         return s->mac_mii_acc;
     case MAC_MII_DATA:
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 7d6105ef34d5..0f1afd66be1c 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -350,7 +350,6 @@ static void *event_thread(void *arg)
         case VEVENT_LAST: /* quit */
             vevent_delete(event);
             return NULL;
-            break;
         default:
             break;
         }
-- 
2.26.2



  parent reply	other threads:[~2020-09-01 14:21 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
2020-09-01 14:09 ` [PULL 01/44] hw/register: Document register_init_block @memory_size Laurent Vivier
2020-09-01 14:09 ` [PULL 02/44] target/arm/kvm: Remove superfluous break Laurent Vivier
2020-09-01 14:09 ` [PULL 03/44] target/ppc: Remove superfluous breaks Laurent Vivier
2020-09-01 14:09 ` [PULL 04/44] scsi: " Laurent Vivier
2020-09-01 14:09 ` [PULL 05/44] vnc: Remove the superfluous break Laurent Vivier
2020-09-01 14:09 ` [PULL 06/44] block/vmdk: Remove superfluous breaks Laurent Vivier
2020-09-01 14:09 ` Laurent Vivier [this message]
2020-09-01 14:09 ` [PULL 08/44] target/sh4: " Laurent Vivier
2020-09-01 14:09 ` [PULL 09/44] target/cris: " Laurent Vivier
2020-09-01 14:09 ` [PULL 10/44] hw/net/can: Add missing fallthrough statements Laurent Vivier
2020-09-01 14:09 ` [PULL 11/44] hw/i386/kvm/ioapic.c: fix typo in error message Laurent Vivier
2020-09-01 14:09 ` [PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization Laurent Vivier
2020-09-01 14:09 ` [PULL 13/44] stubs/cmos: Use correct include Laurent Vivier
2020-09-01 14:09 ` [PULL 14/44] qemu-options.hx: Fix typo for netdev documentation Laurent Vivier
2020-09-01 14:09 ` [PULL 15/44] hw/core/sysbus: Fix a typo Laurent Vivier
2020-09-01 14:09 ` [PULL 16/44] hw/core/sysbus: Assert memory region index is in range Laurent Vivier
2020-09-01 14:09 ` [PULL 17/44] Revert "mailmap: Update philmd email address" Laurent Vivier
2020-09-01 14:09 ` [PULL 18/44] docs: Fix broken links Laurent Vivier
2020-09-01 14:09 ` [PULL 19/44] .mailmap: Update Paul Burton email address Laurent Vivier
2020-09-01 14:09 ` [PULL 20/44] hw/i2c: Fix typo in description Laurent Vivier
2020-09-01 14:09 ` [PULL 21/44] util/qemu-timer: " Laurent Vivier
2020-09-01 14:09 ` [PULL 22/44] util/vfio-helpers: " Laurent Vivier
2020-09-01 14:09 ` [PULL 23/44] mailmap: Add entry for Greg Kurz Laurent Vivier
2020-09-01 14:09 ` [PULL 24/44] docs/system/target-avr: Improve the AVR docs and add to MAINTAINERS Laurent Vivier
2020-09-01 14:09 ` [PULL 25/44] hw/ide/core: Trivial typo fix Laurent Vivier
2020-09-01 14:09 ` [PULL 26/44] hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE Laurent Vivier
2020-09-01 14:09 ` [PULL 27/44] hw/ide/atapi: " Laurent Vivier
2020-09-01 14:09 ` [PULL 28/44] hw/ide/pci: " Laurent Vivier
2020-09-01 14:09 ` [PULL 29/44] hw/scsi/scsi-disk: " Laurent Vivier
2020-09-01 14:09 ` [PULL 30/44] hw/net/xilinx_axienet: Remove unused code Laurent Vivier
2020-09-01 14:09 ` [PULL 31/44] util/vfio-helpers: Unify trace-events size format Laurent Vivier
2020-09-01 14:09 ` [PULL 32/44] linux-user: Add strace support for printing OFD fcntl operations Laurent Vivier
2020-09-01 14:09 ` [PULL 33/44] hw/arm/virt-acpi-build:Remove dead assignment in build_madt() Laurent Vivier
2020-09-01 14:09 ` [PULL 34/44] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read() Laurent Vivier
2020-09-01 14:09 ` [PULL 35/44] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli() Laurent Vivier
2020-09-01 14:09 ` [PULL 36/44] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16() Laurent Vivier
2020-09-01 14:09 ` [PULL 37/44] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions() Laurent Vivier
2020-09-01 14:09 ` [PULL 38/44] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check() Laurent Vivier
2020-09-01 14:09 ` [PULL 39/44] vfio/platform: Remove dead assignment in vfio_intp_interrupt() Laurent Vivier
2020-09-01 14:09 ` [PULL 40/44] usb/bus: Remove dead assignment in usb_get_fw_dev_path() Laurent Vivier
2020-09-01 14:09 ` [PULL 41/44] hw/intc: fix default registers value in exynos4210_combiner_read() Laurent Vivier
2020-09-01 14:09 ` [PULL 42/44] hw/display/vga:Remove redundant statement in vga_draw_graphic() Laurent Vivier
2020-09-01 14:09 ` [PULL 43/44] main-loop: Fix comment Laurent Vivier
2020-09-01 14:09 ` [PULL 44/44] docs/system: Fix grammar in documentation Laurent Vivier

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=20200901140954.889743-8-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=f4bug@amsat.org \
    --cc=liao.pingfang@zte.com.cn \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wang.yi59@zte.com.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).