diff mbox series

[2/2] dm zoned: Remove set but unused variables

Message ID 20200708002023.738147-3-damien.lemoal@wdc.com (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show
Series dm zoned fixes for 5.8 | expand

Commit Message

Damien Le Moal July 8, 2020, 12:20 a.m. UTC
In dmz_reclaim_work(), the variables nr_unmap_rnd and nr_rnd are set but
unused. Remove them.

Fixes: f97809aec589 ("dm zoned: per-device reclaim")
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 drivers/md/dm-zoned-reclaim.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Hannes Reinecke July 8, 2020, 7:06 a.m. UTC | #1
On 7/8/20 2:20 AM, Damien Le Moal wrote:
> In dmz_reclaim_work(), the variables nr_unmap_rnd and nr_rnd are set but
> unused. Remove them.
> 
> Fixes: f97809aec589 ("dm zoned: per-device reclaim")
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
>   drivers/md/dm-zoned-reclaim.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c
> index 9c6e264465bc..9c0ecc9568a4 100644
> --- a/drivers/md/dm-zoned-reclaim.c
> +++ b/drivers/md/dm-zoned-reclaim.c
> @@ -503,7 +503,7 @@ static void dmz_reclaim_work(struct work_struct *work)
>   {
>   	struct dmz_reclaim *zrc = container_of(work, struct dmz_reclaim, work.work);
>   	struct dmz_metadata *zmd = zrc->metadata;
> -	unsigned int p_unmap, nr_unmap_rnd = 0, nr_rnd = 0;
> +	unsigned int p_unmap;
>   	int ret;
>   
>   	if (dmz_dev_is_dying(zmd))
> @@ -529,9 +529,6 @@ static void dmz_reclaim_work(struct work_struct *work)
>   		zrc->kc_throttle.throttle = min(75U, 100U - p_unmap / 2);
>   	}
>   
> -	nr_unmap_rnd = dmz_nr_unmap_rnd_zones(zmd, zrc->dev_idx);
> -	nr_rnd = dmz_nr_rnd_zones(zmd, zrc->dev_idx);
> -
>   	DMDEBUG("(%s/%u): Reclaim (%u): %s, %u%% free zones (%u/%u cache %u/%u random)",
>   		dmz_metadata_label(zmd), zrc->dev_idx,
>   		zrc->kc_throttle.throttle,
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
Mike Snitzer July 8, 2020, 2:12 p.m. UTC | #2
On Tue, Jul 07 2020 at  8:20pm -0400,
Damien Le Moal <damien.lemoal@wdc.com> wrote:

> In dmz_reclaim_work(), the variables nr_unmap_rnd and nr_rnd are set but
> unused. Remove them.
> 
> Fixes: f97809aec589 ("dm zoned: per-device reclaim")
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
>  drivers/md/dm-zoned-reclaim.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c
> index 9c6e264465bc..9c0ecc9568a4 100644
> --- a/drivers/md/dm-zoned-reclaim.c
> +++ b/drivers/md/dm-zoned-reclaim.c
> @@ -503,7 +503,7 @@ static void dmz_reclaim_work(struct work_struct *work)
>  {
>  	struct dmz_reclaim *zrc = container_of(work, struct dmz_reclaim, work.work);
>  	struct dmz_metadata *zmd = zrc->metadata;
> -	unsigned int p_unmap, nr_unmap_rnd = 0, nr_rnd = 0;
> +	unsigned int p_unmap;
>  	int ret;
>  
>  	if (dmz_dev_is_dying(zmd))
> @@ -529,9 +529,6 @@ static void dmz_reclaim_work(struct work_struct *work)
>  		zrc->kc_throttle.throttle = min(75U, 100U - p_unmap / 2);
>  	}
>  
> -	nr_unmap_rnd = dmz_nr_unmap_rnd_zones(zmd, zrc->dev_idx);
> -	nr_rnd = dmz_nr_rnd_zones(zmd, zrc->dev_idx);
> -
>  	DMDEBUG("(%s/%u): Reclaim (%u): %s, %u%% free zones (%u/%u cache %u/%u random)",
>  		dmz_metadata_label(zmd), zrc->dev_idx,
>  		zrc->kc_throttle.throttle,
> -- 
> 2.26.2
> 

I picked up the same change, that was submitted earlier, for 5.8:
https://patchwork.kernel.org/patch/11641031/

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Damien Le Moal July 9, 2020, 1:44 a.m. UTC | #3
On 2020/07/09 0:14, Mike Snitzer wrote:
> On Tue, Jul 07 2020 at  8:20pm -0400,
> Damien Le Moal <damien.lemoal@wdc.com> wrote:
> 
>> In dmz_reclaim_work(), the variables nr_unmap_rnd and nr_rnd are set but
>> unused. Remove them.
>>
>> Fixes: f97809aec589 ("dm zoned: per-device reclaim")
>> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
>> ---
>>  drivers/md/dm-zoned-reclaim.c | 5 +----
>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c
>> index 9c6e264465bc..9c0ecc9568a4 100644
>> --- a/drivers/md/dm-zoned-reclaim.c
>> +++ b/drivers/md/dm-zoned-reclaim.c
>> @@ -503,7 +503,7 @@ static void dmz_reclaim_work(struct work_struct *work)
>>  {
>>  	struct dmz_reclaim *zrc = container_of(work, struct dmz_reclaim, work.work);
>>  	struct dmz_metadata *zmd = zrc->metadata;
>> -	unsigned int p_unmap, nr_unmap_rnd = 0, nr_rnd = 0;
>> +	unsigned int p_unmap;
>>  	int ret;
>>  
>>  	if (dmz_dev_is_dying(zmd))
>> @@ -529,9 +529,6 @@ static void dmz_reclaim_work(struct work_struct *work)
>>  		zrc->kc_throttle.throttle = min(75U, 100U - p_unmap / 2);
>>  	}
>>  
>> -	nr_unmap_rnd = dmz_nr_unmap_rnd_zones(zmd, zrc->dev_idx);
>> -	nr_rnd = dmz_nr_rnd_zones(zmd, zrc->dev_idx);
>> -
>>  	DMDEBUG("(%s/%u): Reclaim (%u): %s, %u%% free zones (%u/%u cache %u/%u random)",
>>  		dmz_metadata_label(zmd), zrc->dev_idx,
>>  		zrc->kc_throttle.throttle,
>> -- 
>> 2.26.2
>>
> 
> I picked up the same change, that was submitted earlier, for 5.8:
> https://patchwork.kernel.org/patch/11641031/

Oops. Forgot about this one...
Thanks !

> 
>
diff mbox series

Patch

diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c
index 9c6e264465bc..9c0ecc9568a4 100644
--- a/drivers/md/dm-zoned-reclaim.c
+++ b/drivers/md/dm-zoned-reclaim.c
@@ -503,7 +503,7 @@  static void dmz_reclaim_work(struct work_struct *work)
 {
 	struct dmz_reclaim *zrc = container_of(work, struct dmz_reclaim, work.work);
 	struct dmz_metadata *zmd = zrc->metadata;
-	unsigned int p_unmap, nr_unmap_rnd = 0, nr_rnd = 0;
+	unsigned int p_unmap;
 	int ret;
 
 	if (dmz_dev_is_dying(zmd))
@@ -529,9 +529,6 @@  static void dmz_reclaim_work(struct work_struct *work)
 		zrc->kc_throttle.throttle = min(75U, 100U - p_unmap / 2);
 	}
 
-	nr_unmap_rnd = dmz_nr_unmap_rnd_zones(zmd, zrc->dev_idx);
-	nr_rnd = dmz_nr_rnd_zones(zmd, zrc->dev_idx);
-
 	DMDEBUG("(%s/%u): Reclaim (%u): %s, %u%% free zones (%u/%u cache %u/%u random)",
 		dmz_metadata_label(zmd), zrc->dev_idx,
 		zrc->kc_throttle.throttle,