Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4694007imm; Fri, 18 May 2018 09:07:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq8yYll6GiBVpIAX+1wsuFeie0iQiCK9sLgddOtmC2zkia1zuy/d6AN0HCu3n/ebOlNgO3g X-Received: by 2002:a62:cf43:: with SMTP id b64-v6mr9963381pfg.248.1526659644770; Fri, 18 May 2018 09:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526659644; cv=none; d=google.com; s=arc-20160816; b=BPLxZZr9q6LSpsnqIahkb+QJi9ydkr/EhEQbKJztrSIb9oCJ0GExX/J2IgqBVBnQYx ejQ/UC8Um1RKLW7U8sRN2aJwELyRUO6vYBzpFK91yo9/vrP4vImSecwPnCgKX/nyXI6i axZM0pmXnYGKHRT4z02QH8qsjIX8z2WHrQ9SN31UvLaGdPe2+6/r2SjODTMaMbgGigY/ cP2wvIoC7tpFAH70DyOV2lIOP33KFEXIXkSv559wrTqb4J+n+Lwft12NqWT7nc7Zf8VK Go2L4PROvYwH4SAKYhe6DNpYv4i4mrM7JTOonNaAlQTge49bpGPPp91fk29oSYeaIPv4 /HYQ== 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=Q4T+Et3BGIwUGN1RGEC6tczb3jodO9eiu9VdN4wyEbc=; b=hA+AXpTYQuauRp7jn3YBqB2C+mi0zuCjqQppkPjtzr06PTcUdD/zA7olV4q/s2Pex2 4cvSIR6TnNZ6oGvw88BVcpPoxtxw4quUllP9uPnJqhrVH3F/az73GoL1nb+qMwQDrptX hetrKpxLPiolrtChz0Q+APMmebiNRcSHilXfgPqEsAHUO8BI8NVpNV3IACnXoQfGVXAF ++o2u3gd4jizrzzKITKZ1vqtRl8BWl52ZGkT9YjAAuBHEWILB8lZ1ZuWgEh5O0rtG1rO +3vYJiRLYvlDjN8foEqURlzjCb4Db8MKNbeKOL4nIHJVnVQ1nCxIeGh09X3FplUi/tln 3ClA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=leM3WcXd; 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 w8-v6si6073650pgr.111.2018.05.18.09.07.09; Fri, 18 May 2018 09:07:24 -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=leM3WcXd; 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 S1752472AbeERQFU (ORCPT + 99 others); Fri, 18 May 2018 12:05:20 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:36516 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752319AbeERQFP (ORCPT ); Fri, 18 May 2018 12:05:15 -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=Q4T+Et3BGIwUGN1RGEC6tczb3jodO9eiu9VdN4wyEbc=; b=leM3WcXdrzPtNsD8SlMGJjuLs eVub4ZI4XiDg3TGthgoAvREQ++HZYVteTtFWf18RXGcYmBiL/eVIokMFPVynP3E14h6ZWcwJ7CsjS BbXabzEk2IilEMYISy2OTWArU5LBkAiqPjNwtxMeIC3P6bncfO9QvVCB/qwdbit0qSdie0kwlciMF bCpIIgVw7wiedD4ePB3dx3LFr9RmqCZ+1uiqAewFfW+VpC0WStoR1J6ZxMO7GFy5LJAu2cOdqSYk1 KJsYqaB5l3aIrBe2mbKoKCgvPBx5+W6XO74EW4RjG57PkVdQ1b17t1e0qsQhFxCMyid4GkoB384sk l845aAKrg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJhsX-00028p-2C; Fri, 18 May 2018 16:05:13 +0000 Date: Fri, 18 May 2018 09:05:12 -0700 From: Christoph Hellwig To: adam.manzanares@wdc.com Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, axboe@kernel.dk, bcrl@kvack.org, mingo@kernel.org, peterz@infradead.org, pombredanne@nexb.com, gregkh@linuxfoundation.org, bigeasy@linutronix.de, rgoldwyn@suse.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, linux-api@vger.kernel.org Subject: Re: [PATCH v4 2/3] fs: Convert kiocb rw_hint from enum to u16 Message-ID: <20180518160512.GG22791@infradead.org> References: <20180517203803.2664-1-adam.manzanares@wdc.com> <20180517203803.2664-3-adam.manzanares@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180517203803.2664-3-adam.manzanares@wdc.com> 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 > +/* ki_hint changed from enum to u16, make sure rw_hint fits into u16 */ I don't think this comment is very useful. > +static inline u16 ki_hint_valid(enum rw_hint hint) I'd call this ki_hint_validate. > +{ > + if (hint > MAX_KI_HINT) > + return 0; > + > + return hint; Nit: kill the empty line.