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

Commit a52112ee authored by Jordan Crouse's avatar Jordan Crouse
Browse files

soc: qcom: mem-offline: Fix compile warnings



Fix the following compiler warning(s) from gcc 6.1.1 with -Werror enabled:

 drivers/soc/qcom/mem-offline.c:124:
   format '%d' expects argument of type 'int', but argument 3 has
	type 'long unsigned int' [-Werror=format=]
    pr_info("mem-offline: %s mem%d, but not our block. Not performing any action\n",

 drivers/soc/qcom/mem-offline.c:131:
   format '%lx' expects argument of type 'long unsigned int', but argument 3 has
	type 'phys_addr_t {aka long long unsigned int}' [-Werror=format=]
   pr_debug("mem-offline: MEM_GOING_ONLINE : start = 0x%lx end = 0x%lx\n",

 drivers/soc/qcom/mem-offline.c:149:
   format '%lx' expects argument of type 'long unsigned int', but argument 3 has
	type 'phys_addr_t {aka long long unsigned int}' [-Werror=format=]
   pr_debug("mem-offline: MEM_GOING_OFFLINE : start = 0x%lx end = 0x%lx\n",

 drivers/soc/qcom/mem-offline.c:167:
   format '%lx' expects argument of type 'long unsigned int', but argument 2 has
	type 'phys_addr_t {aka long long unsigned int}' [-Werror=format=]
   pr_info("mem-offline: MEM_CANCEL_ONLINE: start = 0x%lx end = 0x%lx\n",

 drivers/soc/qcom/mem-offline.c:350:
   format '%d' expects argument of type 'int', but argument 3 has
	type 'long int' [-Werror=format=]
    pr_err("mem-offline: failed to get mailbox channel %pK %d\n",

Fixes: acf14241 ("soc: qcom: mem-offline: Ignore hotplug notification for other blocks")
Fixes: f909cbbc ("soc: qcom: mem-offline: Don't print error messages on EPROBE_DEFER")
Fixes: c5a8d551 ("soc: qcom: mem-offline: Dynamic Memory Region Offline driver")
Change-Id: Ic0dedbad580134cc3fea2f54403d264edf134149
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 1888928a
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -121,14 +121,14 @@ static int mem_event_callback(struct notifier_block *self,

	if (sec_nr > end_section_nr || sec_nr < start_section_nr) {
		if (action == MEM_ONLINE || action == MEM_OFFLINE)
			pr_info("mem-offline: %s mem%d, but not our block. Not performing any action\n",
			pr_info("mem-offline: %s mem%ld, but not our block. Not performing any action\n",
				action == MEM_ONLINE ? "Onlined" : "Offlined",
				sec_nr);
		return NOTIFY_OK;
	}
	switch (action) {
	case MEM_GOING_ONLINE:
		pr_debug("mem-offline: MEM_GOING_ONLINE : start = 0x%lx end = 0x%lx\n",
		pr_debug("mem-offline: MEM_GOING_ONLINE : start = 0x%llx end = 0x%llx\n",
				start_addr, end_addr);
		++mem_info[(sec_nr - start_section_nr + MEMORY_ONLINE *
			   idx) / sections_per_block].fail_count;
@@ -146,7 +146,7 @@ static int mem_event_callback(struct notifier_block *self,
		cur = 0;
		break;
	case MEM_GOING_OFFLINE:
		pr_debug("mem-offline: MEM_GOING_OFFLINE : start = 0x%lx end = 0x%lx\n",
		pr_debug("mem-offline: MEM_GOING_OFFLINE : start = 0x%llx end = 0x%llx\n",
				start_addr, end_addr);
		++mem_info[(sec_nr - start_section_nr + MEMORY_OFFLINE *
			   idx) / sections_per_block].fail_count;
@@ -164,7 +164,7 @@ static int mem_event_callback(struct notifier_block *self,
		cur = 0;
		break;
	case MEM_CANCEL_ONLINE:
		pr_info("mem-offline: MEM_CANCEL_ONLINE: start = 0x%lx end = 0x%lx\n",
		pr_info("mem-offline: MEM_CANCEL_ONLINE: start = 0x%llx end = 0x%llx\n",
				start_addr, end_addr);
		break;
	default:
@@ -347,7 +347,7 @@ static int mem_parse_dt(struct platform_device *pdev)
	mailbox.mbox = mbox_request_channel(&mailbox.cl, 0);
	if (IS_ERR(mailbox.mbox)) {
		if (PTR_ERR(mailbox.mbox) != -EPROBE_DEFER)
			pr_err("mem-offline: failed to get mailbox channel %pK %d\n",
			pr_err("mem-offline: failed to get mailbox channel %pK %ld\n",
				mailbox.mbox, PTR_ERR(mailbox.mbox));
		return PTR_ERR(mailbox.mbox);
	}