Re: spi: cadence-xspi: Drop useless assignment to NULL

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

 



>>>>>>> Static structs are initialized with zeros for unspecified fields.
>>>>>>> So there is no advantage to explicitly initialize .remove with NULL
>>>>>>> and the assignment can be dropped without side effects.
…
>  static const struct samsung_pwm_variant s5pc100_variant = {
>  	.bits		= 32,
> -	.div_base	= 0,
>  	.has_tint_cstat	= true,
>  	.tclk_mask	= BIT(5),
>  };
>
> If I saw the resulting code, I'd wonder about the missing assignments
> in these three structs.

How would you get doubts here if you can depend on the well defined initialisation
for unspecified members of static data structure variables?


> So IMHO the status quo is better even though it is more verbose.

Are any design conflicts involved here?

Will the Linux coding style evolve accordingly?

Regards,
Markus





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux