lkml.org 
[lkml]   [2022]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 13/16] null_blk: allow non power of 2 zoned devices
From
On 4/27/22 09:02, Pankaj Raghav wrote:
> diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
> index c441a4972064..82a62b543782 100644
> --- a/drivers/block/null_blk/main.c
> +++ b/drivers/block/null_blk/main.c
> @@ -1931,8 +1931,8 @@ static int null_validate_conf(struct nullb_device *dev)
> dev->mbps = 0;
>
> if (dev->zoned &&
> - (!dev->zone_size || !is_power_of_2(dev->zone_size))) {
> - pr_err("zone_size must be power-of-two\n");
> + (!dev->zone_size)) {
> + pr_err("zone_size must not be zero\n");
> return -EINVAL;
> }

Please combine "if (dev->zoned &&" and "(!dev->zone_size)) {" into a
single line and leave out the parentheses that became superfluous.

Thanks,

Bart.

\
 
 \ /
  Last update: 2022-05-03 19:03    [W:0.816 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site