Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4326636pxv; Tue, 27 Jul 2021 04:50:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjHKidooDFKN+AEadScLNq/wgHbTqW8Gyeb0Z7xDvHDHS5QokzqY14DfHvAeVTbUAJrLAW X-Received: by 2002:a50:a456:: with SMTP id v22mr26899073edb.333.1627386659114; Tue, 27 Jul 2021 04:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627386659; cv=none; d=google.com; s=arc-20160816; b=nn12qH3BL8RFgu5icMoDgOOx5IpYgBLb8fxruNPH62R/HXqeG4KUi9YinMNLB0I2Cv ZCEEGgm4sQ4ZK1NaoBYlPqyx+dOiDCBalMDzx/hMKI1z/XsT8L2HHaBJWaT5RMxeyVL8 gl0H4+hiTvCNomrHxMFh2U3jszD1+v/21s4vhsdgYTuR4tre5gESqOZVHsx8rK+c6h2W 3JUHDDQOhs3O9VJoza/N6y91T4rSu5EW8Es0KE3qcl04tKGZUDYtLh1U/8ghvUnKkq2Q syqgYxlsC8XNHJo+Jtcj0z2WJceJAZEJQnCTqebkIIZkvtU4HsA06mReqD32WBirkbeh 9Jcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tJepvNUw85uH2kFJwTPjVJVuR0OlQ8ilggmi8JQNNBc=; b=GDRyn+mxf/77uQHzqN4pGTamdY42FPYPr2HmnuGMwtW0eOAcUrlWUjCuepGCAJYwqh Q/mMy4HtYqh/brHPuX8Lx3FTaLmhqfvVNetDGUQ29r/VuE14IDlNvBApGC7/KE9E+7ej Xj9oJ+YF33oDRjDMiixXf1bPfEsykC4CeBPluiFmSSOxLrOZhl9CqtYpegBR6IR3HpjL 6Bmfd+1vdjjP8e5mCR4udicbePyGqZEm50RvUw78YRxDTunMFU0kIT/SjW1HvljyjDDs nHg2Blxl+b6cKPzBFiDTq0/NNPShTbMDEcsr3F00K/RTgiu4+7b+CHQJBhLjcinEd7hU PGhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si2603098edd.27.2021.07.27.04.50.35; Tue, 27 Jul 2021 04:50:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236503AbhG0Lsy (ORCPT + 99 others); Tue, 27 Jul 2021 07:48:54 -0400 Received: from mga04.intel.com ([192.55.52.120]:7460 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbhG0Lsw (ORCPT ); Tue, 27 Jul 2021 07:48:52 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10057"; a="210535988" X-IronPort-AV: E=Sophos;i="5.84,273,1620716400"; d="scan'208";a="210535988" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2021 04:48:50 -0700 X-IronPort-AV: E=Sophos;i="5.84,273,1620716400"; d="scan'208";a="498457132" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2021 04:48:48 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1m8LZi-0016oq-7b; Tue, 27 Jul 2021 14:48:42 +0300 Date: Tue, 27 Jul 2021 14:48:42 +0300 From: Andy Shevchenko To: Andrea Merello Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, Yury Norov , Rasmus Villemoes , Andrea Merello Subject: Re: [PATCH v1 1/1] bitmap.h: add const modifier to bitmap_next_[set/clear]_region() argument Message-ID: References: <20210727094441.9815-1-andrea.merello@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210727094441.9815-1-andrea.merello@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 27, 2021 at 11:44:41AM +0200, Andrea Merello wrote: > Those two functions don't modify the bitmap, so their bitmap argument > should be const. This patch add this. Constification is always a good thing. No objections from me, although Yuri is doing something with them in one of his patch series. Yuri, do you have a public repo / branch that people can base their changes to bitmap stuff against of? Reviewed-by: Andy Shevchenko > Signed-off-by: Andrea Merello > --- > 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 a36cfcec4e77..ea4a8f1a2545 100644 > --- a/include/linux/bitmap.h > +++ b/include/linux/bitmap.h > @@ -458,7 +458,7 @@ static inline void bitmap_replace(unsigned long *dst, > __bitmap_replace(dst, old, new, mask, nbits); > } > > -static inline void bitmap_next_clear_region(unsigned long *bitmap, > +static inline void bitmap_next_clear_region(const unsigned long *bitmap, > unsigned int *rs, unsigned int *re, > unsigned int end) > { > @@ -466,7 +466,7 @@ static inline void bitmap_next_clear_region(unsigned long *bitmap, > *re = find_next_bit(bitmap, end, *rs + 1); > } > > -static inline void bitmap_next_set_region(unsigned long *bitmap, > +static inline void bitmap_next_set_region(const unsigned long *bitmap, > unsigned int *rs, unsigned int *re, > unsigned int end) > { > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko