From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [PATCH v4 4/4] iio: humidity: si7020: added No Hold read mode Date: Thu, 29 Oct 2015 10:17:53 +0100 Message-ID: <5631E441.6030600@metafoo.de> References: <563117FB.5030506@metafoo.de> <5630977D.2020102@metafoo.de> <1446015506-21371-1-git-send-email-nicola@corna.info> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-out-198.synserver.de ([212.40.185.198]:1061 "EHLO smtp-out-188.synserver.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756246AbbJ2JSB (ORCPT ); Thu, 29 Oct 2015 05:18:01 -0400 In-Reply-To: Sender: linux-i2c-owner@vger.kernel.org List-Id: linux-i2c@vger.kernel.org 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 >> 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.