Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8debf953 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

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: ff2723ac ("regulator: add rpmh-regulator driver")
Change-Id: Ic0dedbad2ea5a767dd4a56e55c231f3870342417
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 1b5e9532
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
	}