linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Olof Johansson <olof@lixom.net>,
	Palmer Dabbelt <palmer@sifive.com>,
	Sasha Levin <sashal@kernel.org>,
	linux-riscv@lists.infradead.org
Subject: [PATCH AUTOSEL 4.19 27/36] RISC-V: Silence some module warnings on 32-bit
Date: Thu, 22 Nov 2018 14:52:31 -0500	[thread overview]
Message-ID: <20181122195240.13123-27-sashal@kernel.org> (raw)
In-Reply-To: <20181122195240.13123-1-sashal@kernel.org>

From: Olof Johansson <olof@lixom.net>

[ Upstream commit ef3a61406618291c46da168ff91acaa28d85944c ]

Fixes:

arch/riscv/kernel/module.c: In function 'apply_r_riscv_32_rela':
./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
arch/riscv/kernel/module.c:23:27: note: format string is defined here
arch/riscv/kernel/module.c: In function 'apply_r_riscv_pcrel_hi20_rela':
./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
arch/riscv/kernel/module.c:104:23: note: format string is defined here
arch/riscv/kernel/module.c: In function 'apply_r_riscv_hi20_rela':
./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
arch/riscv/kernel/module.c:146:23: note: format string is defined here
arch/riscv/kernel/module.c: In function 'apply_r_riscv_got_hi20_rela':
./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
arch/riscv/kernel/module.c:190:60: note: format string is defined here
arch/riscv/kernel/module.c: In function 'apply_r_riscv_call_plt_rela':
./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
arch/riscv/kernel/module.c:214:24: note: format string is defined here
arch/riscv/kernel/module.c: In function 'apply_r_riscv_call_rela':
./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
arch/riscv/kernel/module.c:236:23: note: format string is defined here

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/riscv/kernel/module.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c
index 3303ed2cd419..7dd308129b40 100644
--- a/arch/riscv/kernel/module.c
+++ b/arch/riscv/kernel/module.c
@@ -21,7 +21,7 @@ static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v)
 {
 	if (v != (u32)v) {
 		pr_err("%s: value %016llx out of range for 32-bit field\n",
-		       me->name, v);
+		       me->name, (long long)v);
 		return -EINVAL;
 	}
 	*location = v;
@@ -102,7 +102,7 @@ static int apply_r_riscv_pcrel_hi20_rela(struct module *me, u32 *location,
 	if (offset != (s32)offset) {
 		pr_err(
 		  "%s: target %016llx can not be addressed by the 32-bit offset from PC = %p\n",
-		  me->name, v, location);
+		  me->name, (long long)v, location);
 		return -EINVAL;
 	}
 
@@ -144,7 +144,7 @@ static int apply_r_riscv_hi20_rela(struct module *me, u32 *location,
 	if (IS_ENABLED(CMODEL_MEDLOW)) {
 		pr_err(
 		  "%s: target %016llx can not be addressed by the 32-bit offset from PC = %p\n",
-		  me->name, v, location);
+		  me->name, (long long)v, location);
 		return -EINVAL;
 	}
 
@@ -188,7 +188,7 @@ static int apply_r_riscv_got_hi20_rela(struct module *me, u32 *location,
 	} else {
 		pr_err(
 		  "%s: can not generate the GOT entry for symbol = %016llx from PC = %p\n",
-		  me->name, v, location);
+		  me->name, (long long)v, location);
 		return -EINVAL;
 	}
 
@@ -212,7 +212,7 @@ static int apply_r_riscv_call_plt_rela(struct module *me, u32 *location,
 		} else {
 			pr_err(
 			  "%s: target %016llx can not be addressed by the 32-bit offset from PC = %p\n",
-			  me->name, v, location);
+			  me->name, (long long)v, location);
 			return -EINVAL;
 		}
 	}
@@ -234,7 +234,7 @@ static int apply_r_riscv_call_rela(struct module *me, u32 *location,
 	if (offset != fill_v) {
 		pr_err(
 		  "%s: target %016llx can not be addressed by the 32-bit offset from PC = %p\n",
-		  me->name, v, location);
+		  me->name, (long long)v, location);
 		return -EINVAL;
 	}
 
-- 
2.17.1


  parent reply	other threads:[~2018-11-22 19:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 19:52 [PATCH AUTOSEL 4.19 01/36] pinctrl: meson: fix pinconf bias disable Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 02/36] pinctrl: meson: fix gxbb ao pull register bits Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 03/36] pinctrl: meson: fix gxl " Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 04/36] pinctrl: meson: fix meson8 " Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 05/36] pinctrl: meson: fix meson8b " Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 06/36] tools/testing/nvdimm: Fix the array size for dimm devices Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 07/36] scsi: lpfc: fix remoteport access Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 08/36] scsi: hisi_sas: Remove set but not used variable 'dq_list' Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 09/36] scsi: NCR5380: Return false instead of NULL Sasha Levin
2018-11-22 21:49   ` Finn Thain
2018-11-23 11:27     ` Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 10/36] KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 11/36] cpufreq: imx6q: add return value check for voltage scale Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 12/36] rtc: cmos: Do not export alarm rtc_ops when we do not support alarms Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 13/36] rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 14/36] crypto: simd - correctly take reqsize of wrapped skcipher into account Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 15/36] floppy: fix race condition in __floppy_read_block_0() Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 16/36] powerpc/io: Fix the IO workarounds code to work with Radix Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 17/36] sched/fair: Fix cpu_util_wake() for 'execl' type workloads Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 18/36] perf/x86/intel/uncore: Add more IMC PCI IDs for KabyLake and CoffeeLake CPUs Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 19/36] ARM: make lookup_processor_type() non-__init Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 20/36] ARM: split out processor lookup Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 21/36] ARM: clean up per-processor check_bugs method call Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 22/36] ARM: add PROC_VTABLE and PROC_TABLE macros Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 23/36] ARM: spectre-v2: per-CPU vtables to work around big.Little systems Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 24/36] block: copy ioprio in __bio_clone_fast() and bounce Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 25/36] SUNRPC: Fix a bogus get/put in generic_key_to_expire() Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 26/36] riscv: add missing vdso_install target Sasha Levin
2018-11-22 19:52 ` Sasha Levin [this message]
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 28/36] drm/amdgpu: fix bug with IH ring setup Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 29/36] kdb: Use strscpy with destination buffer size Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 30/36] NFSv4: Fix an Oops during delegation callbacks Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 31/36] powerpc/numa: Suppress "VPHN is not supported" messages Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 32/36] efi/arm: Revert deferred unmap of early memmap mapping Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 33/36] z3fold: fix possible reclaim races Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 34/36] mm, memory_hotplug: check zone_movable in has_unmovable_pages Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 35/36] tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 36/36] mm, page_alloc: check for max order in hot path Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181122195240.13123-27-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=olof@lixom.net \
    --cc=palmer@sifive.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).