Skip to content

Commit d406739

Browse files
Jinchao Wangvineetgarc
authored andcommitted
arc: 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 <wjc@cdjrlc.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent c500bee commit d406739

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

arch/arc/include/asm/checksum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
static inline __sum16 csum_fold(__wsum s)
2626
{
27-
unsigned r = s << 16 | s >> 16; /* ror */
27+
unsigned int r = s << 16 | s >> 16; /* ror */
2828
s = ~s;
2929
s -= r;
3030
return s >> 16;

arch/arc/include/asm/perf_event.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static const char * const arc_pmu_ev_hw_map[] = {
123123
#define C(_x) PERF_COUNT_HW_CACHE_##_x
124124
#define CACHE_OP_UNSUPPORTED 0xffff
125125

126-
static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
126+
static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
127127
[C(L1D)] = {
128128
[C(OP_READ)] = {
129129
[C(RESULT_ACCESS)] = PERF_COUNT_ARC_LDC,

arch/arc/kernel/unwind.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static void init_unwind_hdr(struct unwind_table *table,
260260
{
261261
const u8 *ptr;
262262
unsigned long tableSize = table->size, hdrSize;
263-
unsigned n;
263+
unsigned int n;
264264
const u32 *fde;
265265
struct {
266266
u8 version;
@@ -462,7 +462,7 @@ static uleb128_t get_uleb128(const u8 **pcur, const u8 *end)
462462
{
463463
const u8 *cur = *pcur;
464464
uleb128_t value;
465-
unsigned shift;
465+
unsigned int shift;
466466

467467
for (shift = 0, value = 0; cur < end; shift += 7) {
468468
if (shift + 7 > 8 * sizeof(value)
@@ -483,7 +483,7 @@ static sleb128_t get_sleb128(const u8 **pcur, const u8 *end)
483483
{
484484
const u8 *cur = *pcur;
485485
sleb128_t value;
486-
unsigned shift;
486+
unsigned int shift;
487487

488488
for (shift = 0, value = 0; cur < end; shift += 7) {
489489
if (shift + 7 > 8 * sizeof(value)
@@ -609,7 +609,7 @@ static unsigned long read_pointer(const u8 **pLoc, const void *end,
609609
static signed fde_pointer_type(const u32 *cie)
610610
{
611611
const u8 *ptr = (const u8 *)(cie + 2);
612-
unsigned version = *ptr;
612+
unsigned int version = *ptr;
613613

614614
if (*++ptr) {
615615
const char *aug;
@@ -904,7 +904,7 @@ int arc_unwind(struct unwind_frame_info *frame)
904904
const u8 *ptr = NULL, *end = NULL;
905905
unsigned long pc = UNW_PC(frame) - frame->call_frame;
906906
unsigned long startLoc = 0, endLoc = 0, cfa;
907-
unsigned i;
907+
unsigned int i;
908908
signed ptrType = -1;
909909
uleb128_t retAddrReg = 0;
910910
const struct unwind_table *table;

0 commit comments

Comments
 (0)