Message ID | 20210313171150.2122409-4-f4bug@amsat.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw: Constify VMStateDescription | expand |
Le 13/03/2021 à 18:11, Philippe Mathieu-Daudé a écrit : > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > hw/usb/ccid-card-passthru.c | 2 +- > hw/usb/dev-smartcard-reader.c | 8 ++++---- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c > index c1a90fcc7a5..7212d0d7fb5 100644 > --- a/hw/usb/ccid-card-passthru.c > +++ b/hw/usb/ccid-card-passthru.c > @@ -374,7 +374,7 @@ static void passthru_realize(CCIDCardState *base, Error **errp) > card->atr_length = sizeof(DEFAULT_ATR); > } > > -static VMStateDescription passthru_vmstate = { > +static const VMStateDescription passthru_vmstate = { > .name = "ccid-card-passthru", > .version_id = 1, > .minimum_version_id = 1, > diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c > index 80109fa5516..b3845ccdc14 100644 > --- a/hw/usb/dev-smartcard-reader.c > +++ b/hw/usb/dev-smartcard-reader.c > @@ -1365,7 +1365,7 @@ static int ccid_pre_save(void *opaque) > return 0; > } > > -static VMStateDescription bulk_in_vmstate = { > +static const VMStateDescription bulk_in_vmstate = { > .name = "CCID BulkIn state", > .version_id = 1, > .minimum_version_id = 1, > @@ -1377,7 +1377,7 @@ static VMStateDescription bulk_in_vmstate = { > } > }; > > -static VMStateDescription answer_vmstate = { > +static const VMStateDescription answer_vmstate = { > .name = "CCID Answer state", > .version_id = 1, > .minimum_version_id = 1, > @@ -1388,7 +1388,7 @@ static VMStateDescription answer_vmstate = { > } > }; > > -static VMStateDescription usb_device_vmstate = { > +static const VMStateDescription usb_device_vmstate = { > .name = "usb_device", > .version_id = 1, > .minimum_version_id = 1, > @@ -1400,7 +1400,7 @@ static VMStateDescription usb_device_vmstate = { > } > }; > > -static VMStateDescription ccid_vmstate = { > +static const VMStateDescription ccid_vmstate = { > .name = "usb-ccid", > .version_id = 1, > .minimum_version_id = 1, > Applied to my trivial-patches branch. Thanks, Laurent
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index c1a90fcc7a5..7212d0d7fb5 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -374,7 +374,7 @@ static void passthru_realize(CCIDCardState *base, Error **errp) card->atr_length = sizeof(DEFAULT_ATR); } -static VMStateDescription passthru_vmstate = { +static const VMStateDescription passthru_vmstate = { .name = "ccid-card-passthru", .version_id = 1, .minimum_version_id = 1, diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 80109fa5516..b3845ccdc14 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -1365,7 +1365,7 @@ static int ccid_pre_save(void *opaque) return 0; } -static VMStateDescription bulk_in_vmstate = { +static const VMStateDescription bulk_in_vmstate = { .name = "CCID BulkIn state", .version_id = 1, .minimum_version_id = 1, @@ -1377,7 +1377,7 @@ static VMStateDescription bulk_in_vmstate = { } }; -static VMStateDescription answer_vmstate = { +static const VMStateDescription answer_vmstate = { .name = "CCID Answer state", .version_id = 1, .minimum_version_id = 1, @@ -1388,7 +1388,7 @@ static VMStateDescription answer_vmstate = { } }; -static VMStateDescription usb_device_vmstate = { +static const VMStateDescription usb_device_vmstate = { .name = "usb_device", .version_id = 1, .minimum_version_id = 1, @@ -1400,7 +1400,7 @@ static VMStateDescription usb_device_vmstate = { } }; -static VMStateDescription ccid_vmstate = { +static const VMStateDescription ccid_vmstate = { .name = "usb-ccid", .version_id = 1, .minimum_version_id = 1,
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-smartcard-reader.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)