Skip to content

Commit

Permalink
regmap: Prefer unsigned int to bare use of unsigned
Browse files Browse the repository at this point in the history
Fix checkpatch warnings:
    WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Jinchao Wang <wjc@cdjrlc.com>
Link: https://lore.kernel.org/r/20210628171907.63646-1-wjc@cdjrlc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jinchao Wang authored and Mark Brown committed Jul 11, 2021
1 parent 1852f5e commit d63aa09
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ static ssize_t regmap_reg_ranges_read_file(struct file *file,
char *buf;
char *entry;
int ret;
unsigned entry_len;
unsigned int entry_len;

if (*ppos < 0 || !count)
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/regmap/regmap-mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

struct regmap_mmio_context {
void __iomem *regs;
unsigned val_bytes;
unsigned int val_bytes;
bool relaxed_mmio;

bool attached_clk;
Expand Down
8 changes: 4 additions & 4 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,10 +1126,10 @@ struct regmap *__regmap_init(struct device *dev,
/* Make sure, that this register range has no selector
or data window within its boundary */
for (j = 0; j < config->num_ranges; j++) {
unsigned sel_reg = config->ranges[j].selector_reg;
unsigned win_min = config->ranges[j].window_start;
unsigned win_max = win_min +
config->ranges[j].window_len - 1;
unsigned int sel_reg = config->ranges[j].selector_reg;
unsigned int win_min = config->ranges[j].window_start;
unsigned int win_max = win_min +
config->ranges[j].window_len - 1;

/* Allow data window inside its own virtual range */
if (j == i)
Expand Down

0 comments on commit d63aa09

Please sign in to comment.