Message ID | 20201130083630.2520597-6-ganqixin@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Categorize some uncategorized devices | expand |
On 30/11/2020 09.36, Gan Qixin wrote: > The category of the mc146818rtc device is not set, put it into the 'misc' > category. > > Signed-off-by: Gan Qixin <ganqixin@huawei.com> > --- > Cc: Michael S. Tsirkin <mst@redhat.com> > --- > hw/rtc/mc146818rtc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c > index 7a38540cb9..39edca0996 100644 > --- a/hw/rtc/mc146818rtc.c > +++ b/hw/rtc/mc146818rtc.c > @@ -1039,6 +1039,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data) > dc->vmsd = &vmstate_rtc; > isa->build_aml = rtc_build_aml; > device_class_set_props(dc, mc146818rtc_properties); > + set_bit(DEVICE_CATEGORY_MISC, dc->categories); > } I wonder whether this device should be user_creatable at all (e.g. it uses a hard-coded IO port)... Anyway setting the category certainly does not hurt, thus: Reviewed-by: Thomas Huth <thuth@redhat.com>
On 12/21/20 12:53 PM, Thomas Huth wrote: > On 30/11/2020 09.36, Gan Qixin wrote: >> The category of the mc146818rtc device is not set, put it into the 'misc' >> category. >> >> Signed-off-by: Gan Qixin <ganqixin@huawei.com> >> --- >> Cc: Michael S. Tsirkin <mst@redhat.com> >> --- >> hw/rtc/mc146818rtc.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c >> index 7a38540cb9..39edca0996 100644 >> --- a/hw/rtc/mc146818rtc.c >> +++ b/hw/rtc/mc146818rtc.c >> @@ -1039,6 +1039,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data) >> dc->vmsd = &vmstate_rtc; >> isa->build_aml = rtc_build_aml; >> device_class_set_props(dc, mc146818rtc_properties); >> + set_bit(DEVICE_CATEGORY_MISC, dc->categories); >> } > > I wonder whether this device should be user_creatable at all (e.g. it uses a > hard-coded IO port)... Anyway setting the category certainly does not hurt, > thus: > > Reviewed-by: Thomas Huth <thuth@redhat.com> Can this go via qemu-trivial?
Le 24/03/2021 à 18:23, Philippe Mathieu-Daudé a écrit : > On 12/21/20 12:53 PM, Thomas Huth wrote: >> On 30/11/2020 09.36, Gan Qixin wrote: >>> The category of the mc146818rtc device is not set, put it into the 'misc' >>> category. >>> >>> Signed-off-by: Gan Qixin <ganqixin@huawei.com> >>> --- >>> Cc: Michael S. Tsirkin <mst@redhat.com> >>> --- >>> hw/rtc/mc146818rtc.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c >>> index 7a38540cb9..39edca0996 100644 >>> --- a/hw/rtc/mc146818rtc.c >>> +++ b/hw/rtc/mc146818rtc.c >>> @@ -1039,6 +1039,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data) >>> dc->vmsd = &vmstate_rtc; >>> isa->build_aml = rtc_build_aml; >>> device_class_set_props(dc, mc146818rtc_properties); >>> + set_bit(DEVICE_CATEGORY_MISC, dc->categories); >>> } >> >> I wonder whether this device should be user_creatable at all (e.g. it uses a >> hard-coded IO port)... Anyway setting the category certainly does not hurt, >> thus: >> >> Reviewed-by: Thomas Huth <thuth@redhat.com> > > Can this go via qemu-trivial? > Applied to my trivial-patches branch. Thanks, Laurent
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index 7a38540cb9..39edca0996 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -1039,6 +1039,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data) dc->vmsd = &vmstate_rtc; isa->build_aml = rtc_build_aml; device_class_set_props(dc, mc146818rtc_properties); + set_bit(DEVICE_CATEGORY_MISC, dc->categories); } static const TypeInfo mc146818rtc_info = {
The category of the mc146818rtc device is not set, put it into the 'misc' category. Signed-off-by: Gan Qixin <ganqixin@huawei.com> --- Cc: Michael S. Tsirkin <mst@redhat.com> --- hw/rtc/mc146818rtc.c | 1 + 1 file changed, 1 insertion(+)