All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: peter.maydell@linaro.org, qemu-devel@nongnu.org
Cc: "Klaus Jensen" <its@irrelevant.dk>,
	"Keith Busch" <kbusch@kernel.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-block@nongnu.org, "Klaus Jensen" <k.jensen@samsung.com>
Subject: [PULL 05/30] hw/block/nvme: alignment style fixes
Date: Tue, 27 Oct 2020 11:49:07 +0100	[thread overview]
Message-ID: <20201027104932.558087-6-its@irrelevant.dk> (raw)
In-Reply-To: <20201027104932.558087-1-its@irrelevant.dk>

From: Klaus Jensen <k.jensen@samsung.com>

Style fixes.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
---
 hw/block/nvme.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 0ac9d856632e..d6d8324fa1de 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -634,7 +634,7 @@ static void nvme_rw_cb(void *opaque, int ret)
 static uint16_t nvme_flush(NvmeCtrl *n, NvmeRequest *req)
 {
     block_acct_start(blk_get_stats(n->conf.blk), &req->acct, 0,
-         BLOCK_ACCT_FLUSH);
+                     BLOCK_ACCT_FLUSH);
     req->aiocb = blk_aio_flush(n->conf.blk, nvme_rw_cb, req);
 
     return NVME_NO_COMPLETE;
@@ -663,7 +663,7 @@ static uint16_t nvme_write_zeroes(NvmeCtrl *n, NvmeRequest *req)
     block_acct_start(blk_get_stats(n->conf.blk), &req->acct, 0,
                      BLOCK_ACCT_WRITE);
     req->aiocb = blk_aio_pwrite_zeroes(n->conf.blk, offset, count,
-                                        BDRV_REQ_MAY_UNMAP, nvme_rw_cb, req);
+                                       BDRV_REQ_MAY_UNMAP, nvme_rw_cb, req);
     return NVME_NO_COMPLETE;
 }
 
@@ -803,7 +803,7 @@ static uint16_t nvme_del_sq(NvmeCtrl *n, NvmeRequest *req)
 }
 
 static void nvme_init_sq(NvmeSQueue *sq, NvmeCtrl *n, uint64_t dma_addr,
-    uint16_t sqid, uint16_t cqid, uint16_t size)
+                         uint16_t sqid, uint16_t cqid, uint16_t size)
 {
     int i;
     NvmeCQueue *cq;
@@ -1058,7 +1058,8 @@ static uint16_t nvme_del_cq(NvmeCtrl *n, NvmeRequest *req)
 }
 
 static void nvme_init_cq(NvmeCQueue *cq, NvmeCtrl *n, uint64_t dma_addr,
-    uint16_t cqid, uint16_t vector, uint16_t size, uint16_t irq_enabled)
+                         uint16_t cqid, uint16_t vector, uint16_t size,
+                         uint16_t irq_enabled)
 {
     int ret;
 
@@ -1118,7 +1119,7 @@ static uint16_t nvme_create_cq(NvmeCtrl *n, NvmeRequest *req)
 
     cq = g_malloc0(sizeof(*cq));
     nvme_init_cq(cq, n, prp1, cqid, vector, qsize + 1,
-        NVME_CQ_FLAGS_IEN(qflags));
+                 NVME_CQ_FLAGS_IEN(qflags));
 
     /*
      * It is only required to set qs_created when creating a completion queue;
@@ -1515,7 +1516,7 @@ static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeRequest *req)
         }
 
         if (((n->temperature >= n->features.temp_thresh_hi) ||
-            (n->temperature <= n->features.temp_thresh_low)) &&
+             (n->temperature <= n->features.temp_thresh_low)) &&
             NVME_AEC_SMART(n->features.async_config) & NVME_SMART_TEMPERATURE) {
             nvme_enqueue_event(n, NVME_AER_TYPE_SMART,
                                NVME_AER_INFO_SMART_TEMP_THRESH,
@@ -1765,9 +1766,9 @@ static int nvme_start_ctrl(NvmeCtrl *n)
     n->cqe_size = 1 << NVME_CC_IOCQES(n->bar.cc);
     n->sqe_size = 1 << NVME_CC_IOSQES(n->bar.cc);
     nvme_init_cq(&n->admin_cq, n, n->bar.acq, 0, 0,
-        NVME_AQA_ACQS(n->bar.aqa) + 1, 1);
+                 NVME_AQA_ACQS(n->bar.aqa) + 1, 1);
     nvme_init_sq(&n->admin_sq, n, n->bar.asq, 0, 0,
-        NVME_AQA_ASQS(n->bar.aqa) + 1);
+                 NVME_AQA_ASQS(n->bar.aqa) + 1);
 
     nvme_set_timestamp(n, 0ULL);
 
@@ -1777,7 +1778,7 @@ static int nvme_start_ctrl(NvmeCtrl *n)
 }
 
 static void nvme_write_bar(NvmeCtrl *n, hwaddr offset, uint64_t data,
-    unsigned size)
+                           unsigned size)
 {
     if (unlikely(offset & (sizeof(uint32_t) - 1))) {
         NVME_GUEST_ERR(pci_nvme_ub_mmiowr_misaligned32,
@@ -1920,7 +1921,7 @@ static void nvme_write_bar(NvmeCtrl *n, hwaddr offset, uint64_t data,
                        "invalid write to PMRSWTP register, ignored");
         return;
     case 0xE14: /* TODO PMRMSC */
-         break;
+        break;
     default:
         NVME_GUEST_ERR(pci_nvme_ub_mmiowr_invalid,
                        "invalid MMIO write,"
@@ -2096,7 +2097,7 @@ static void nvme_process_db(NvmeCtrl *n, hwaddr addr, int val)
 }
 
 static void nvme_mmio_write(void *opaque, hwaddr addr, uint64_t data,
-    unsigned size)
+                            unsigned size)
 {
     NvmeCtrl *n = (NvmeCtrl *)opaque;
 
@@ -2120,7 +2121,7 @@ static const MemoryRegionOps nvme_mmio_ops = {
 };
 
 static void nvme_cmb_write(void *opaque, hwaddr addr, uint64_t data,
-    unsigned size)
+                           unsigned size)
 {
     NvmeCtrl *n = (NvmeCtrl *)opaque;
     stn_le_p(&n->cmbuf[addr], size, data);
-- 
2.29.1



  parent reply	other threads:[~2020-10-27 10:57 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 10:49 [PULL 00/30] nvme emulation patches for 5.2 Klaus Jensen
2020-10-27 10:49 ` [PULL 01/30] hw/block/nvme: fix typo in trace event Klaus Jensen
2020-10-27 10:49 ` [PULL 02/30] pci: pass along the return value of dma_memory_rw Klaus Jensen
2020-10-27 11:10   ` Klaus Jensen
2020-10-27 10:49 ` [PULL 03/30] hw/block/nvme: handle dma errors Klaus Jensen
2020-10-27 10:49 ` [PULL 04/30] hw/block/nvme: commonize nvme_rw error handling Klaus Jensen
2020-10-27 10:49 ` Klaus Jensen [this message]
2020-10-27 10:49 ` [PULL 06/30] hw/block/nvme: add a lba to bytes helper Klaus Jensen
2020-10-27 10:49 ` [PULL 07/30] hw/block/nvme: fix endian conversion Klaus Jensen
2020-10-27 10:49 ` [PULL 08/30] hw/block/nvme: add symbolic command name to trace events Klaus Jensen
2020-10-27 10:49 ` [PULL 09/30] hw/block/nvme: refactor aio submission Klaus Jensen
2020-10-27 10:49 ` [PULL 10/30] hw/block/nvme: default request status to success Klaus Jensen
2020-10-27 10:49 ` [PULL 11/30] hw/block/nvme: harden cmb access Klaus Jensen
2020-10-27 10:49 ` [PULL 12/30] hw/block/nvme: add support for scatter gather lists Klaus Jensen
2020-11-04  9:44   ` Max Reitz
2020-10-27 10:49 ` [PULL 13/30] hw/block/nvme: add support for sgl bit bucket descriptor Klaus Jensen
2020-10-27 10:49 ` [PULL 14/30] hw/block/nvme: refactor identify active namespace id list Klaus Jensen
2020-10-27 10:49 ` [PULL 15/30] hw/block/nvme: support multiple namespaces Klaus Jensen
2020-11-04 10:06   ` Max Reitz
2020-10-27 10:49 ` [PULL 16/30] pci: allocate pci id for nvme Klaus Jensen
2020-10-27 10:49 ` [PULL 17/30] hw/block/nvme: change controller pci id Klaus Jensen
2020-10-27 10:49 ` [PULL 18/30] hw/block/nvme: update nsid when registered Klaus Jensen
2020-11-04  9:32   ` Max Reitz
2020-11-04  9:52     ` Klaus Jensen
2020-10-27 10:49 ` [PULL 19/30] hw/block/nvme: remove pointless rw indirection Klaus Jensen
2020-10-27 10:49 ` [PULL 20/30] hw/block/nvme: fix log page offset check Klaus Jensen
2020-10-27 10:49 ` [PULL 21/30] hw/block/nvme: support per-namespace smart log Klaus Jensen
2020-10-27 10:49 ` [PULL 22/30] hw/block/nvme: validate command set selected Klaus Jensen
2020-10-27 10:49 ` [PULL 23/30] hw/block/nvme: support for admin-only command set Klaus Jensen
2020-10-27 10:49 ` [PULL 24/30] hw/block/nvme: reject io commands if only admin command set selected Klaus Jensen
2020-10-27 10:49 ` [PULL 25/30] hw/block/nvme: add nsid to get/setfeat trace events Klaus Jensen
2020-10-27 10:49 ` [PULL 26/30] hw/block/nvme: add trace event for requests with non-zero status code Klaus Jensen
2020-10-27 10:49 ` [PULL 27/30] hw/block/nvme: report actual LBA data shift in LBAF Klaus Jensen
2020-10-27 10:49 ` [PULL 28/30] hw/block/nvme: fix prp mapping status codes Klaus Jensen
2020-10-27 10:49 ` [PULL 29/30] hw/block/nvme: fix create IO SQ/CQ " Klaus Jensen
2020-10-27 10:49 ` [PULL 30/30] hw/block/nvme: fix queue identifer validation Klaus Jensen
2020-10-29 11:39 ` [PULL 00/30] nvme emulation patches for 5.2 Peter Maydell
2020-10-29 11:52   ` Klaus Jensen
2020-10-29 12:20     ` Philippe Mathieu-Daudé
2020-10-29 13:14       ` Klaus Jensen

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=20201027104932.558087-6-its@irrelevant.dk \
    --to=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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.