From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1112DC55178 for ; Tue, 27 Oct 2020 18:09:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B90A220790 for ; Tue, 27 Oct 2020 18:09:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1825226AbgJ0SJo (ORCPT ); Tue, 27 Oct 2020 14:09:44 -0400 Received: from mga12.intel.com ([192.55.52.136]:9203 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1825217AbgJ0SJm (ORCPT ); Tue, 27 Oct 2020 14:09:42 -0400 IronPort-SDR: JEnLh9ZEtsHb6ewntRzv3SXPUJIfU/kRNhz9nQnzYvURZeOJF5Q4p0wMbWFPulUF7ufsMqbsNF pU2LLLPGUOUg== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="147421441" X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="147421441" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 11:09:40 -0700 IronPort-SDR: VYjX1uZC3X25G35xyDKTk8SZYsNb9fPK8zadQ1Uckle7gf0h1ulU6LoxujXXLmCan0Ubs1gZZZ Xh16kgEnAMoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="334484334" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 27 Oct 2020 11:09:38 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9AD6E179; Tue, 27 Oct 2020 20:09:37 +0200 (EET) From: Andy Shevchenko To: Yury Norov , Rasmus Villemoes , linux-kernel@vger.kernel.org, Andrew Morton Cc: Andy Shevchenko Subject: [PATCH v1] bitmap: Convert bitmap_empty() / bitmap_full() to return boolean Date: Tue, 27 Oct 2020 20:09:36 +0200 Message-Id: <20201027180936.20806-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to return int type out of boolean expression. Signed-off-by: Andy Shevchenko --- include/linux/bitmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 2ee934484532..8f2689e73675 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -383,7 +383,7 @@ static inline int bitmap_subset(const unsigned long *src1, return __bitmap_subset(src1, src2, nbits); } -static inline int bitmap_empty(const unsigned long *src, unsigned nbits) +static inline bool bitmap_empty(const unsigned long *src, unsigned nbits) { if (small_const_nbits(nbits)) return ! (*src & BITMAP_LAST_WORD_MASK(nbits)); @@ -391,7 +391,7 @@ static inline int bitmap_empty(const unsigned long *src, unsigned nbits) return find_first_bit(src, nbits) == nbits; } -static inline int bitmap_full(const unsigned long *src, unsigned int nbits) +static inline bool bitmap_full(const unsigned long *src, unsigned int nbits) { if (small_const_nbits(nbits)) return ! (~(*src) & BITMAP_LAST_WORD_MASK(nbits)); -- 2.28.0