HotplugHandler value returned from qdev_get_hotplug_handler() points to the handler of and object implementing the TYPE_HOTPLUG_HANDLER interface. That handler mostly points to read-only section which shouldn't not be updated. Better protect it with the const qualifier. Mechanical change using 'sed' then manually adapted coding style. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260903230245.65601-5-philmd@oss.qualcomm.com>
35 lines
807 B
C
35 lines
807 B
C
/*
|
|
* Hotplug handler stubs
|
|
*
|
|
* Copyright (c) Red Hat
|
|
*
|
|
* Authors:
|
|
* Philippe Mathieu-Daudé,
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
#include "qemu/osdep.h"
|
|
#include "hw/core/qdev.h"
|
|
|
|
const HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
void hotplug_handler_pre_plug(const HotplugHandler *plug_handler,
|
|
DeviceState *plugged_dev,
|
|
Error **errp)
|
|
{
|
|
g_assert_not_reached();
|
|
}
|
|
|
|
void hotplug_handler_plug(const HotplugHandler *plug_handler,
|
|
DeviceState *plugged_dev,
|
|
Error **errp)
|
|
{
|
|
g_assert_not_reached();
|
|
}
|