Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2146378imm; Thu, 21 Jun 2018 07:55:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLWbVuQJ7ThK48Gc880q+SAGKQin0DW7g4qjxNVbOsG23NIO/UX2day+c5P3IvU3HxdCDVu X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr28600262plb.211.1529592907926; Thu, 21 Jun 2018 07:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529592907; cv=none; d=google.com; s=arc-20160816; b=C5y/UCXsH6DmKFiQ2euRPn9MSrKiIy77GcY5KROET7/4L5CR+C+1N/CMmOCx63yW12 cUG2E46hkzc+1HRn8ICCKY+VOftD9Ud4vlgfadWdFoNvcorQRsKQuIFCb8hiWhTqZVi+ tqoj9zJ/vRihsHfH49rDcqOlsrhx1qsFc+zQjv46aF/ZbIYuTQEG5Sc5W5FcTTJD8rWu +qb8IPi843Pe6BiBMliKVAn9xPP/+SLg+oPZShLzbtu2IyfhyJxmxKAbQxj+XBnzUkSv W9moXi/F6gVy/lsMMJthrWNEq6ymryBIi2ICuZefKzGTfney9kZ/CBL+gSVrHZ0buPuT laqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=DrYSSFUHn3ccr0T0kO5v2HlOoO14KgiTKme7NKlPX7M=; b=K0EM7+aQ8i2aHrd7rTrcZ4bzxNvOj3B9c+tOM8cdeXrb+N/myNku4FxmV1hMzZwmXM 1UPHq+L7nuuvbR4YXlgmJa3gfcmuvSLv4y+m1bOUVCJTiOxAZ1QdO23Eqc3jZ7+6S9tF hj6Dh0ApofOjBtk0hmW8qca1kwH1Keoe9cKjWcsAaYNLFRiCdiWn4pJSOrZUfn2ZYeH/ Sk1R3WhBS/52GD0qf+Jedek1UK2iyNIri6kn1HDSTxFd+g/DaEunMntuNR3zXzEZU0PG XU1QVFllR2owmCuUvHWdtU4e+FlB6I2Yiy7nDGXatfFsliZUbqkEyszZRow0AEYTGO/q 1Wsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=rYw5MbVQ; 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 189-v6si5214407pfy.293.2018.06.21.07.54.53; Thu, 21 Jun 2018 07:55:07 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=rYw5MbVQ; 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 S933259AbeFUOyB (ORCPT + 99 others); Thu, 21 Jun 2018 10:54:01 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46500 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933186AbeFUOx6 (ORCPT ); Thu, 21 Jun 2018 10:53:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DrYSSFUHn3ccr0T0kO5v2HlOoO14KgiTKme7NKlPX7M=; b=rYw5MbVQbsc21wdYlT8LK348e SWF/qRsZim3NwgKkzFLw6Z6o6IzK08BnN22oa6Z5eCYMUjVENLyyNP+p7qh5/2LWQMu/lRAX98484 Dqc4TcjtXCNDgjc2wDRcurXLKGCFvl4L1zzCEF102aLY72iMiqmBMDmswdNMd7pfsJMALVEOOjkGh eN8pP01aLUteouRmh2FttkfZbMiMqDmS2vDW7GS9DbI4xp0Pe354DwISqJ18048omOkY4Jm+A3jKY MU8zJyuX3M9noWabUuOFOCHHzoImBL9DGOW+ivoPwCJk1t6DlKX4V6OFKbIAoWKJ1MN9w5k/6A+bB j9zMl6qiQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fW0yC-0003Ps-Ju; Thu, 21 Jun 2018 14:53:56 +0000 Date: Thu, 21 Jun 2018 07:53:56 -0700 From: Christoph Hellwig To: Andreas Schwab Cc: Christoph Hellwig , aou@eecs.berkeley.edu, palmer@sifive.com, linux-kernel@vger.kernel.org, greentime@adnestech.com, Zong Li , linux-riscv@lists.infradead.org Subject: Re: [PATCH 5/5] RISC-V: Use fixed width integer types for 32-bit compatible Message-ID: <20180621145356.GB12445@infradead.org> References: <37a6523947397cd72320676030b96926e373d05a.1529506497.git.zong@andestech.com> <20180621064322.GE19319@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 21, 2018 at 12:21:19PM +0200, Andreas Schwab wrote: > On Jun 20 2018, Christoph Hellwig wrote: > > >> 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", > >> + pr_err("%s: value %016" PRIxX "out of range for 32-bit field\n", > >> me->name, v); > >> return -EINVAL; > > > > But in general Linux uXX and sXX values are always the same underlying > > fundamental C type. What is the mismatch here? > > The mismatch is that v is Elf_Addr, not u32. Then we'll have to cast to unsigned long before printing, like we do elsewhere in kernel.