On 10/6/20 2:55 AM, Dan Williams wrote: > The 'struct resource' in 'struct dev_pagemap' is only used for holding > resource span information. The other fields, 'name', 'flags', 'desc', > 'parent', 'sibling', and 'child' are all unused wasted space. > > This is in preparation for introducing a multi-range extension of > devm_memremap_pages(). > > The bulk of this change is unwinding all the places internal to libnvdimm > that used 'struct resource' unnecessarily, and replacing instances of > 'struct dev_pagemap'.res with 'struct dev_pagemap'.range. > > P2PDMA had a minor usage of the resource flags field, but only to report > failures with "%pR". That is replaced with an open coded print of the > range. > > Link: > https://lkml.kernel.org/r/159643103173.4062302.768998885691711532.st...@dwillia2-desk3.amr.corp.intel.com > Link: https://lkml.kernel.org/r/20200926121402.GA7467@kadam > Cc: Paul Mackerras <pau...@ozlabs.org> > Cc: Michael Ellerman <m...@ellerman.id.au> > Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org> > Cc: Vishal Verma <vishal.l.ve...@intel.com> > Cc: Vivek Goyal <vgo...@redhat.com> > Cc: Dave Jiang <dave.ji...@intel.com> > Cc: Ben Skeggs <bske...@redhat.com> > Cc: David Airlie <airl...@linux.ie> > Cc: Daniel Vetter <dan...@ffwll.ch> > Cc: Ira Weiny <ira.we...@intel.com> > Cc: Bjorn Helgaas <bhelg...@google.com> > Cc: Boris Ostrovsky <boris.ostrov...@oracle.com> > Cc: Juergen Gross <jgr...@suse.com> > Cc: Stefano Stabellini <sstabell...@kernel.org> > Cc: "Jérôme Glisse" <jgli...@redhat.com> > Cc: Andrew Morton <a...@linux-foundation.org> > Reported-by: Dan Carpenter <dan.carpen...@oracle.com> > Signed-off-by: Dan Williams <dan.j.willi...@intel.com>
For Xen bits Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>