{"thread":{"id":"48742","subject":"[PATCH] ewah: delete unused 'rlwit_discharge_empty()'","startedAt":"2018-06-19T21:51:27Z","lastAt":"2018-06-21T16:39:28Z","messageCount":3,"participants":["Ramsay Jones","Derrick Stolee","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"350538","messageId":"7bfb528f-ef65-4de6-7d01-6ca91f0072e7@ramsayjones.plus.com","threadId":"48742","inReplyTo":null,"subject":"[PATCH] ewah: delete unused 'rlwit_discharge_empty()'","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2018-06-19T21:51:20Z","receivedAt":"2018-06-19T21:51:27Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nComplete the removal of unused 'ewah bitmap' code by removing the now\nunused 'rlwit_discharge_empty()' function. Also, the 'ewah_clear()'\nfunction can now be made a file-scope static symbol.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Junio,\n\nCan you please add this to the 'ds/ewah-cleanup' branch, before\nwe forget to do so! ;-)\n\nThanks!\n\nATB,\nRamsay Jones\n\n ewah/ewah_bitmap.c | 20 ++++++++++++--------\n ewah/ewah_rlw.c    |  8 --------\n ewah/ewok.h        |  6 ------\n ewah/ewok_rlw.h    |  1 -\n 4 files changed, 12 insertions(+), 23 deletions(-)\n\ndiff --git a/ewah/ewah_bitmap.c b/ewah/ewah_bitmap.c\nindex 017c677f9..d59b1afe3 100644\n--- a/ewah/ewah_bitmap.c\n+++ b/ewah/ewah_bitmap.c\n@@ -276,6 +276,18 @@ void ewah_each_bit(struct ewah_bitmap *self, void (*callback)(size_t, void*), vo\n \t}\n }\n \n+/**\n+ * Clear all the bits in the bitmap. Does not free or resize\n+ * memory.\n+ */\n+static void ewah_clear(struct ewah_bitmap *self)\n+{\n+\tself->buffer_size = 1;\n+\tself->buffer[0] = 0;\n+\tself->bit_size = 0;\n+\tself->rlw = self->buffer;\n+}\n+\n struct ewah_bitmap *ewah_new(void)\n {\n \tstruct ewah_bitmap *self;\n@@ -288,14 +300,6 @@ struct ewah_bitmap *ewah_new(void)\n \treturn self;\n }\n \n-void ewah_clear(struct ewah_bitmap *self)\n-{\n-\tself->buffer_size = 1;\n-\tself->buffer[0] = 0;\n-\tself->bit_size = 0;\n-\tself->rlw = self->buffer;\n-}\n-\n void ewah_free(struct ewah_bitmap *self)\n {\n \tif (!self)\ndiff --git a/ewah/ewah_rlw.c b/ewah/ewah_rlw.c\nindex b9643b7d0..5093d43e2 100644\n--- a/ewah/ewah_rlw.c\n+++ b/ewah/ewah_rlw.c\n@@ -104,11 +104,3 @@ size_t rlwit_discharge(\n \n \treturn index;\n }\n-\n-void rlwit_discharge_empty(struct rlw_iterator *it, struct ewah_bitmap *out)\n-{\n-\twhile (rlwit_word_size(it) > 0) {\n-\t\tewah_add_empty_words(out, 0, rlwit_word_size(it));\n-\t\trlwit_discard_first_words(it, rlwit_word_size(it));\n-\t}\n-}\ndiff --git a/ewah/ewok.h b/ewah/ewok.h\nindex 0c504f28e..84b2a29fa 100644\n--- a/ewah/ewok.h\n+++ b/ewah/ewok.h\n@@ -72,12 +72,6 @@ void ewah_pool_free(struct ewah_bitmap *self);\n  */\n struct ewah_bitmap *ewah_new(void);\n \n-/**\n- * Clear all the bits in the bitmap. Does not free or resize\n- * memory.\n- */\n-void ewah_clear(struct ewah_bitmap *self);\n-\n /**\n  * Free all the memory of the bitmap\n  */\ndiff --git a/ewah/ewok_rlw.h b/ewah/ewok_rlw.h\nindex bb3c6ff7e..7cdfdd0c0 100644\n--- a/ewah/ewok_rlw.h\n+++ b/ewah/ewok_rlw.h\n@@ -98,7 +98,6 @@ void rlwit_init(struct rlw_iterator *it, struct ewah_bitmap *bitmap);\n void rlwit_discard_first_words(struct rlw_iterator *it, size_t x);\n size_t rlwit_discharge(\n \tstruct rlw_iterator *it, struct ewah_bitmap *out, size_t max, int negate);\n-void rlwit_discharge_empty(struct rlw_iterator *it, struct ewah_bitmap *out);\n \n static inline size_t rlwit_word_size(struct rlw_iterator *it)\n {\n-- \n2.17.0\n"},{"id":"350548","messageId":"795ca948-1633-a1f7-1d7c-88ace8361445@gmail.com","threadId":"48742","inReplyTo":"7bfb528f-ef65-4de6-7d01-6ca91f0072e7@ramsayjones.plus.com","subject":"Re: [PATCH] ewah: delete unused 'rlwit_discharge_empty()'","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-06-19T23:49:00Z","receivedAt":"2018-06-19T23:49:08Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 6/19/2018 5:51 PM, Ramsay Jones wrote:\n> From: Junio C Hamano <gitster@pobox.com>\n>\n> Complete the removal of unused 'ewah bitmap' code by removing the now\n> unused 'rlwit_discharge_empty()' function. Also, the 'ewah_clear()'\n> function can now be made a file-scope static symbol.\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n> ---\n>\n> Hi Junio,\n>\n> Can you please add this to the 'ds/ewah-cleanup' branch, before\n> we forget to do so! ;-)\n>\n> Thanks!\n>\n> ATB,\n> Ramsay Jones\n\n\nLooks good to me! Thanks!\n\n-Stolee\n\n\n>\n>   ewah/ewah_bitmap.c | 20 ++++++++++++--------\n>   ewah/ewah_rlw.c    |  8 --------\n>   ewah/ewok.h        |  6 ------\n>   ewah/ewok_rlw.h    |  1 -\n>   4 files changed, 12 insertions(+), 23 deletions(-)\n>\n> diff --git a/ewah/ewah_bitmap.c b/ewah/ewah_bitmap.c\n> index 017c677f9..d59b1afe3 100644\n> --- a/ewah/ewah_bitmap.c\n> +++ b/ewah/ewah_bitmap.c\n> @@ -276,6 +276,18 @@ void ewah_each_bit(struct ewah_bitmap *self, void (*callback)(size_t, void*), vo\n>   \t}\n>   }\n>   \n> +/**\n> + * Clear all the bits in the bitmap. Does not free or resize\n> + * memory.\n> + */\n> +static void ewah_clear(struct ewah_bitmap *self)\n> +{\n> +\tself->buffer_size = 1;\n> +\tself->buffer[0] = 0;\n> +\tself->bit_size = 0;\n> +\tself->rlw = self->buffer;\n> +}\n> +\n>   struct ewah_bitmap *ewah_new(void)\n>   {\n>   \tstruct ewah_bitmap *self;\n> @@ -288,14 +300,6 @@ struct ewah_bitmap *ewah_new(void)\n>   \treturn self;\n>   }\n>   \n> -void ewah_clear(struct ewah_bitmap *self)\n> -{\n> -\tself->buffer_size = 1;\n> -\tself->buffer[0] = 0;\n> -\tself->bit_size = 0;\n> -\tself->rlw = self->buffer;\n> -}\n> -\n>   void ewah_free(struct ewah_bitmap *self)\n>   {\n>   \tif (!self)\n> diff --git a/ewah/ewah_rlw.c b/ewah/ewah_rlw.c\n> index b9643b7d0..5093d43e2 100644\n> --- a/ewah/ewah_rlw.c\n> +++ b/ewah/ewah_rlw.c\n> @@ -104,11 +104,3 @@ size_t rlwit_discharge(\n>   \n>   \treturn index;\n>   }\n> -\n> -void rlwit_discharge_empty(struct rlw_iterator *it, struct ewah_bitmap *out)\n> -{\n> -\twhile (rlwit_word_size(it) > 0) {\n> -\t\tewah_add_empty_words(out, 0, rlwit_word_size(it));\n> -\t\trlwit_discard_first_words(it, rlwit_word_size(it));\n> -\t}\n> -}\n> diff --git a/ewah/ewok.h b/ewah/ewok.h\n> index 0c504f28e..84b2a29fa 100644\n> --- a/ewah/ewok.h\n> +++ b/ewah/ewok.h\n> @@ -72,12 +72,6 @@ void ewah_pool_free(struct ewah_bitmap *self);\n>    */\n>   struct ewah_bitmap *ewah_new(void);\n>   \n> -/**\n> - * Clear all the bits in the bitmap. Does not free or resize\n> - * memory.\n> - */\n> -void ewah_clear(struct ewah_bitmap *self);\n> -\n>   /**\n>    * Free all the memory of the bitmap\n>    */\n> diff --git a/ewah/ewok_rlw.h b/ewah/ewok_rlw.h\n> index bb3c6ff7e..7cdfdd0c0 100644\n> --- a/ewah/ewok_rlw.h\n> +++ b/ewah/ewok_rlw.h\n> @@ -98,7 +98,6 @@ void rlwit_init(struct rlw_iterator *it, struct ewah_bitmap *bitmap);\n>   void rlwit_discard_first_words(struct rlw_iterator *it, size_t x);\n>   size_t rlwit_discharge(\n>   \tstruct rlw_iterator *it, struct ewah_bitmap *out, size_t max, int negate);\n> -void rlwit_discharge_empty(struct rlw_iterator *it, struct ewah_bitmap *out);\n>   \n>   static inline size_t rlwit_word_size(struct rlw_iterator *it)\n>   {\n"},{"id":"350654","messageId":"xmqqk1qst7ph.fsf@gitster-ct.c.googlers.com","threadId":"48742","inReplyTo":"795ca948-1633-a1f7-1d7c-88ace8361445@gmail.com","subject":"Re: [PATCH] ewah: delete unused 'rlwit_discharge_empty()'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-06-21T16:39:22Z","receivedAt":"2018-06-21T16:39:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Derrick Stolee <stolee@gmail.com> writes:\n\n> On 6/19/2018 5:51 PM, Ramsay Jones wrote:\n>> From: Junio C Hamano <gitster@pobox.com>\n>>\n>> Complete the removal of unused 'ewah bitmap' code by removing the now\n>> unused 'rlwit_discharge_empty()' function. Also, the 'ewah_clear()'\n>> function can now be made a file-scope static symbol.\n>>\n>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n>> ---\n>>\n>> Hi Junio,\n>>\n>> Can you please add this to the 'ds/ewah-cleanup' branch, before\n>> we forget to do so! ;-)\n>>\n>> Thanks!\n>>\n>> ATB,\n>> Ramsay Jones\n>\n>\n> Looks good to me! Thanks!\n\nWill do; thanks.\n"}]}