mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
regulator: Fix formatting warnings in rpmh-regulator
Fix the following compiler warning from gcc 7.4.1 with -Werror enabled:
drivers/regulator/rpmh-regulator.c:1285:3: error: format '%d' expects argument
of type 'int', but argument 4 has type 'long int'
aggr_vreg_err(aggr_vreg, "could not retrieve ARC aux data, rc=%d\n",
drivers/regulator/rpmh-regulator.c:1292:3: error: format '%d' expects argument
of type 'int', but argument 4 has type 'size_t {aka long unsigned int}'
aggr_vreg_err(aggr_vreg, "more ARC levels defined than allowed: %d > %d\n",
drivers/regulator/rpmh-regulator.c:1296:3: error: format '%d' expects argument
of type 'int', but argument 4 has type 'size_t {aka long unsigned int}'
aggr_vreg_err(aggr_vreg, "invalid ARC aux data size: %d\n",
Fixes: ff2723a ("regulator: add rpmh-regulator driver")
Change-Id: Ic0dedbad2ea5a767dd4a56e55c231f3870342417
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
This commit is contained in:
parent
ace1c64495
commit
99e2c4f4ee
|
|
@ -1282,18 +1282,18 @@ rpmh_regulator_load_arc_level_mapping(struct rpmh_aggr_vreg *aggr_vreg)
|
|||
|
||||
buf = cmd_db_read_aux_data(aggr_vreg->resource_name, &len);
|
||||
if (IS_ERR(buf)) {
|
||||
aggr_vreg_err(aggr_vreg, "could not retrieve ARC aux data, rc=%d\n",
|
||||
aggr_vreg_err(aggr_vreg, "could not retrieve ARC aux data, rc=%ld\n",
|
||||
PTR_ERR(buf));
|
||||
return PTR_ERR(buf);
|
||||
} else if (len == 0) {
|
||||
aggr_vreg_err(aggr_vreg, "ARC level mapping data missing in command db\n");
|
||||
return -EINVAL;
|
||||
} else if (len > RPMH_ARC_MAX_LEVELS * RPMH_ARC_LEVEL_SIZE) {
|
||||
aggr_vreg_err(aggr_vreg, "more ARC levels defined than allowed: %d > %d\n",
|
||||
aggr_vreg_err(aggr_vreg, "more ARC levels defined than allowed: %zd > %d\n",
|
||||
len, RPMH_ARC_MAX_LEVELS * RPMH_ARC_LEVEL_SIZE);
|
||||
return -EINVAL;
|
||||
} else if (len % RPMH_ARC_LEVEL_SIZE) {
|
||||
aggr_vreg_err(aggr_vreg, "invalid ARC aux data size: %d\n",
|
||||
aggr_vreg_err(aggr_vreg, "invalid ARC aux data size: %zd\n",
|
||||
len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user