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]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux