From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <5631E441.6030600@metafoo.de> Date: Thu, 29 Oct 2015 10:17:53 +0100 From: Lars-Peter Clausen MIME-Version: 1.0 To: Nicola Corna , Wolfram Sang , Stephen Warren , Lee Jones , Eric Anholt , Jonathan Cameron CC: linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Hartmut Knaack , Peter Meerwald , linux-iio@vger.kernel.org Subject: Re: [PATCH v4 4/4] iio: humidity: si7020: added No Hold read mode References: <563117FB.5030506@metafoo.de> <5630977D.2020102@metafoo.de> <1446015506-21371-1-git-send-email-nicola@corna.info> In-Reply-To: Content-Type: text/plain; charset=utf-8 List-ID: >> So maybe more like this: >> >> static inline bool i2c_check_quirks(struct i2c_adapter *adap, u64 quirks) >> { >> if (!adap->quirks) >> return false; >> return (adap->quirks->flags & quirks) == quirks; >> } > > Should I use bool (like in your snippet) or int (like i2c_check_functionality) as return type? I'd use bool, given that the result is a boolean value. It's semantically more clear this way.