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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB944C43334 for ; Sat, 2 Jul 2022 11:58:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbiGBL6O (ORCPT ); Sat, 2 Jul 2022 07:58:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232285AbiGBL6B (ORCPT ); Sat, 2 Jul 2022 07:58:01 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E87D613F0D; Sat, 2 Jul 2022 04:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656763079; x=1688299079; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=re3LFd38nLBlu3MQiWD1Ny6wrWGEckMsB9soYe/z/cY=; b=cTjwzHOQVxjy8OoznS3kmtCaQEwEMI8xKkmcjN43xbg4Zb+YdQiLOcCZ JjN3mK18CCJuz/fHzyffyVcN9aLbeYoL0zkoI5DggQJH6WqDD7EjV3NcR fitx1/mon4tS/913OkkrseBAiVrR4tBBdzppp2BD/DxDZAlQQ0tdkNskZ Mp8pbyoveJx4vK41Hyh5/d3aB0ds0lxno0f2BHzyL16efBBryksAOuKUl EcPPbBEW+GxSlnSBkg+LC4iWMT8Cr0eVCSqC45RyqmJsWWGGwYzCLwLKf mj85zdo5lWdS1YJUsN58w07cApc3P79cI6XFfYmpmIEmgXhIP7MbqCu8K w==; X-IronPort-AV: E=McAfee;i="6400,9594,10395"; a="346808172" X-IronPort-AV: E=Sophos;i="5.92,239,1650956400"; d="scan'208";a="346808172" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2022 04:57:59 -0700 X-IronPort-AV: E=Sophos;i="5.92,239,1650956400"; d="scan'208";a="541992929" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2022 04:57:55 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1o7bl1-0013ah-1H; Sat, 02 Jul 2022 14:57:51 +0300 Date: Sat, 2 Jul 2022 14:57:51 +0300 From: Andy Shevchenko To: Yury Norov Cc: linux-kernel@vger.kernel.org, Andrew Morton , David Howells , Geert Uytterhoeven , Jonathan Corbet , "Kirill A . Shutemov" , Matthew Wilcox , NeilBrown , Rasmus Villemoes , Russell King , Vlastimil Babka , William Kucharski , linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org Subject: Re: [PATCH 3/8] lib/bitmap: change type of bitmap_weight to unsigned int Message-ID: References: <20220701125430.2907638-1-yury.norov@gmail.com> <20220701125430.2907638-4-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220701125430.2907638-4-yury.norov@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Fri, Jul 01, 2022 at 05:54:25AM -0700, Yury Norov wrote: > bitmap_weight() doesn't return negative values, so change it's type > to unsigned int. Patch (the code) suggests something else. > It may help compiler to generate better code and > catch bugs. ... > -int __bitmap_weight(const unsigned long *bitmap, unsigned int nbits); > +unsigned long __bitmap_weight(const unsigned long *bitmap, unsigned int nbits); -- With Best Regards, Andy Shevchenko