aboutsummaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_output.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2025-09-23 11:09:50 +0200
committerMarkus Armbruster <armbru@redhat.com>2025-09-30 14:43:53 +0200
commitb8df7dfc04a88228a6bf35530c10b1326f5cb6d6 (patch)
tree238238df6aeff440d7fdab43a81c2e3f74834d66 /scripts/lib/kdoc/kdoc_output.py
parent82b5e6cc309292b3490be87bb020cbe74fe618fc (diff)
downloadqemu-b8df7dfc04a88228a6bf35530c10b1326f5cb6d6.zip
qemu-b8df7dfc04a88228a6bf35530c10b1326f5cb6d6.tar.gz
qemu-b8df7dfc04a88228a6bf35530c10b1326f5cb6d6.tar.bz2
hw/cxl: Convert cxl_fmws_link() to Error
Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. When the caller does, the error is reported twice. When it doesn't (because it recovered from the error), there is no error to report, i.e. the report is bogus. cxl_fmws_link_targets() violates this principle: it calls error_setg(&error_fatal, ...) via cxl_fmws_link(). Goes back to commit 584f722eb3ab (hw/cxl: Make the CXL fixed memory windows devices.) Currently harmless, because cxl_fmws_link_targets()'s callers always pass &error_fatal. Clean this up by converting cxl_fmws_link() to Error. Also change its return value on error from 1 to -1 to conform to the rules laid in qapi/error.h. It's call chain cxl_fmws_link_targets() via object_child_foreach_recursive() is fine with that. Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250923091000.3180122-4-armbru@redhat.com> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions