{"id":2225344,"url":"http://patchwork.ozlabs.org/api/patches/2225344/?format=json","web_url":"http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260420212004.3938325-9-seanjc@google.com/","project":{"id":70,"url":"http://patchwork.ozlabs.org/api/projects/70/?format=json","name":"Linux KVM RISC-V","link_name":"kvm-riscv","list_id":"kvm-riscv.lists.infradead.org","list_email":"kvm-riscv@lists.infradead.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"http://lists.infradead.org/pipermail/kvm-riscv/","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260420212004.3938325-9-seanjc@google.com>","list_archive_url":null,"date":"2026-04-20T21:19:53","name":"[v3,08/19] KVM: selftests: Use u16 instead of uint16_t","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"94723715319700b1966c55518c68c6c4802bf326","submitter":{"id":81022,"url":"http://patchwork.ozlabs.org/api/people/81022/?format=json","name":"Sean Christopherson","email":"seanjc@google.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260420212004.3938325-9-seanjc@google.com/mbox/","series":[{"id":500685,"url":"http://patchwork.ozlabs.org/api/series/500685/?format=json","web_url":"http://patchwork.ozlabs.org/project/kvm-riscv/list/?series=500685","date":"2026-04-20T21:19:45","name":"KVM: selftests: Use kernel-style integer and g[vp]a_t types","version":3,"mbox":"http://patchwork.ozlabs.org/series/500685/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2225344/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2225344/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KDO7IRQc;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20251104 header.b=R81weWe+;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzz1J6SDNz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 07:20:52 +1000 (AEST)","from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wEw2y-00000007g9s-1Cdk;\n\tMon, 20 Apr 2026 21:20:48 +0000","from mail-pg1-x54a.google.com ([2607:f8b0:4864:20::54a])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wEw2Z-00000007ffk-1LZP\n\tfor kvm-riscv@lists.infradead.org;\n\tMon, 20 Apr 2026 21:20:31 +0000","by mail-pg1-x54a.google.com with SMTP id\n 41be03b00d2f7-c79907d4c57so375943a12.0\n        for <kvm-riscv@lists.infradead.org>;\n Mon, 20 Apr 2026 14:20:22 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help:\n\tList-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID\n\t:References:Mime-Version:In-Reply-To:Date:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=AwZr7eLrfaHrCDT7LjMqjvk/CIm7bjC2GVcBmnoQ3ts=; b=KDO7IRQc0C9fN7\n\titgsbXjM6QnF7AnhoKIKXCXEJTkGmiIWv3601cz14R2FAGnQf/rDzaXjqCrgKC8pK/CkKefSJ77MS\n\tCDGbfSfCWq2Z6f06B9Ll9rv2JaDUqjgK7F5hnQt6y2WJZCVzcKxh3d9YSiuHboeIIBxpAmKKeEXrR\n\tsJQEKYAmZurmTrKG/HaXILVSvu68URmBTcMNjSDKEKJ3Qx7OpPxjXrRvMesvUuhXxtygyualzhuU1\n\t9SMtKPduZB5bm7L4bHqEkDMtzQ7VQwAHAQN3uyGxrzFN2gL1SXSueJLQC8oplqcOe5gpuWNODG5Ls\n\teJxuY/DN2cD8NNwBb86g==;","v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=google.com; s=20251104; t=1776720022; x=1777324822;\n darn=lists.infradead.org;\n        h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n         :date:reply-to:from:to:cc:subject:date:message-id:reply-to;\n        bh=VsBM9gz9Yie/OJLkO0HZvINMCmSgzzZYsxZAlE1tm0I=;\n        b=R81weWe+OxrrF5t1e+hOQc/q5T/kXwquAi90I+1I4wsh2ifLi7K8bSMOmOVdzxsCb8\n         Sty5PFKZhn8fuubYC7/sopeBNCSNI7yNz32yNnTudc7VkdR9o5SUAptzvYhmG6nXmcrl\n         LAc6ScC/Ygc6s0Op3pORQEwSAv+hQu1XrW56zo/7PIaeazS8VXufeDyI8vwycr0XUMKJ\n         UeHC0TLwMi9baL7tnDDBbxEBdMQBbWWN3TaLKwodrnLqEJt0726Znb3VuBN4ulEoN+Oi\n         JOpYhUAaV7ecdSOwqg+iePEeS+SqewiKBaE685M40RcvYayFQlqlNGLkKj4cuWFb39nq\n         Yrig=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776720022; x=1777324822;\n        h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n         :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=VsBM9gz9Yie/OJLkO0HZvINMCmSgzzZYsxZAlE1tm0I=;\n        b=hvR2ZqT5I5InA15wRsXQEyocaCChlVNnSybnOVb3tobrCX2lyAzxvrcXaGlkunVgC4\n         bT8fZb0j/HbUk0S8i6OOfiJWnye9CS/9y3SAqvgNmsQxlZFzwdzR3YCoE8FJGcL4qtkN\n         ++KgajoxBvqhVKxvws1OJ6fh76eC7xgHndLCDuq/O7Ejn2k7eoomdIojzJM3skFFXwug\n         QAL5DR/INg+dHGb3C10um7ls2osqzTvWyV6YRCuYZ02ciEZv5efCmhDPp45OcQjGgLAI\n         qUnzYGNpmrf1QiBjWGtGBPN2FILb/rwwSbqzjOimlt0GE+I/pvyTAm3pnqIcY0vx+Jam\n         SAyw==","X-Forwarded-Encrypted":"i=1;\n AFNElJ9ImnFUY7v3MNI4o1AnXtHtsFHHqx0hHpnz7T40a/xM6HfV7Nt3Y4JuCpSoPfXh0A4q/yOtu3gffvU=@lists.infradead.org","X-Gm-Message-State":"AOJu0YxXKLSrneYttvHLZAMf62AkXzjX/0BVImBfUDngC5hXiJfuc/Cl\n\tJVfhjo83vrGcAZwTAJ9zdDlxv2eIHAcGS7115ho7FIOb69+dU38E4LQ7NoTqEnGAWJ3Npu4dgIt\n\t/QItdEw==","X-Received":"from pfna24.prod.google.com ([2002:aa7:80d8:0:b0:82f:5576:285b])\n (user=seanjc job=prod-delivery.src-stubby-dispatcher) by\n 2002:a05:6a00:847:b0:82f:37e3:ae67\n with SMTP id d2e1a72fcca58-82f8c96288amr15742439b3a.27.1776720021487; Mon, 20\n Apr 2026 14:20:21 -0700 (PDT)","Date":"Mon, 20 Apr 2026 14:19:53 -0700","In-Reply-To":"<20260420212004.3938325-1-seanjc@google.com>","Mime-Version":"1.0","References":"<20260420212004.3938325-1-seanjc@google.com>","X-Mailer":"git-send-email 2.54.0.rc1.555.g9c883467ad-goog","Message-ID":"<20260420212004.3938325-9-seanjc@google.com>","Subject":"[PATCH v3 08/19] KVM: selftests: Use u16 instead of uint16_t","From":"Sean Christopherson <seanjc@google.com>","To":"Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>,\n\tOliver Upton <oupton@kernel.org>, Tianrui Zhao <zhaotianrui@loongson.cn>,\n\tBibo Mao <maobibo@loongson.cn>, Huacai Chen <chenhuacai@kernel.org>,\n\tAnup Patel <anup@brainfault.org>, Paul Walmsley <pjw@kernel.org>,\n\tPalmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>,\n\tChristian Borntraeger <borntraeger@linux.ibm.com>,\n Janosch Frank <frankja@linux.ibm.com>,\n\tClaudio Imbrenda <imbrenda@linux.ibm.com>,\n Sean Christopherson <seanjc@google.com>","Cc":"kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tkvmarm@lists.linux.dev, loongarch@lists.linux.dev,\n\tkvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, David Matlack <dmatlack@google.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20260420_142023_395344_C10519CC ","X-CRM114-Status":"GOOD (  16.74  )","X-Spam-Score":"-9.5 (---------)","X-Spam-Report":"Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  From: David Matlack <dmatlack@google.com> Use u16 instead\n   of uint16_t to make the KVM selftests code more concise and more similar to\n    the kernel (since selftests are primarily developed by kernel developers).    \n Content analysis details:   (-9.5 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2607:f8b0:4864:20:0:0:0:54a listed in]\n                             [list.dnswl.org]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -7.5 USER_IN_DEF_DKIM_WL    From: address is in the default DKIM welcome-list\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n -0.0 DKIMWL_WL_MED          DKIMwl.org - Medium trust sender","X-BeenThere":"kvm-riscv@lists.infradead.org","X-Mailman-Version":"2.1.34","Precedence":"list","List-Id":"<kvm-riscv.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/kvm-riscv/>","List-Post":"<mailto:kvm-riscv@lists.infradead.org>","List-Help":"<mailto:kvm-riscv-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe>","Reply-To":"Sean Christopherson <seanjc@google.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"kvm-riscv\" <kvm-riscv-bounces@lists.infradead.org>","Errors-To":"kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"From: David Matlack <dmatlack@google.com>\n\nUse u16 instead of uint16_t to make the KVM selftests code more concise\nand more similar to the kernel (since selftests are primarily developed\nby kernel developers).\n\nThis commit was generated with the following command:\n\n  git ls-files tools/testing/selftests/kvm | xargs sed -i 's/uint16_t/u16/g'\n\nThen by manually adjusting whitespace to make checkpatch.pl happy.\n\nNo functional change intended.\n\nSigned-off-by: David Matlack <dmatlack@google.com>\nSigned-off-by: Sean Christopherson <seanjc@google.com>\n---\n .../selftests/kvm/arm64/page_fault_test.c     |  2 +-\n .../testing/selftests/kvm/include/kvm_util.h  |  2 +-\n .../testing/selftests/kvm/include/x86/evmcs.h |  2 +-\n .../selftests/kvm/include/x86/processor.h     | 58 +++++++++----------\n .../testing/selftests/kvm/lib/guest_sprintf.c |  2 +-\n .../testing/selftests/kvm/lib/x86/processor.c |  8 +--\n tools/testing/selftests/kvm/lib/x86/ucall.c   |  2 +-\n tools/testing/selftests/kvm/lib/x86/vmx.c     |  2 +-\n tools/testing/selftests/kvm/s390/memop.c      |  2 +-\n .../testing/selftests/kvm/x86/fastops_test.c  |  2 +-\n .../selftests/kvm/x86/sync_regs_test.c        |  2 +-\n 11 files changed, 42 insertions(+), 42 deletions(-)","diff":"diff --git a/tools/testing/selftests/kvm/arm64/page_fault_test.c b/tools/testing/selftests/kvm/arm64/page_fault_test.c\nindex cb52ac8aa0a5..b92a9614d7d2 100644\n--- a/tools/testing/selftests/kvm/arm64/page_fault_test.c\n+++ b/tools/testing/selftests/kvm/arm64/page_fault_test.c\n@@ -148,7 +148,7 @@ static void guest_at(void)\n  */\n static void guest_dc_zva(void)\n {\n-\tuint16_t val;\n+\tu16 val;\n \n \tasm volatile(\"dc zva, %0\" :: \"r\" (guest_test_memory));\n \tdsb(ish);\ndiff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h\nindex bdb91f627433..34c8a7d94997 100644\n--- a/tools/testing/selftests/kvm/include/kvm_util.h\n+++ b/tools/testing/selftests/kvm/include/kvm_util.h\n@@ -216,7 +216,7 @@ struct vm_shape {\n \tu32 type;\n \tuint8_t  mode;\n \tuint8_t  pad0;\n-\tuint16_t pad1;\n+\tu16 pad1;\n };\n \n kvm_static_assert(sizeof(struct vm_shape) == sizeof(u64));\ndiff --git a/tools/testing/selftests/kvm/include/x86/evmcs.h b/tools/testing/selftests/kvm/include/x86/evmcs.h\nindex 3b0f96b881f9..be79bda024bf 100644\n--- a/tools/testing/selftests/kvm/include/x86/evmcs.h\n+++ b/tools/testing/selftests/kvm/include/x86/evmcs.h\n@@ -10,7 +10,7 @@\n #include \"hyperv.h\"\n #include \"vmx.h\"\n \n-#define u16 uint16_t\n+#define u16 u16\n #define u32 u32\n #define u64 u64\n \ndiff --git a/tools/testing/selftests/kvm/include/x86/processor.h b/tools/testing/selftests/kvm/include/x86/processor.h\nindex 3898665ad2e9..8700d37a5727 100644\n--- a/tools/testing/selftests/kvm/include/x86/processor.h\n+++ b/tools/testing/selftests/kvm/include/x86/processor.h\n@@ -399,8 +399,8 @@ struct gpr64_regs {\n };\n \n struct desc64 {\n-\tuint16_t limit0;\n-\tuint16_t base0;\n+\tu16 limit0;\n+\tu16 base0;\n \tunsigned base1:8, type:4, s:1, dpl:2, p:1;\n \tunsigned limit1:4, avl:1, l:1, db:1, g:1, base2:8;\n \tu32 base3;\n@@ -408,7 +408,7 @@ struct desc64 {\n } __attribute__((packed));\n \n struct desc_ptr {\n-\tuint16_t size;\n+\tu16 size;\n \tu64 address;\n } __attribute__((packed));\n \n@@ -476,9 +476,9 @@ static inline void wrmsr(u32 msr, u64 value)\n }\n \n \n-static inline uint16_t inw(uint16_t port)\n+static inline u16 inw(u16 port)\n {\n-\tuint16_t tmp;\n+\tu16 tmp;\n \n \t__asm__ __volatile__(\"in %%dx, %%ax\"\n \t\t: /* output */ \"=a\" (tmp)\n@@ -487,63 +487,63 @@ static inline uint16_t inw(uint16_t port)\n \treturn tmp;\n }\n \n-static inline uint16_t get_es(void)\n+static inline u16 get_es(void)\n {\n-\tuint16_t es;\n+\tu16 es;\n \n \t__asm__ __volatile__(\"mov %%es, %[es]\"\n \t\t\t     : /* output */ [es]\"=rm\"(es));\n \treturn es;\n }\n \n-static inline uint16_t get_cs(void)\n+static inline u16 get_cs(void)\n {\n-\tuint16_t cs;\n+\tu16 cs;\n \n \t__asm__ __volatile__(\"mov %%cs, %[cs]\"\n \t\t\t     : /* output */ [cs]\"=rm\"(cs));\n \treturn cs;\n }\n \n-static inline uint16_t get_ss(void)\n+static inline u16 get_ss(void)\n {\n-\tuint16_t ss;\n+\tu16 ss;\n \n \t__asm__ __volatile__(\"mov %%ss, %[ss]\"\n \t\t\t     : /* output */ [ss]\"=rm\"(ss));\n \treturn ss;\n }\n \n-static inline uint16_t get_ds(void)\n+static inline u16 get_ds(void)\n {\n-\tuint16_t ds;\n+\tu16 ds;\n \n \t__asm__ __volatile__(\"mov %%ds, %[ds]\"\n \t\t\t     : /* output */ [ds]\"=rm\"(ds));\n \treturn ds;\n }\n \n-static inline uint16_t get_fs(void)\n+static inline u16 get_fs(void)\n {\n-\tuint16_t fs;\n+\tu16 fs;\n \n \t__asm__ __volatile__(\"mov %%fs, %[fs]\"\n \t\t\t     : /* output */ [fs]\"=rm\"(fs));\n \treturn fs;\n }\n \n-static inline uint16_t get_gs(void)\n+static inline u16 get_gs(void)\n {\n-\tuint16_t gs;\n+\tu16 gs;\n \n \t__asm__ __volatile__(\"mov %%gs, %[gs]\"\n \t\t\t     : /* output */ [gs]\"=rm\"(gs));\n \treturn gs;\n }\n \n-static inline uint16_t get_tr(void)\n+static inline u16 get_tr(void)\n {\n-\tuint16_t tr;\n+\tu16 tr;\n \n \t__asm__ __volatile__(\"str %[tr]\"\n \t\t\t     : /* output */ [tr]\"=rm\"(tr));\n@@ -651,7 +651,7 @@ static inline struct desc_ptr get_idt(void)\n \treturn idt;\n }\n \n-static inline void outl(uint16_t port, u32 value)\n+static inline void outl(u16 port, u32 value)\n {\n \t__asm__ __volatile__(\"outl %%eax, %%dx\" : : \"d\"(port), \"a\"(value));\n }\n@@ -1194,15 +1194,15 @@ struct ex_regs {\n };\n \n struct idt_entry {\n-\tuint16_t offset0;\n-\tuint16_t selector;\n-\tuint16_t ist : 3;\n-\tuint16_t : 5;\n-\tuint16_t type : 4;\n-\tuint16_t : 1;\n-\tuint16_t dpl : 2;\n-\tuint16_t p : 1;\n-\tuint16_t offset1;\n+\tu16 offset0;\n+\tu16 selector;\n+\tu16 ist : 3;\n+\tu16 : 5;\n+\tu16 type : 4;\n+\tu16 : 1;\n+\tu16 dpl : 2;\n+\tu16 p : 1;\n+\tu16 offset1;\n \tu32 offset2; u32 reserved;\n };\n \ndiff --git a/tools/testing/selftests/kvm/lib/guest_sprintf.c b/tools/testing/selftests/kvm/lib/guest_sprintf.c\nindex 551ad6c658aa..8d60aa81e27e 100644\n--- a/tools/testing/selftests/kvm/lib/guest_sprintf.c\n+++ b/tools/testing/selftests/kvm/lib/guest_sprintf.c\n@@ -286,7 +286,7 @@ int guest_vsnprintf(char *buf, int n, const char *fmt, va_list args)\n \t\tif (qualifier == 'l')\n \t\t\tnum = va_arg(args, u64);\n \t\telse if (qualifier == 'h') {\n-\t\t\tnum = (uint16_t)va_arg(args, int);\n+\t\t\tnum = (u16)va_arg(args, int);\n \t\t\tif (flags & SIGN)\n \t\t\t\tnum = (int16_t)num;\n \t\t} else if (flags & SIGN)\ndiff --git a/tools/testing/selftests/kvm/lib/x86/processor.c b/tools/testing/selftests/kvm/lib/x86/processor.c\nindex dc31236b004b..8e6393384fa4 100644\n--- a/tools/testing/selftests/kvm/lib/x86/processor.c\n+++ b/tools/testing/selftests/kvm/lib/x86/processor.c\n@@ -424,7 +424,7 @@ void virt_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent)\n \t\t\"addr         w exec dirty\\n\",\n \t\tindent, \"\");\n \tpml4e_start = (u64 *)addr_gpa2hva(vm, mmu->pgd);\n-\tfor (uint16_t n1 = 0; n1 <= 0x1ffu; n1++) {\n+\tfor (u16 n1 = 0; n1 <= 0x1ffu; n1++) {\n \t\tpml4e = &pml4e_start[n1];\n \t\tif (!is_present_pte(mmu, pml4e))\n \t\t\tcontinue;\n@@ -436,7 +436,7 @@ void virt_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent)\n \t\t\tis_writable_pte(mmu, pml4e), is_nx_pte(mmu, pml4e));\n \n \t\tpdpe_start = addr_gpa2hva(vm, *pml4e & PHYSICAL_PAGE_MASK);\n-\t\tfor (uint16_t n2 = 0; n2 <= 0x1ffu; n2++) {\n+\t\tfor (u16 n2 = 0; n2 <= 0x1ffu; n2++) {\n \t\t\tpdpe = &pdpe_start[n2];\n \t\t\tif (!is_present_pte(mmu, pdpe))\n \t\t\t\tcontinue;\n@@ -449,7 +449,7 @@ void virt_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent)\n \t\t\t\tis_nx_pte(mmu, pdpe));\n \n \t\t\tpde_start = addr_gpa2hva(vm, *pdpe & PHYSICAL_PAGE_MASK);\n-\t\t\tfor (uint16_t n3 = 0; n3 <= 0x1ffu; n3++) {\n+\t\t\tfor (u16 n3 = 0; n3 <= 0x1ffu; n3++) {\n \t\t\t\tpde = &pde_start[n3];\n \t\t\t\tif (!is_present_pte(mmu, pde))\n \t\t\t\t\tcontinue;\n@@ -461,7 +461,7 @@ void virt_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent)\n \t\t\t\t\tis_nx_pte(mmu, pde));\n \n \t\t\t\tpte_start = addr_gpa2hva(vm, *pde & PHYSICAL_PAGE_MASK);\n-\t\t\t\tfor (uint16_t n4 = 0; n4 <= 0x1ffu; n4++) {\n+\t\t\t\tfor (u16 n4 = 0; n4 <= 0x1ffu; n4++) {\n \t\t\t\t\tpte = &pte_start[n4];\n \t\t\t\t\tif (!is_present_pte(mmu, pte))\n \t\t\t\t\t\tcontinue;\ndiff --git a/tools/testing/selftests/kvm/lib/x86/ucall.c b/tools/testing/selftests/kvm/lib/x86/ucall.c\nindex 1af2a6880cdf..e7dd5791959b 100644\n--- a/tools/testing/selftests/kvm/lib/x86/ucall.c\n+++ b/tools/testing/selftests/kvm/lib/x86/ucall.c\n@@ -6,7 +6,7 @@\n  */\n #include \"kvm_util.h\"\n \n-#define UCALL_PIO_PORT ((uint16_t)0x1000)\n+#define UCALL_PIO_PORT ((u16)0x1000)\n \n void ucall_arch_do_ucall(gva_t uc)\n {\ndiff --git a/tools/testing/selftests/kvm/lib/x86/vmx.c b/tools/testing/selftests/kvm/lib/x86/vmx.c\nindex 73b7faa7f357..b2f83c3f7f16 100644\n--- a/tools/testing/selftests/kvm/lib/x86/vmx.c\n+++ b/tools/testing/selftests/kvm/lib/x86/vmx.c\n@@ -27,7 +27,7 @@ struct hv_vp_assist_page *current_vp_assist;\n \n int vcpu_enable_evmcs(struct kvm_vcpu *vcpu)\n {\n-\tuint16_t evmcs_ver;\n+\tu16 evmcs_ver;\n \n \tvcpu_enable_cap(vcpu, KVM_CAP_HYPERV_ENLIGHTENED_VMCS,\n \t\t\t(unsigned long)&evmcs_ver);\ndiff --git a/tools/testing/selftests/kvm/s390/memop.c b/tools/testing/selftests/kvm/s390/memop.c\nindex 1cd7b8f81fff..aa92fdf0664d 100644\n--- a/tools/testing/selftests/kvm/s390/memop.c\n+++ b/tools/testing/selftests/kvm/s390/memop.c\n@@ -485,7 +485,7 @@ static __uint128_t cut_to_size(int size, __uint128_t val)\n \tcase 1:\n \t\treturn (uint8_t)val;\n \tcase 2:\n-\t\treturn (uint16_t)val;\n+\t\treturn (u16)val;\n \tcase 4:\n \t\treturn (u32)val;\n \tcase 8:\ndiff --git a/tools/testing/selftests/kvm/x86/fastops_test.c b/tools/testing/selftests/kvm/x86/fastops_test.c\nindex a634bc281546..721f56d38f49 100644\n--- a/tools/testing/selftests/kvm/x86/fastops_test.c\n+++ b/tools/testing/selftests/kvm/x86/fastops_test.c\n@@ -186,7 +186,7 @@ if (sizeof(type_t) != 1) {\t\t\t\t\t\t\t\\\n static void guest_code(void)\n {\n \tguest_test_fastops(uint8_t, \"b\");\n-\tguest_test_fastops(uint16_t, \"w\");\n+\tguest_test_fastops(u16, \"w\");\n \tguest_test_fastops(u32, \"l\");\n \tguest_test_fastops(u64, \"q\");\n \ndiff --git a/tools/testing/selftests/kvm/x86/sync_regs_test.c b/tools/testing/selftests/kvm/x86/sync_regs_test.c\nindex 8fa3948b0170..e0c52321f87c 100644\n--- a/tools/testing/selftests/kvm/x86/sync_regs_test.c\n+++ b/tools/testing/selftests/kvm/x86/sync_regs_test.c\n@@ -20,7 +20,7 @@\n #include \"kvm_util.h\"\n #include \"processor.h\"\n \n-#define UCALL_PIO_PORT ((uint16_t)0x1000)\n+#define UCALL_PIO_PORT ((u16)0x1000)\n \n struct ucall uc_none = {\n \t.cmd = UCALL_NONE,\n","prefixes":["v3","08/19"]}