From patchwork Mon Sep 28 13:29:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaowei Bai X-Patchwork-Id: 7277631 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DEC939F39B for ; Mon, 28 Sep 2015 13:32:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DD3820755 for ; Mon, 28 Sep 2015 13:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25D5220747 for ; Mon, 28 Sep 2015 13:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757448AbbI1Nbn (ORCPT ); Mon, 28 Sep 2015 09:31:43 -0400 Received: from m12-12.163.com ([220.181.12.12]:32802 "EHLO m12-12.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754775AbbI1Nbl (ORCPT ); Mon, 28 Sep 2015 09:31:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=vqsMxEFVdGFYtDgAP1 uH8f/z79EOGlypzR0bF6N0Yh0=; b=WCYdpPJAuVDKVHK1lsjnaJl3JY6QRgLWhF bWc5jhSOCdMDad0avaoa75K2duypEk7a+bWttytigbemErxO10ZnHOlL4IL7M5lz 7NhKux10u77cSl7hoR505+SK/x4BUAMRrAVW0ni8QqCNRRT3Gh2NFMhDIzu1Iiqj 6jZ1vHp9k= Received: from localhost.localdomain (unknown [58.209.166.48]) by smtp8 (Coremail) with SMTP id DMCowEAZrVQ4QQlW4h4nBg--.1S4; Mon, 28 Sep 2015 21:31:38 +0800 (CST) From: Yaowei Bai To: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/17] fs/kdev_t: old/new_valid_dev can be boolean Date: Mon, 28 Sep 2015 21:29:36 +0800 Message-Id: <1443446976-4925-2-git-send-email-bywxiaobai@163.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443446976-4925-1-git-send-email-bywxiaobai@163.com> References: <1443446807-4838-1-git-send-email-bywxiaobai@163.com> <1443446976-4925-1-git-send-email-bywxiaobai@163.com> X-CM-TRANSID: DMCowEAZrVQ4QQlW4h4nBg--.1S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jry5Gr13Xw4xGw4rWFWfXwb_yoWfWFX_C3 WSvayxXF4xZr13ua1SyF1xZFyF9a4fJws7Xas5tw45Zrs8Xws8ArykXr9rtFW8Wws7ur13 Kr1ruryIg347ujkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnPUUUUUUUU== X-Originating-IP: [58.209.166.48] X-CM-SenderInfo: xe1z5x5dretxi6rwjhhfrp/1tbisBuDT1UL3X6+FwAAsz Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch makes old/new_valid_dev return bool due to these two particular functions only using either one or zero as their return value. No functional change. Signed-off-by: Yaowei Bai --- include/linux/kdev_t.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/kdev_t.h b/include/linux/kdev_t.h index a546d20..052c7b3 100644 --- a/include/linux/kdev_t.h +++ b/include/linux/kdev_t.h @@ -20,7 +20,7 @@ }) /* acceptable for old filesystems */ -static inline int old_valid_dev(dev_t dev) +static inline bool old_valid_dev(dev_t dev) { return MAJOR(dev) < 256 && MINOR(dev) < 256; } @@ -35,7 +35,7 @@ static inline dev_t old_decode_dev(u16 val) return MKDEV((val >> 8) & 255, val & 255); } -static inline int new_valid_dev(dev_t dev) +static inline bool new_valid_dev(dev_t dev) { return 1; }