Re: [PATCH 1/8] ewah/bitmap.c: delete unused 'bitmap_clear()'

2018-06-15 Thread Derrick Stolee

On 6/15/2018 10:46 AM, Ramsay Jones wrote:


On 15/06/18 15:30, Derrick Stolee wrote:

Reported-by: Ramsay Jones 
Signed-off-by: Derrick Stolee 
---
  ewah/bitmap.c | 8 
  1 file changed, 8 deletions(-)

diff --git a/ewah/bitmap.c b/ewah/bitmap.c
index 756bdd050e..d61dc6114a 100644
--- a/ewah/bitmap.c
+++ b/ewah/bitmap.c
@@ -45,14 +45,6 @@ void bitmap_set(struct bitmap *self, size_t pos)
self->words[block] |= EWAH_MASK(pos);
  }
  
-void bitmap_clear(struct bitmap *self, size_t pos)

-{
-   size_t block = EWAH_BLOCK(pos);
-
-   if (block < self->word_alloc)
-   self->words[block] &= ~EWAH_MASK(pos);
-}
-
  int bitmap_get(struct bitmap *self, size_t pos)
  {
size_t block = EWAH_BLOCK(pos);


I haven't read all the patches yet, but what about the extern
declaration in ewah/ewok.h?


Thanks! I'll get that, too.


Re: [PATCH 1/8] ewah/bitmap.c: delete unused 'bitmap_clear()'

2018-06-15 Thread Ramsay Jones



On 15/06/18 15:30, Derrick Stolee wrote:
> Reported-by: Ramsay Jones 
> Signed-off-by: Derrick Stolee 
> ---
>  ewah/bitmap.c | 8 
>  1 file changed, 8 deletions(-)
> 
> diff --git a/ewah/bitmap.c b/ewah/bitmap.c
> index 756bdd050e..d61dc6114a 100644
> --- a/ewah/bitmap.c
> +++ b/ewah/bitmap.c
> @@ -45,14 +45,6 @@ void bitmap_set(struct bitmap *self, size_t pos)
>   self->words[block] |= EWAH_MASK(pos);
>  }
>  
> -void bitmap_clear(struct bitmap *self, size_t pos)
> -{
> - size_t block = EWAH_BLOCK(pos);
> -
> - if (block < self->word_alloc)
> - self->words[block] &= ~EWAH_MASK(pos);
> -}
> -
>  int bitmap_get(struct bitmap *self, size_t pos)
>  {
>   size_t block = EWAH_BLOCK(pos);
> 

I haven't read all the patches yet, but what about the extern
declaration in ewah/ewok.h?

ATB,
Ramsay Jones




[PATCH 1/8] ewah/bitmap.c: delete unused 'bitmap_clear()'

2018-06-15 Thread Derrick Stolee
Reported-by: Ramsay Jones 
Signed-off-by: Derrick Stolee 
---
 ewah/bitmap.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/ewah/bitmap.c b/ewah/bitmap.c
index 756bdd050e..d61dc6114a 100644
--- a/ewah/bitmap.c
+++ b/ewah/bitmap.c
@@ -45,14 +45,6 @@ void bitmap_set(struct bitmap *self, size_t pos)
self->words[block] |= EWAH_MASK(pos);
 }
 
-void bitmap_clear(struct bitmap *self, size_t pos)
-{
-   size_t block = EWAH_BLOCK(pos);
-
-   if (block < self->word_alloc)
-   self->words[block] &= ~EWAH_MASK(pos);
-}
-
 int bitmap_get(struct bitmap *self, size_t pos)
 {
size_t block = EWAH_BLOCK(pos);
-- 
2.18.0.rc1