[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] types: replace remaining uses of s16
commit 5ffe6d4a02e03838b7b910f80e6137e68b8bfcdb Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Sep 12 14:01:42 2024 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Sep 12 14:01:42 2024 +0200 types: replace remaining uses of s16 ... and move the type itself to linux-compat.h. While doing so switch an adjacent x86 struct page_info field to bool. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/arm/arm32/livepatch.c | 2 +- xen/arch/arm/arm64/livepatch.c | 2 +- xen/arch/x86/include/asm/irq.h | 4 ++-- xen/arch/x86/include/asm/mm.h | 4 ++-- xen/common/grant_table.c | 8 ++++---- xen/drivers/passthrough/arm/smmu.c | 1 + xen/include/xen/linux-compat.h | 2 +- xen/include/xen/types.h | 1 - 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/xen/arch/arm/arm32/livepatch.c b/xen/arch/arm/arm32/livepatch.c index 80d2659b78..8b9777bf1f 100644 --- a/xen/arch/arm/arm32/livepatch.c +++ b/xen/arch/arm/arm32/livepatch.c @@ -135,7 +135,7 @@ static s32 get_addend(unsigned char type, void *dest) addend = (*(u32 *)dest & 0x00000FFF); addend |= (*(u32 *)dest & 0x000F0000) >> 4; /* Addend is to sign-extend ([19:16],[11:0]). */ - addend = (s16)addend; + addend = (int16_t)addend; break; case R_ARM_CALL: diff --git a/xen/arch/arm/arm64/livepatch.c b/xen/arch/arm/arm64/livepatch.c index df2cebedde..5ffcbc02a9 100644 --- a/xen/arch/arm/arm64/livepatch.c +++ b/xen/arch/arm/arm64/livepatch.c @@ -124,7 +124,7 @@ static int reloc_data(enum aarch64_reloc_op op, void *place, u64 val, int len) switch ( len ) { case 16: - *(s16 *)place = sval; + *(int16_t *)place = sval; if ( sval < INT16_MIN || sval > UINT16_MAX ) return -EOVERFLOW; break; diff --git a/xen/arch/x86/include/asm/irq.h b/xen/arch/x86/include/asm/irq.h index 5a8352a21e..d3bc768068 100644 --- a/xen/arch/x86/include/asm/irq.h +++ b/xen/arch/x86/include/asm/irq.h @@ -67,8 +67,8 @@ struct irq_desc; * the old destinations. */ struct arch_irq_desc { - s16 vector; /* vector itself is only 8 bits, */ - s16 old_vector; /* but we use -1 for unassigned */ + int16_t vector; /* vector itself is only 8 bits, */ + int16_t old_vector; /* but we use -1 for unassigned */ /* * Except for high priority interrupts @cpu_mask may have bits set for * offline CPUs. Consumers need to be careful to mask this down to diff --git a/xen/arch/x86/include/asm/mm.h b/xen/arch/x86/include/asm/mm.h index b3853ae734..6b5855e94d 100644 --- a/xen/arch/x86/include/asm/mm.h +++ b/xen/arch/x86/include/asm/mm.h @@ -286,8 +286,8 @@ struct page_info struct { u16 nr_validated_ptes:PAGETABLE_ORDER + 1; u16 :16 - PAGETABLE_ORDER - 1 - 1; - u16 partial_flags:1; - s16 linear_pt_count; + bool partial_flags:1; + int16_t linear_pt_count; }; /* diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index ab36f45ded..6c77867f8c 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -1390,7 +1390,7 @@ unmap_common( struct grant_table *lgt, *rgt; grant_ref_t ref; struct active_grant_entry *act; - s16 rc = 0; + int16_t rc; struct grant_mapping *map; unsigned int flags; bool put_handle = false; @@ -2580,7 +2580,7 @@ acquire_grant_for_copy( uint16_t trans_page_off; uint16_t trans_length; bool is_sub_page; - s16 rc = GNTST_okay; + int16_t rc = GNTST_okay; unsigned int pin_incr = readonly ? GNTPIN_hstr_inc : GNTPIN_hstw_inc; *page = NULL; @@ -3416,14 +3416,14 @@ gnttab_get_version(XEN_GUEST_HANDLE_PARAM(gnttab_get_version_t) uop) return 0; } -static s16 +static int16_t swap_grant_ref(grant_ref_t ref_a, grant_ref_t ref_b) { struct domain *d = rcu_lock_current_domain(); struct grant_table *gt = d->grant_table; struct active_grant_entry *act_a = NULL; struct active_grant_entry *act_b = NULL; - s16 rc = GNTST_okay; + int16_t rc = GNTST_okay; grant_write_lock(gt); diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers/passthrough/arm/smmu.c index f2cee82f55..c9e28a8509 100644 --- a/xen/drivers/passthrough/arm/smmu.c +++ b/xen/drivers/passthrough/arm/smmu.c @@ -43,6 +43,7 @@ #include <xen/err.h> #include <xen/irq.h> #include <xen/lib.h> +#include <xen/linux-compat.h> #include <xen/list.h> #include <xen/mm.h> #include <xen/vmap.h> diff --git a/xen/include/xen/linux-compat.h b/xen/include/xen/linux-compat.h index 1491894feb..9f6be512f8 100644 --- a/xen/include/xen/linux-compat.h +++ b/xen/include/xen/linux-compat.h @@ -13,7 +13,7 @@ typedef int8_t s8, __s8; typedef uint8_t __u8; -typedef int16_t __s16; +typedef int16_t s16, __s16; typedef int32_t __s32; typedef int64_t __s64; diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h index 542dbaf63c..d7c26bdac2 100644 --- a/xen/include/xen/types.h +++ b/xen/include/xen/types.h @@ -6,7 +6,6 @@ /* Linux inherited types which are being phased out */ typedef uint8_t u8; -typedef int16_t s16; typedef uint16_t u16, __u16; typedef int32_t s32; typedef uint32_t u32, __u32; -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |