From patchwork Sun Feb 3 01:10:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 157355 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2261203jaa; Sat, 2 Feb 2019 17:11:22 -0800 (PST) X-Google-Smtp-Source: AHgI3IYP2kySd/Z5vl3Jfoq/O5m6fMNNFr16nSjT+JZf1M7yodRwlTBxFzKg5aHFgpOif/EUIL78 X-Received: by 2002:a17:902:aa07:: with SMTP id be7mr2805116plb.63.1549156282319; Sat, 02 Feb 2019 17:11:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549156282; cv=none; d=google.com; s=arc-20160816; b=dwjqTX8KvTqQf6Dcm4UfmHx589CXAGQCHN9P+EEhQriP/ProOJYzUd2aNQHQZyiiph +n6afoFDz4HrBPkmCKUkFFxdvRkMX1NncgbDDNLCDh95mvV3t3rm6BkEZmwehBO5frh2 QNRaa3AeToXXrvZjM8GjHwNarFLTHUvANeBvhFRemTUCiG8aumDnPYU/f1yLYGznd7n4 1dLd9fo7EVJ+wQpqSTaDiciA7/9nIlfYBSLck5mvLczsLwv/57pz78/1rSld6mGb7H5N 1+uBbulNfhvhPpWqJwjZXP12VLmDrxrl/cl35DcULHtQLAk7ddVNGkmGv9BU79KU9mnj Wpew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=YhxrONbowvqBYAORlK0I14mrTzN2FLYU3WhqlvfQPnc=; b=PUvE7kBka6Gpvs/cnf7d5HjZtO+Rwcfcsv8ZY65TgcvNa7b9yNabbvcas0Mn00DeD1 CGaJqFKb/Td4enjO8HgdqUzOprdDEJ/fUoGJIOlKc3p6kTRPDPTCk9YwbXLqRujo4F3P bV8DHeZ4SUz9JuB0ram3Zp/6KQjYrDocSLsP4oV1s8NSweWwvEsdoRfno7De1P0gxJp1 kbp1BuEzoLSXKDhDj0unl1KEqltMY1NM6D8r/cfv/uKZbphu3aevNDg6mP33h3VhXV44 wF6P6xbRPIp2UX6RljhjNNNUNGPa0ZC0lm+Wivxhz/CYET6QI72n9oosXZwpnapbIskv gA1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zLD8dHZK; 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 o184si11198471pgo.591.2019.02.02.17.11.22; Sat, 02 Feb 2019 17:11:22 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=zLD8dHZK; 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 S1727205AbfBCBLT (ORCPT + 31 others); Sat, 2 Feb 2019 20:11:19 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:37810 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726746AbfBCBLT (ORCPT ); Sat, 2 Feb 2019 20:11:19 -0500 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-12.nifty.com with ESMTP id x131Ahu6007227; Sun, 3 Feb 2019 10:10:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x131Ahu6007227 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1549156244; bh=YhxrONbowvqBYAORlK0I14mrTzN2FLYU3WhqlvfQPnc=; h=From:To:Cc:Subject:Date:From; b=zLD8dHZKpvu8iwQr8XfWi8KSbsAC1s9Hb2GszakkCzw5KYZruKpt/cY+FAOursJei NUUWq7U+DZfadzyG7New43I/Ilrll8U47Cv2cHgo/ap+WysIkVw92JkOIN+APOUa6r Rcb0ySBPRQO6eFlHjtfuamoNiQYb5F8ey97BdTQlpKA3v9n49Qiq65asYA+ZQygoHX I9YUq69WBIH983PIKpg1nbeIfUrT0XnMC7r4z/lIseZ+foNMnYFoe6V4y7uNXGJcnZ 49OQz3Tz0Uzrnd3l5xTgeGQ+KMtnKW6oruiF2NMnpagJpDdgSJc1aMWgrx1w78l24l q3VaRheuh3EzQ== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: Andrew Morton Cc: Masahiro Yamada , Alexey Dobriyan , Zhang Yanmin , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] linux/kernel.h: use 'short' to define USHRT_MAX, SHRT_MAX, SHRT_MIN Date: Sun, 3 Feb 2019 10:10:41 +0900 Message-Id: <1549156242-20806-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit log of 44f564a4bf6a ("ipc: add definitions of USHORT_MAX and others") did not explain why it used (s16) and (u16) instead of (short) and (unsigned short). Let's use (short) and (unsigned short), which is more sensible, and more consistent with the other MAX/MIN defines. As you see in include/uapi/asm-generic/int-ll64.h, s16/u16 are typedef'ed as signed/unsigned short. So, this commit does not have a functional change. Remove the unneeded parentheses around ~0U while we are here. Signed-off-by: Masahiro Yamada Cc: Alexey Dobriyan Cc: Zhang Yanmin --- Changes in v2: - Remove unneeded parentheses include/linux/kernel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 8f0e68e..afc19d9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -16,9 +16,9 @@ #include #include -#define USHRT_MAX ((u16)(~0U)) -#define SHRT_MAX ((s16)(USHRT_MAX>>1)) -#define SHRT_MIN ((s16)(-SHRT_MAX - 1)) +#define USHRT_MAX ((unsigned short)~0U) +#define SHRT_MAX ((short)(USHRT_MAX>>1)) +#define SHRT_MIN ((short)(-SHRT_MAX - 1)) #define INT_MAX ((int)(~0U>>1)) #define INT_MIN (-INT_MAX - 1) #define UINT_MAX (~0U)