From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
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
Date: Mon, 02 Feb 2015 12:09:15 +0100 [thread overview]
Message-ID: <874mr4r2n8.fsf@rasmusvillemoes.dk> (raw)
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")
On Sat, Jan 31 2015, yury.norov@gmail.com wrote:
> From: Yury Norov <yury.norov@gmail.com>
>
> 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 <yury.norov@gmail.com>
> ---
> 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
next prev parent reply other threads:[~2015-02-02 11:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 20:58 [PATCH v2 1/3] lib: find_*_bit reimplementation yury.norov
2015-01-31 20:58 ` [PATCH v2 2/3] lib: move find_last_bit to lib/find_next_bit.c yury.norov
2015-01-31 20:58 ` [PATCH v2 3/3] lib: rename lib/find_next_bit.c to lib/find_bit.c yury.norov
2015-02-02 11:09 ` Rasmus Villemoes [this message]
2015-02-02 3:17 ` [PATCH v2 1/3] lib: find_*_bit reimplementation George Spelvin
2015-02-04 23:07 ` Yury
2015-02-02 10:43 ` Rasmus Villemoes
2015-02-02 11:47 ` George Spelvin
2015-02-02 12:56 ` Rasmus Villemoes
2015-02-04 23:45 ` Yury
2015-02-05 14:51 ` Rasmus Villemoes
2015-02-04 22:52 ` Yury
2015-02-05 15:01 ` Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mr4r2n8.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=chris@chris-wilson.co.uk \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=hannes@stressinduktion.org \
--cc=klimov.linux@gmail.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=msalter@redhat.com \
--cc=takahiro.akashi@linaro.org \
--cc=tgraf@suug.ch \
--cc=valentinrothberg@gmail.com \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®