arm64: Prefer unsigned int to bare use of unsigned
Subsystems (6)
PATCH 1/1 arm64: Prefer unsigned int to bare use of unsigned
Fix checkpatch warnings:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by Jinchao Wang <[email protected]>
--- arch/arm64/include/asm/uaccess.h | 2 +- arch/arm64/kernel/perf_event.c | 18 +++++++++--------- arch/arm64/kernel/smp.c | 4 ++-- arch/arm64/kvm/arm.c | 2 +- arch/arm64/mm/ptdump.c | 4 ++-- arch/arm64/net/bpf_jit.h | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-)
arch/arm64/include/asm/uaccess.h +1 -1
@@ -465,7 +465,7 @@ struct page;void memcpy_page_flushcache (char *to,struct page *page,size_t offset,size_t len);extern unsigned long __must_check __copy_user_flushcache (void *to,const void __user *from,unsigned long n); -static inline int __copy_from_user_flushcache (void *dst,const void __user *src,unsigned size) +static inline int __copy_from_user_flushcache (void *dst,const void __user *src,unsigned int size) {kasan_check_write (dst, size);return __copy_user_flushcache (dst,__uaccess_mask_ptr (src), size);
arch/arm64/kernel/perf_event.c +9 -9
@@ -39,7 +39,7 @@* be supported on any given implementation. Unsupported events will * be disabled at run-time based on the PMCEID registers. */ -static const unsigned armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX ] = { +static const unsigned int armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX ] = {PERF_MAP_ALL_UNSUPPORTED , [PERF_COUNT_HW_CPU_CYCLES ] =ARMV8_PMUV3_PERFCTR_CPU_CYCLES , [PERF_COUNT_HW_INSTRUCTIONS ] =ARMV8_PMUV3_PERFCTR_INST_RETIRED ,
@@ -52,7 +52,7 @@ static const unsigned armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX] = { [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV8_PMUV3_PERFCTR_STALL_BACKEND, }; -static const unsigned armv8_pmuv3_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] +static const unsigned int armv8_pmuv3_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] [PERF_COUNT_HW_CACHE_OP_MAX ] [PERF_COUNT_HW_CACHE_RESULT_MAX ] = {PERF_CACHE_MAP_ALL_UNSUPPORTED ,
@@ -76,7 +76,7 @@ static const unsigned armv8_pmuv3_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] [C(BPU)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_PMUV3_PERFCTR_BR_MIS_PRED, }; -static const unsigned armv8_a53_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] +static const unsigned int armv8_a53_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] [PERF_COUNT_HW_CACHE_OP_MAX ] [PERF_COUNT_HW_CACHE_RESULT_MAX ] = {PERF_CACHE_MAP_ALL_UNSUPPORTED ,
@@ -87,7 +87,7 @@ static const unsigned armv8_a53_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] [C(NODE)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR, }; -static const unsigned armv8_a57_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] +static const unsigned int armv8_a57_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] [PERF_COUNT_HW_CACHE_OP_MAX ] [PERF_COUNT_HW_CACHE_RESULT_MAX ] = {PERF_CACHE_MAP_ALL_UNSUPPORTED ,
@@ -104,7 +104,7 @@ static const unsigned armv8_a57_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] [C(NODE)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR, }; -static const unsigned armv8_a73_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] +static const unsigned int armv8_a73_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] [PERF_COUNT_HW_CACHE_OP_MAX ] [PERF_COUNT_HW_CACHE_RESULT_MAX ] = {PERF_CACHE_MAP_ALL_UNSUPPORTED ,
@@ -113,7 +113,7 @@ static const unsigned armv8_a73_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] [C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR, }; -static const unsigned armv8_thunder_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] +static const unsigned int armv8_thunder_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] [PERF_COUNT_HW_CACHE_OP_MAX ] [PERF_COUNT_HW_CACHE_RESULT_MAX ] = {PERF_CACHE_MAP_ALL_UNSUPPORTED ,
@@ -134,7 +134,7 @@ static const unsigned armv8_thunder_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR, }; -static const unsigned armv8_vulcan_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] +static const unsigned int armv8_vulcan_perf_cache_map[PERF_COUNT_HW_CACHE_MAX ] [PERF_COUNT_HW_CACHE_OP_MAX ] [PERF_COUNT_HW_CACHE_RESULT_MAX ] = {PERF_CACHE_MAP_ALL_UNSUPPORTED ,
@@ -979,9 +979,9 @@ static void armv8pmu_reset(void *info) }static int __armv8_pmuv3_map_event (struct perf_event *event, -const unsigned (*extra_event_map) +const unsigned int (*extra_event_map) [PERF_COUNT_HW_MAX ], -const unsigned (*extra_cache_map) +const unsigned int (*extra_cache_map) [PERF_COUNT_HW_CACHE_MAX ] [PERF_COUNT_HW_CACHE_OP_MAX ] [PERF_COUNT_HW_CACHE_RESULT_MAX ])
arch/arm64/kernel/smp.c +2 -2
@@ -890,7 +890,7 @@ static void do_handle_IPI(int ipinr) {unsigned int cpu =smp_processor_id (); -if ((unsigned )ipinr <NR_IPI ) +if ((unsigned int )ipinr <NR_IPI )trace_ipi_entry_rcuidle (ipi_types[ipinr]);switch (ipinr) {
@@ -939,7 +939,7 @@ static void do_handle_IPI(int ipinr)break ; } -if ((unsigned )ipinr <NR_IPI ) +if ((unsigned int )ipinr <NR_IPI )trace_ipi_exit_rcuidle (ipi_types[ipinr]); }
arch/arm64/kvm/arm.c +1 -1
@@ -1215,7 +1215,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,case KVM_GET_REG_LIST : {struct kvm_reg_list __user *user_list = argp;struct kvm_reg_list reg_list; -unsigned n; +unsigned int n; r = -ENOEXEC ;if (unlikely (!kvm_vcpu_initialized (vcpu)))
arch/arm64/mm/ptdump.c +2 -2
@@ -206,7 +206,7 @@ static struct pg_level pg_level[] = {static void dump_prot (struct pg_state *st,const struct prot_bits *bits,size_t num) { -unsigned i; +unsigned int i;for (i =0 ; i < num; i++, bits++) {const char *s;
@@ -333,7 +333,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info)static void __init ptdump_initialize (void ) { -unsigned i, j; +unsigned int i, j;for (i =0 ; i <ARRAY_SIZE (pg_level); i++)if (pg_level[i].bits)
arch/arm64/net/bpf_jit.h +1 -1
@@ -123,7 +123,7 @@/* Rd = Rn << shift */ #define A64_LSL (sf, Rd, Rn, shift) ({ \ int sz = (sf) ? 64 : 32; \ - A64_UBFM(sf, Rd, Rn, (unsigned)-(shift) % sz, sz - 1 - (shift)); \ + A64_UBFM(sf, Rd, Rn, (unsigned int)-(shift) % sz, sz - 1 - (shift)); \ })/* Rd = Rn >> shift */ #define A64_LSR (sf, Rd, Rn, shift) A64_UBFM(sf, Rd, Rn, shift, (sf) ? 63 : 31)
Signature · 9 lines
2.31.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel