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]     [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