Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5681209imd; Tue, 30 Oct 2018 23:48:10 -0700 (PDT) X-Google-Smtp-Source: AJdET5dl+0s+XhKKuyQKK7GK7R/88j/jx9IODRrAN7+Tb/TTuvWzEQnCsMvSHpx7e0f9+jketodY X-Received: by 2002:a17:902:3341:: with SMTP id a59-v6mr2058447plc.138.1540968490513; Tue, 30 Oct 2018 23:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540968490; cv=none; d=google.com; s=arc-20160816; b=vs5ghyxbY9C7IGueDWjAkQcxg5qC2XOOZ2fliktMz4auR1vFaI7OJoFlBrh6f/igXT +IXsidqzCVMJX5H6nqyS40sRESzmqDN/5Qkh6c/3CS/iRc7RPBYAFOYBk+YeqIFgIbUl 5VF4yx4mL6eVjr9qgnQ3HUim2H6YcWRO0l9XHkQsKKTcW8+r9HMIG2N4sZNtDe2XXLY+ oIu8HnwH6wDUOmxzek30jMyS4z/E+NCWnv4YFSJ/VHvs6BFsvtP462FNzZjeWbllB43+ z98VtNCF3QEyaY3Bfvo6JLtRHN5+pQewVJAR0tHm7KhumX3rW1vrnW7ObDfxzs+gk1KM GBqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=jbGses3kKLxFwMMziG7eRw5NjyQ3ctDmuG8/t+lyq1U=; b=T+EkJUSU0P8072ycJQLG74vvvHWUwK8IrYc4lqt2xzHZ3btgcReHOR68ZpGLtfZCdr LGzVciyh1WMcz9173Iuba6Sxx2Tj7La74AtTSfQ+G4E/UHYFUpPVH4KPEWMdJA7E7lA2 MqMPhjDXF1N3lhNTnWDhEhrrfdbC4AlOVwqk7dA9r+PQ/UWaA6RduqVFJL8pDPExIHLv kllLSmfRPVDUtdqL2AkutSWKs4YDnXyVINf6uWDCc0WS11j6pSesrTmCUFWKHq41Q/qP dS2oYe3S/PNS9dkT8sTRVJaup3LhTLmk4OANTjTtiWF5oPeHt1Rvdk6SKfJ+CJSkGtqT y87g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=RhhNkCD0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si19737236plf.156.2018.10.30.23.47.55; Tue, 30 Oct 2018 23:48:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=RhhNkCD0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729251AbeJaPoP (ORCPT + 99 others); Wed, 31 Oct 2018 11:44:15 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33737 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbeJaPoO (ORCPT ); Wed, 31 Oct 2018 11:44:14 -0400 Received: by mail-pl1-f196.google.com with SMTP id x6-v6so6806845pln.0 for ; Tue, 30 Oct 2018 23:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jbGses3kKLxFwMMziG7eRw5NjyQ3ctDmuG8/t+lyq1U=; b=RhhNkCD0ovQE6FKl+WOSHKOzLviG03HhGHMpt4zJl9WuK/YgK03wRgyPUsGH1L5RQ3 vc7RJwXiLD6una6/S1hwTSxpC94cLlji32JKzOyw6XI+xxn1SI43F6k8WRqMHerDXjkS 57PqbAc8+B6Nz9hM2+TPn3fFgwIdYmUlTql/4pgs+qRkVW8oglCuZbwNftZHHce6J8DR KGTdpmbRC/GgP3vznlJ6A8IvJuVgf1ML44iV85niZyQY/M0dHi+fx3G1WEOF/e34Q1e0 qtkKRYS8r95SC6FUZhztVW7ypB7Mxx4Fsx2ZwFUoSn7WzTW28ZMj9TneAIvlhTHt9T8k p9DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jbGses3kKLxFwMMziG7eRw5NjyQ3ctDmuG8/t+lyq1U=; b=eaLqVAMjKLEJsdws+EGVjcXUatzN7MVw/pdkkbNIHZaT3EomVzw36XSQxp+J1KUO38 3kTsaSetEImkUs2mrB/Q6ZPXPYG39u1KC95TbrjCeMPI7uxrm33QGBsV03sBfQoc3BEF gQ1LWkpmK+8CQMVxF/h3VyKIPyIGA/LLFHVtDRWAMm5UMv3XONyBq8DjBVe1yAu5M7dV vUKE62KDtha4VUQ1ukH2atPMwmpgIulKNam7soHHKtNX+H5sw8b8ypV/f6KPlP2+omTy kJ1T2FkLSac78uvUSvD3eFoVCCf0KcUmjWNcmJ02+buO3FOO3FAhub86QV2fhuWDR/UD 6ooQ== X-Gm-Message-State: AGRZ1gIrXoPqEfXPEbOrSfzrKq1ZN0paG2iRilAoZLOFUu8nRiZ1sAFb LuNVTslBX/qTFhZLDkjMxPfPhQ== X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr2075226plt.268.1540968446360; Tue, 30 Oct 2018 23:47:26 -0700 (PDT) Received: from localhost.localdomain (99-152-116-91.lightspeed.sntcca.sbcglobal.net. [99.152.116.91]) by smtp.gmail.com with ESMTPSA id z7-v6sm12127306pgi.42.2018.10.30.23.47.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 23:47:24 -0700 (PDT) From: Olof Johansson To: Palmer Dabbelt Cc: Albert Ou , Zong Li , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Olof Johansson Subject: [PATCH 3/3] RISC-V: Silence some module warnings on 32-bit Date: Tue, 30 Oct 2018 23:47:09 -0700 Message-Id: <20181031064709.30981-4-olof@lixom.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031064709.30981-1-olof@lixom.net> References: <20181031064709.30981-1-olof@lixom.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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.11.0