vfio/ccw: Replace warn_once_pfch() with warn_report_once()
Use the common helper warn_report_once() instead of implementing its own. Cc: Eric Farman <farman@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20250214161936.1720039-1-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
4526687bf1
commit
3f8f6ef701
@ -51,17 +51,8 @@ struct VFIOCCWDevice {
|
|||||||
EventNotifier crw_notifier;
|
EventNotifier crw_notifier;
|
||||||
EventNotifier req_notifier;
|
EventNotifier req_notifier;
|
||||||
bool force_orb_pfch;
|
bool force_orb_pfch;
|
||||||
bool warned_orb_pfch;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void warn_once_pfch(VFIOCCWDevice *vcdev, SubchDev *sch,
|
|
||||||
const char *msg)
|
|
||||||
{
|
|
||||||
warn_report_once_cond(&vcdev->warned_orb_pfch,
|
|
||||||
"vfio-ccw (devno %x.%x.%04x): %s",
|
|
||||||
sch->cssid, sch->ssid, sch->devno, msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vfio_ccw_compute_needs_reset(VFIODevice *vdev)
|
static void vfio_ccw_compute_needs_reset(VFIODevice *vdev)
|
||||||
{
|
{
|
||||||
vdev->needs_reset = false;
|
vdev->needs_reset = false;
|
||||||
@ -83,7 +74,8 @@ static IOInstEnding vfio_ccw_handle_request(SubchDev *sch)
|
|||||||
|
|
||||||
if (!(sch->orb.ctrl0 & ORB_CTRL0_MASK_PFCH) && vcdev->force_orb_pfch) {
|
if (!(sch->orb.ctrl0 & ORB_CTRL0_MASK_PFCH) && vcdev->force_orb_pfch) {
|
||||||
sch->orb.ctrl0 |= ORB_CTRL0_MASK_PFCH;
|
sch->orb.ctrl0 |= ORB_CTRL0_MASK_PFCH;
|
||||||
warn_once_pfch(vcdev, sch, "PFCH flag forced");
|
warn_report_once("vfio-ccw (devno %x.%x.%04x): PFCH flag forced",
|
||||||
|
sch->cssid, sch->ssid, sch->devno);
|
||||||
}
|
}
|
||||||
|
|
||||||
QEMU_BUILD_BUG_ON(sizeof(region->orb_area) != sizeof(ORB));
|
QEMU_BUILD_BUG_ON(sizeof(region->orb_area) != sizeof(ORB));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user