On 24-03-21, 09:17, Jie Deng wrote: > I didn't see the "struct virtio_driver" has a member "struct dev_pm_ops *pm" > > It defines its own hooks (freeze and restore) though it includes "struct > device_driver" > > which has a "struct dev_pm_ops *pm". > > I just follow other virtio drivers to directly use the hooks defined in > "struct virtio_driver". Right, I think we can't use the SIMPLE PM OPS for virtio yet, the core calls only the freeze and restore callbacks which are part of struct virtio_driver. > For this driver, Both __maybe_unused and #ifdef are OK to me. Yes, and so you should use only #ifdef here as Arnd confirmed. You shouldn't be using __maybe_unused as there is nothing confusing here related to the macros. -- viresh