Re: [PATCH for-next] null_blk: add configfs variable shared_tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 17, 2024 / 04:13, Chaitanya Kulkarni wrote:
...
> > diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
> > index 36755f263e8e..c3361e521564 100644
> > --- a/drivers/block/null_blk/main.c
> > +++ b/drivers/block/null_blk/main.c
> > @@ -69,6 +69,7 @@ static LIST_HEAD(nullb_list);
> >   static struct mutex lock;
> >   static int null_major;
> >   static DEFINE_IDA(nullb_indexes);
> > +static bool tag_set_initialized = false;
> 
> explicit initializing global bool to false really needed ?

That was the point I was not clear. Some of global variables in
drivers/block/null_blk/main.c are explicitly initialized, like:

  ...
  static bool g_virt_boundary = false;
  module_param_named(virt_boundary, g_virt_boundary, bool, 0444);
  MODULE_PARM_DESC(virt_boundary, "Require a virtual boundary for the device. Default: False");
  ...

But I guess these existing global variables are explicitly initialized because
they are used to store module parameters.

The variable I introduced is not a module parameter, so now I think it should
not be initialized. Will send v2 with the fix.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux