From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Sterba Subject: Re: [RFC PATCH v3 1/5] new helper: iov_iter_rw() Date: Wed, 18 Mar 2015 14:42:32 +0100 Message-ID: <20150318134232.GZ20767@suse.cz> References: <20150317181910.GK29656@ZenIV.linux.org.uk> Reply-To: dsterba@suse.cz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Omar Sandoval Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Mar 17, 2015 at 02:04:02PM -0700, Omar Sandoval wrote: > /* > + * Get one of READ or WRITE out of iter->type without any other flags OR'd in > + * with it. > + * > + * The ?: is just for type safety. > + */ > +#define iov_iter_rw(i) ((0 ? (struct iov_iter *)0 : (i))->type & RW_MASK) I'm fine with that, thanks.