Message ID | 20230411063144.3119-1-zhangqing@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2368706vqo; Mon, 10 Apr 2023 23:41:27 -0700 (PDT) X-Google-Smtp-Source: AKy350btH8CpFvBowOIAde4F5JrwsKSgfkEMEFuf4oti1cbahbUFD3iy7+jHU0VsRxZew5jq4Jya X-Received: by 2002:a17:90b:3845:b0:240:883:8ff8 with SMTP id nl5-20020a17090b384500b0024008838ff8mr18022347pjb.3.1681195286906; Mon, 10 Apr 2023 23:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681195286; cv=none; d=google.com; s=arc-20160816; b=jl3S+ytPXR7pwTg3dmtu+OwwFtG0jHMNgx9B9rNjF+ilc7F9ch2pIGQ8jXqF3ruKfU 9/5D7czjUt9H3prkVf852MBfDoez4/90BPdLMRQLgc03927RTI4Nmoprs6+3Vk1IDDG4 7tQBfejbIbN0/S5rgOHTM0B3k6mJ0IYlpip6d0g9n6y11/0SEj8Tp41RfLHSeUW9KOxn 9vsvfVdmCRlrui4yZgtwcabSizqEZ/CrfkxAgbMtXaFSeFnHv8X0diGJX79YX4TNr4Wf pGiBE2BvJp0dInoNMRkXo5MNzVbu/awPsPmBz7wj674Ux8698Qp9brzKucKMcuc8cWoY cshw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=9HiTKJambsBRZIFdjjrxrsqj+XWJ70hZq2wGksHP0e8=; b=xrzs8a1keDSO2+mdD5tt1u5qk6asn3UUhJEUbL2o7ot3P4gGltF5xtz7YiQp0A/FcC 17x84ANus+uVAZc0GMHpA/QKDj/99kY/ncclhYvjWudp50aRxnIPbJz0C3CP/2Mi/H+3 zvKl+rh9Mhjr5LvddMmYQPE2jHwN3BR1PWcvoyWgsPTANDxPCHdP54MBxuuwBbky8rw7 s+vMsvPX5bM4iG9VMF9aBimOkx02sSolFzQAyC4VdgJqPD8xfrqacYjrgfLIpn3uVrbC qXXy6jovpx8P0ksnSl58A/JgWfVSd5xDRY1K+g/As3GrZG7cFWYtESyJDfxW779Cpaxd hZCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020a17090a7e8200b00246dc4bd520si1290923pjl.132.2023.04.10.23.41.14; Mon, 10 Apr 2023 23:41:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230054AbjDKGbu (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Tue, 11 Apr 2023 02:31:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbjDKGbt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 11 Apr 2023 02:31:49 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F021F1BCA; Mon, 10 Apr 2023 23:31:46 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8AxYczR_jRkkgMaAA--.40259S3; Tue, 11 Apr 2023 14:31:45 +0800 (CST) Received: from localhost.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxHL7R_jRkwg4eAA--.32207S2; Tue, 11 Apr 2023 14:31:45 +0800 (CST) From: Qing Zhang <zhangqing@loongson.cn> To: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Huacai Chen <chenhuacai@kernel.org> Subject: [PATCH] Mips: Fix _CONST64_(x) as unsigned Date: Tue, 11 Apr 2023 14:31:44 +0800 Message-Id: <20230411063144.3119-1-zhangqing@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8AxHL7R_jRkwg4eAA--.32207S2 X-CM-SenderInfo: x2kd0wptlqwqxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBjvdXoWrtF4ktr4UAr4fGw45Kry3urg_yoWxtrg_C3 s2ya1kurW8Jr17Z39xZwn5JFy8W34kJFyDuFn8Gr9Iy3s0kw45Gay8GFy8tr43CFsa9r4r ZFZ8tr1ayFnrKjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUU5 R7kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUGVWUXwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7 xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAI cxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c 02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE 4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4I kC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWU WwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr 0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWU JVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYx BIdaVFxhVjvjDU0xZFpf9x07j8yCJUUUUU= X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762861029209441137?= X-GMAIL-MSGID: =?utf-8?q?1762861029209441137?= |
Series |
Mips: Fix _CONST64_(x) as unsigned
|
|
Commit Message
Qing Zhang
April 11, 2023, 6:31 a.m. UTC
Addresses should all be of unsigned type to avoid unnecessary conversions.
Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
---
arch/mips/include/asm/addrspace.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> 2023年4月11日 07:31,Qing Zhang <zhangqing@loongson.cn> 写道: > > Addresses should all be of unsigned type to avoid unnecessary conversions. It’s defined as signed for a reason. To keep consistent with 32-bit address, which Is sign-extended on 64bit systems. Thanks Jiaxun > > Signed-off-by: Qing Zhang <zhangqing@loongson.cn> > --- > arch/mips/include/asm/addrspace.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h > index 59a48c60a065..75d36115a25e 100644 > --- a/arch/mips/include/asm/addrspace.h > +++ b/arch/mips/include/asm/addrspace.h > @@ -25,9 +25,9 @@ > #define _ATYPE32_ int > #define _ATYPE64_ __s64 > #ifdef CONFIG_64BIT > -#define _CONST64_(x) x ## L > +#define _CONST64_(x) x ## UL > #else > -#define _CONST64_(x) x ## LL > +#define _CONST64_(x) x ## ULL > #endif > #endif > > -- > 2.20.1 >
diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h index 59a48c60a065..75d36115a25e 100644 --- a/arch/mips/include/asm/addrspace.h +++ b/arch/mips/include/asm/addrspace.h @@ -25,9 +25,9 @@ #define _ATYPE32_ int #define _ATYPE64_ __s64 #ifdef CONFIG_64BIT -#define _CONST64_(x) x ## L +#define _CONST64_(x) x ## UL #else -#define _CONST64_(x) x ## LL +#define _CONST64_(x) x ## ULL #endif #endif