Hi Łukasz, On 10/7/21 18:24, Lukasz Maniak wrote: > From: Łukasz Gieryk <lukasz.gie...@linux.intel.com> > > An Nvme device with SR-IOV capability calculates the BAR size > differently for PF and VF, so it makes sense to extract the common code > to a separate function. > > Also: it seems the n->reg_size parameter unnecessarily splits the BAR > size calculation in two phases; removed to simplify the code.
Preferably split in 2 patches, simplification in first, new function in second. > Signed-off-by: Łukasz Gieryk <lukasz.gie...@linux.intel.com> > --- > hw/nvme/ctrl.c | 52 +++++++++++++++++++++++++++++++++----------------- > hw/nvme/nvme.h | 1 - > 2 files changed, 35 insertions(+), 18 deletions(-)