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@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
Jan Beulich committed 2024-09-12 14:01:42 +02:00
1 parent 6e7f7a0c16
commit 5ffe6d4a02
8 files changed
+12 -12

No files matched your search

+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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;
};
/*
+4 -4
View File
@@ -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);
+1
View File
@@ -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>
+1 -1
View File
@@ -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;
-1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.