Re: [PATCH 3/5] spapr: Use appropriate getter for PC_DIMM_SLOT_PROP

2020-10-21 Thread David Gibson
On Mon, Oct 19, 2020 at 10:48:27AM +0200, Greg Kurz wrote: > The PC_DIMM_SLOT_PROP property is defined as: > > DEFINE_PROP_INT32(PC_DIMM_SLOT_PROP, PCDIMMDevice, slot, > PC_DIMM_UNASSIGNED_SLOT), > > Use object_property_get_int() instead of object_property_get_uint(). >

Re: [PATCH 3/5] spapr: Use appropriate getter for PC_DIMM_SLOT_PROP

2020-10-19 Thread Philippe Mathieu-Daudé
On 10/19/20 10:48 AM, Greg Kurz wrote: The PC_DIMM_SLOT_PROP property is defined as: DEFINE_PROP_INT32(PC_DIMM_SLOT_PROP, PCDIMMDevice, slot, PC_DIMM_UNASSIGNED_SLOT), Worth adding: #define PC_DIMM_UNASSIGNED_SLOT -1 for better understanding why it is

[PATCH 3/5] spapr: Use appropriate getter for PC_DIMM_SLOT_PROP

2020-10-19 Thread Greg Kurz
The PC_DIMM_SLOT_PROP property is defined as: DEFINE_PROP_INT32(PC_DIMM_SLOT_PROP, PCDIMMDevice, slot, PC_DIMM_UNASSIGNED_SLOT), Use object_property_get_int() instead of object_property_get_uint(). Since spapr_memory_plug() only gets called if pc_dimm_pre_plug()