Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40126 )
Change subject: Drop explicit NULL initializations from `device_operations`
......................................................................
Patch Set 6:
What was the DEVICE_NOOP introduced for then?
Looking at the patches that introduced and used it, there
was a lack of communication I guess. At first it was used
to replace individual no-op functions, but later also to
replace NULL pointers. The latter often makes no sense.
Why have no-op function pointers? `.read_resources` and
`.set_resources` are considered mandatory with exceptions
in cases somebody reasoned about it (usually nobody did
because the code was just copy-pasted). That's when one
should use DEVICE_NOOP.
We always check for NULL pointers in the operations, so
using NULL (or ommitting) everything else seems fine.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/40126
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Icb9e14c58153d7c14817bcde148e86e977666e4b
Gerrit-Change-Number: 40126
Gerrit-PatchSet: 6
Gerrit-Owner: HAOUAS Elyes
ehaouas@noos.fr
Gerrit-Reviewer: Andrey Petrov
andrey.petrov@gmail.com
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Damien Zammit
Gerrit-Reviewer: David Guckian
david.guckian@intel.com
Gerrit-Reviewer: HAOUAS Elyes
ehaouas@noos.fr
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Vanessa Eusebio
vanessa.f.eusebio@intel.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Comment-Date: Sun, 05 Apr 2020 11:22:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment