From patchwork Sun Feb 24 07:13:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Xuerui X-Patchwork-Id: 10827739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B641A922 for ; Sun, 24 Feb 2019 07:15:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F58A2BC62 for ; Sun, 24 Feb 2019 07:15:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92CBA2BC70; Sun, 24 Feb 2019 07:15:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C72042BC62 for ; Sun, 24 Feb 2019 07:15:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbfBXHPF (ORCPT ); Sun, 24 Feb 2019 02:15:05 -0500 Received: from smtpbguseast2.qq.com ([54.204.34.130]:59989 "EHLO smtpbguseast2.qq.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbfBXHPF (ORCPT ); Sun, 24 Feb 2019 02:15:05 -0500 X-QQ-mid: bizesmtp3t1550992497tulpody1y Received: from localhost.localdomain (unknown [116.236.177.50]) by esmtp4.qq.com (ESMTP) with id ; Sun, 24 Feb 2019 15:14:48 +0800 (CST) X-QQ-SSF: 01400000002000C0EF62B00A0000000 X-QQ-FEAT: DfYGKmo6ysRdarnruOfn1Ek+fdyG8muqnNh6eBhHnMwdWzfPYZTpNbm3Zpbb/ Nc9BJIOBO3Yq1xKQw8drMuLAzatnKgzzv/qBgUHCT8IbU8OmLLGw7LLqqtc3QkKrFstjRAf HEod/nINiKUWZHknEYGmT98mx597St57WmHao+7G3t6do7ReKRIoCAPbz1YoZ1Rmlc01E4D q4+8qnZ4urjKMqhaOCVBMz71gwBbXRN38Ow3SrU5+sbLs7DkYWRnoObVlBEUZ1iOemBhXv2 BllVae3Q5m63duL2sf7BWw71PkhLPUWcYc9Q== X-QQ-GoodBg: 2 From: Wang Xuerui To: linux-mips@vger.kernel.org Cc: Wang Xuerui , Huacai Chen , Jiaxun Yang , Alex Belits , James Hogan , Ralf Baechle , linux-mips@linux-mips.org Subject: [PATCH 1/4] MIPS: simplify definition of TASK_SIZE64 Date: Sun, 24 Feb 2019 15:13:52 +0800 Message-Id: <20190224071355.14488-2-wangxuerui@qiniu.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20190224071355.14488-1-wangxuerui@qiniu.com> References: <20190224071355.14488-1-wangxuerui@qiniu.com> X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:qiniu.com:qybgforeign:qybgforeign1 X-QQ-Bgrelay: 1 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a "min" macro in linux/kernel.h, so use it. Signed-off-by: Wang Xuerui Cc: Huacai Chen Cc: Jiaxun Yang Cc: Alex Belits Cc: James Hogan Cc: Ralf Baechle Cc: linux-mips@linux-mips.org --- arch/mips/include/asm/processor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index aca909bd7841..c50cba85d145 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -62,7 +63,7 @@ extern unsigned int vced_count, vcei_count; */ #define TASK_SIZE32 0x7fff8000UL #ifdef CONFIG_MIPS_VA_BITS_48 -#define TASK_SIZE64 (0x1UL << ((cpu_data[0].vmbits>48)?48:cpu_data[0].vmbits)) +#define TASK_SIZE64 (0x1UL << min(cpu_data[0].vmbits, 48)) #else #define TASK_SIZE64 0x10000000000UL #endif