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.
…
> Removing = 0 assignments should be carefully reviewed. I skimmed the
> changes to drivers/pwm and would oppose to both changes.

How does this development view fit to information from the patch description?


> Even for my patch I wasn't sure if it's a good idea and talked to Mark before
> sending it.

Would you get concerned that null pointers would eventually be represented
by non-zero values on any execution platform?

* https://en.cppreference.com/w/c/language/nullptr

* https://c-faq.com/null/machexamp.html

* https://stackoverflow.com/questions/2759845/why-is-address-zero-used-for-the-null-pointer


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