[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_don
From: |
Peter Maydell |
Subject: |
Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done() |
Date: |
Tue, 20 Feb 2024 21:19:27 +0000 |
On Tue, 20 Feb 2024 at 19:31, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 2/20/24 06:06, Peter Maydell wrote:
> > -static void pc_cmos_init_late(void *opaque)
> > +static void pc_cmos_init_late(PCMachineState *pcms)
> > {
> > - pc_cmos_init_late_arg *arg = opaque;
> > - MC146818RtcState *s = arg->rtc_state;
> > + X86MachineState *x86ms = X86_MACHINE(pcms);
>
> We've already done the X86_MACHINE resolution in pc_machine_done -- why not
> just pass it in?
We want both the PCMachineState and X86MachineState and I think
our usual style is not to pass in two arguments that are the
same object under different pointer types.
-- PMM