From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755382AbbBBLJX (ORCPT ); Mon, 2 Feb 2015 06:09:23 -0500 Received: from mail-la0-f52.google.com ([209.85.215.52]:48091 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540AbbBBLJT (ORCPT ); Mon, 2 Feb 2015 06:09:19 -0500 From: Rasmus Villemoes To: yury.norov@gmail.com Cc: klimov.linux@gmail.com, davem@davemloft.net, akpm@linux-foundation.org, hannes@stressinduktion.org, dborkman@redhat.com, laijs@cn.fujitsu.com, takahiro.akashi@linaro.org, valentinrothberg@gmail.com, linux@horizon.com, msalter@redhat.com, chris@chris-wilson.co.uk, tgraf@suug.ch, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/3] lib: rename lib/find_next_bit.c to lib/find_bit.c Organization: D03 References: <1422737907-26114-1-git-send-email-yury.norov@gmail.com> <1422737907-26114-3-git-send-email-yury.norov@gmail.com> X-Hashcash: 1:20:150202:chris@chris-wilson.co.uk::naKpEK5O9c0mkr8j:00000000000000000000000000000000000000bMd X-Hashcash: 1:20:150202:msalter@redhat.com::1vrc3DHPHRTv32VG:00000000000000000000000000000000000000000000efF X-Hashcash: 1:20:150202:linux@horizon.com::Z3bwR8VmfaR7mX4a:000000000000000000000000000000000000000000000h8c X-Hashcash: 1:20:150202:hannes@stressinduktion.org::EbTI6ANXtz0fvehG:000000000000000000000000000000000000arJ X-Hashcash: 1:20:150202:klimov.linux@gmail.com::67DTjG8+ociCMeVF:0000000000000000000000000000000000000000Gd8 X-Hashcash: 1:20:150202:yury.norov@gmail.com::c9mY6rIU12bBnbS+:000000000000000000000000000000000000000000Kuj X-Hashcash: 1:20:150202:laijs@cn.fujitsu.com::mA1skFvBydeEHIjt:000000000000000000000000000000000000000001a6g X-Hashcash: 1:20:150202:valentinrothberg@gmail.com::dnnc2m5Ptfr34DwT:000000000000000000000000000000000001dqq X-Hashcash: 1:20:150202:akpm@linux-foundation.org::MFvhakUJjSkNYx/Q:0000000000000000000000000000000000001lxC X-Hashcash: 1:20:150202:davem@davemloft.net::jr48YSPXGlALolEO:0000000000000000000000000000000000000000001njc X-Hashcash: 1:20:150202:takahiro.akashi@linaro.org::LOiDdUVyk4dLbQFi:000000000000000000000000000000000002YqO X-Hashcash: 1:20:150202:tgraf@suug.ch::HR+PGwEkIgdxzF5U:00007/lZ X-Hashcash: 1:20:150202:linux-kernel@vger.kernel.org::CnxSnaIFhODWfdPV:0000000000000000000000000000000007pYx X-Hashcash: 1:20:150202:dborkman@redhat.com::VGKSo0m7jSqQBEp+:000000000000000000000000000000000000000000979J Date: Mon, 02 Feb 2015 12:09:15 +0100 In-Reply-To: <1422737907-26114-3-git-send-email-yury.norov@gmail.com> (yury norov's message of "Sat, 31 Jan 2015 23:58:27 +0300") Message-ID: <874mr4r2n8.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 31 2015, yury.norov@gmail.com wrote: > From: Yury Norov > > This file contains implementation for: > - find_last_bit; > - find_first_zero_bit; > - find_first_bit; > - find_next_zero_bit; > - find_next_bit. > [and a few _le variants] > So giving more generic name looks reasonable. It does. But it is a little annoying that it is not shown as a pure rename. > Signed-off-by: Yury Norov > --- > lib/Makefile | 2 +- > lib/find_bit.c | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > lib/find_next_bit.c | 192 --------------------------------------------------- > 3 files changed, 195 insertions(+), 193 deletions(-) > create mode 100644 lib/find_bit.c > delete mode 100644 lib/find_next_bit.c > > diff --git a/lib/Makefile b/lib/Makefile > index 13990aa..1cc93f4 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -25,7 +25,7 @@ obj-y += lockref.o > obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ > bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ > gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \ > - bsearch.o find_next_bit.o llist.o memweight.o kfifo.o \ > + bsearch.o find_bit.o llist.o memweight.o kfifo.o \ > percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o > obj-y += string_helpers.o > obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o > diff --git a/lib/find_bit.c b/lib/find_bit.c > new file mode 100644 > index 0000000..236a850 > --- /dev/null > +++ b/lib/find_bit.c > @@ -0,0 +1,194 @@ > +/* find_bit.c: generic implementation fore: > + * find_last_bit; find_first_zero_bit; find_first_bit; > + * find_next_zero_bit; find_next_bit. > + * [trivial typo: s/fore/for/] I _think_ the cause of the 2-line descrepancy is this change in a comment, but it's hard to tell for sure. There's no simple way of telling whether the other 192 lines are actually the same or if subtle changes have been introduced. This is one reason hard-coding the name of a file inside the file is a bad idea. I'd suggest tweaking that comment in one of the earlier patches, for example the one moving find_last_bit to find_next_bit.c, making sure to remove the filename. Then this patch can be a simple 'git mv' and the same two-line change of the Makefile. Rasmus