All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <luben.tuikov@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Alex Deucher <Alexander.Deucher@amd.com>,
	Tom StDenis <tom.stdenis@amd.com>,
	Luben Tuikov <luben.tuikov@amd.com>
Subject: [PATCH v1 3/4] umr: Consistent indentation in switch
Date: Fri, 11 Mar 2022 19:52:05 -0500	[thread overview]
Message-ID: <20220312005206.26588-3-luben.tuikov@amd.com> (raw)
In-Reply-To: <20220312005206.26588-1-luben.tuikov@amd.com>

A mix of multiple spaces and TAB char was being used in this switch. This
commit makes the usage of indent chars consistent, i.e. leading-TAB only.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Tom StDenis <tom.stdenis@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Tom StDenis <tom.stdenis@amd.com>
---
 src/lib/ih_decode_vectors.c | 80 ++++++++++++++++++-------------------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/src/lib/ih_decode_vectors.c b/src/lib/ih_decode_vectors.c
index bb9764bb01783d..ed5705059c542f 100644
--- a/src/lib/ih_decode_vectors.c
+++ b/src/lib/ih_decode_vectors.c
@@ -41,48 +41,48 @@ int umr_ih_decode_vectors(struct umr_asic *asic, struct umr_ih_decode_ui *ui, ui
 	uint32_t off = 0;
 
 	switch (asic->family) {
-		case FAMILY_VI: // oss30
-			while (length) {
-				ui->start_vector(ui, off);
-				ui->add_field(ui, off + 0, "SourceID",   BITS(ih_data[off + 0], 0, 8), NULL, 10); // TODO: add ID to name translation
-				ui->add_field(ui, off + 1, "SourceData", BITS(ih_data[off + 1], 0, 24), NULL, 16);
-				ui->add_field(ui, off + 2, "VMID",       BITS(ih_data[off + 2], 8, 16), NULL, 10);
-				ui->add_field(ui, off + 2, "PASID",      BITS(ih_data[off + 2], 16, 32), NULL, 10);
-				ui->add_field(ui, off + 3, "ContextID0", ih_data[off + 3], NULL, 16);
-				ui->done(ui);
-				length -= 16;
-				off += 4;
-			}
-			return off / 4;
+	case FAMILY_VI: // oss30
+		while (length) {
+			ui->start_vector(ui, off);
+			ui->add_field(ui, off + 0, "SourceID",   BITS(ih_data[off + 0], 0, 8), NULL, 10); // TODO: add ID to name translation
+			ui->add_field(ui, off + 1, "SourceData", BITS(ih_data[off + 1], 0, 24), NULL, 16);
+			ui->add_field(ui, off + 2, "VMID",       BITS(ih_data[off + 2], 8, 16), NULL, 10);
+			ui->add_field(ui, off + 2, "PASID",      BITS(ih_data[off + 2], 16, 32), NULL, 10);
+			ui->add_field(ui, off + 3, "ContextID0", ih_data[off + 3], NULL, 16);
+			ui->done(ui);
+			length -= 16;
+			off += 4;
+		}
+		return off / 4;
 
-		case FAMILY_NV: // oss40/50
-		case FAMILY_AI:
-			while (length) {
-				ui->start_vector(ui, off);
-				ui->add_field(ui, off + 0, "ClientID", BITS(ih_data[off + 0], 0, 8), NULL, 10); // TODO: add ID to name translation
-				ui->add_field(ui, off + 0, "SourceID", BITS(ih_data[off + 0], 8, 16), NULL, 10); // TODO: add ID to name translation
-				ui->add_field(ui, off + 0, "RingID",   BITS(ih_data[off + 0], 16, 24), NULL, 10);
-				ui->add_field(ui, off + 0, "VMID",     BITS(ih_data[off + 0], 24, 28), NULL, 10);
-				ui->add_field(ui, off + 0, "VMID_TYPE", BITS(ih_data[off + 0], 31, 32), NULL, 10);
-				ui->add_field(ui, off + 1, "Timestamp", ih_data[off + 1] + ((uint64_t)BITS(ih_data[off+2], 0, 16) << 32), NULL, 10);
-				ui->add_field(ui, off + 2, "Timestamp_SRC", BITS(ih_data[off + 2], 31, 32), NULL, 10);
-				ui->add_field(ui, off + 3, "PASID", BITS(ih_data[off + 3], 0, 16), NULL, 16);
-				ui->add_field(ui, off + 4, "ContextID0", ih_data[off + 4], NULL, 16);
-				ui->add_field(ui, off + 5, "ContextID1", ih_data[off + 5], NULL, 16);
-				ui->add_field(ui, off + 6, "ContextID2", ih_data[off + 6], NULL, 16);
-				ui->add_field(ui, off + 7, "ContextID3", ih_data[off + 7], NULL, 16);
-				ui->done(ui);
-				length -= 32;
-				off += 8;
-			}
-			return off / 8;
+	case FAMILY_NV: // oss40/50
+	case FAMILY_AI:
+		while (length) {
+			ui->start_vector(ui, off);
+			ui->add_field(ui, off + 0, "ClientID", BITS(ih_data[off + 0], 0, 8), NULL, 10); // TODO: add ID to name translation
+			ui->add_field(ui, off + 0, "SourceID", BITS(ih_data[off + 0], 8, 16), NULL, 10); // TODO: add ID to name translation
+			ui->add_field(ui, off + 0, "RingID",   BITS(ih_data[off + 0], 16, 24), NULL, 10);
+			ui->add_field(ui, off + 0, "VMID",     BITS(ih_data[off + 0], 24, 28), NULL, 10);
+			ui->add_field(ui, off + 0, "VMID_TYPE", BITS(ih_data[off + 0], 31, 32), NULL, 10);
+			ui->add_field(ui, off + 1, "Timestamp", ih_data[off + 1] + ((uint64_t)BITS(ih_data[off+2], 0, 16) << 32), NULL, 10);
+			ui->add_field(ui, off + 2, "Timestamp_SRC", BITS(ih_data[off + 2], 31, 32), NULL, 10);
+			ui->add_field(ui, off + 3, "PASID", BITS(ih_data[off + 3], 0, 16), NULL, 16);
+			ui->add_field(ui, off + 4, "ContextID0", ih_data[off + 4], NULL, 16);
+			ui->add_field(ui, off + 5, "ContextID1", ih_data[off + 5], NULL, 16);
+			ui->add_field(ui, off + 6, "ContextID2", ih_data[off + 6], NULL, 16);
+			ui->add_field(ui, off + 7, "ContextID3", ih_data[off + 7], NULL, 16);
+			ui->done(ui);
+			length -= 32;
+			off += 8;
+		}
+		return off / 8;
 
-			case FAMILY_CONFIGURE:
-			case FAMILY_SI:
-			case FAMILY_CIK:
-			case FAMILY_NPI:
-				asic->err_msg("[BUG]: unhandled family case in umr_ih_decode_vectors()\n");
-				return -1;
+	case FAMILY_CONFIGURE:
+	case FAMILY_SI:
+	case FAMILY_CIK:
+	case FAMILY_NPI:
+		asic->err_msg("[BUG]: unhandled family case in umr_ih_decode_vectors()\n");
+		return -1;
 	}
 	return 0;
 }
-- 
2.35.1.291.gdab1b7905d


  parent reply	other threads:[~2022-03-12  0:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12  0:52 [PATCH v1 1/4] umr: Print errors to stderr Luben Tuikov
2022-03-12  0:52 ` [PATCH v1 2/4] umr: Fix ring-stream segmentation fault Luben Tuikov
2022-03-12  0:52 ` Luben Tuikov [this message]
2022-03-12  0:52 ` [PATCH v1 4/4] umr: Fix unhandled enumeration value in switch Luben Tuikov

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=20220312005206.26588-3-luben.tuikov@amd.com \
    --to=luben.tuikov@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=tom.stdenis@amd.com \
    /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.