mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
spapr: spapr_drc_attach() cannot fail
All users are passing &error_abort already. Document the fact that spapr_drc_attach() should only be passed a free DRC, which is supposedly the case if appropriate checking is done earlier. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <20201201113728.885700-5-groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
f9b43958b9
commit
bc370a659a
5 changed files with 14 additions and 12 deletions
|
@ -235,7 +235,13 @@ SpaprDrc *spapr_drc_by_index(uint32_t index);
|
|||
SpaprDrc *spapr_drc_by_id(const char *type, uint32_t id);
|
||||
int spapr_dt_drc(void *fdt, int offset, Object *owner, uint32_t drc_type_mask);
|
||||
|
||||
bool spapr_drc_attach(SpaprDrc *drc, DeviceState *d, Error **errp);
|
||||
/*
|
||||
* These functions respectively abort if called with a device already
|
||||
* attached or no device attached. In the case of spapr_drc_attach(),
|
||||
* this means that the attachability of the DRC *must* be checked
|
||||
* beforehand (eg. check drc->dev at pre-plug).
|
||||
*/
|
||||
void spapr_drc_attach(SpaprDrc *drc, DeviceState *d);
|
||||
void spapr_drc_detach(SpaprDrc *drc);
|
||||
|
||||
/* Returns true if a hot plug/unplug request is pending */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue