Message ID | 20210617173655.430424-3-ben.widawsky@intel.com |
---|---|
State | New, archived |
Headers | show |
Series | Region creation | expand |
On Thu, 17 Jun 2021 10:36:51 -0700 Ben Widawsky <ben.widawsky@intel.com> wrote: > Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> Hard to argue with this one ;) So I don't bother reading it again... Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > drivers/cxl/mem.h | 5 +++++ > drivers/cxl/pci.c | 5 ----- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/cxl/mem.h b/drivers/cxl/mem.h > index 8f02d02b26b4..fe12ef3c3dde 100644 > --- a/drivers/cxl/mem.h > +++ b/drivers/cxl/mem.h > @@ -48,6 +48,11 @@ struct cxl_memdev { > int id; > }; > > +static inline struct cxl_memdev *to_cxl_memdev(struct device *dev) > +{ > + return container_of(dev, struct cxl_memdev, dev); > +} > + > /** > * struct cxl_mem - A CXL memory device > * @pdev: The PCI device associated with this CXL device. > diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c > index f8408e5f0754..52508282ec37 100644 > --- a/drivers/cxl/pci.c > +++ b/drivers/cxl/pci.c > @@ -1161,11 +1161,6 @@ static int cxl_mem_setup_regs(struct cxl_mem *cxlm) > return ret; > } > > -static struct cxl_memdev *to_cxl_memdev(struct device *dev) > -{ > - return container_of(dev, struct cxl_memdev, dev); > -} > - > static void cxl_memdev_release(struct device *dev) > { > struct cxl_memdev *cxlmd = to_cxl_memdev(dev);
On Thu, Jun 17, 2021 at 10:37 AM Ben Widawsky <ben.widawsky@intel.com> wrote: > If you find yourself not writing a changelog it usually means the patch has no reason to stand alone... > Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> > --- > drivers/cxl/mem.h | 5 +++++ > drivers/cxl/pci.c | 5 ----- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/cxl/mem.h b/drivers/cxl/mem.h > index 8f02d02b26b4..fe12ef3c3dde 100644 > --- a/drivers/cxl/mem.h > +++ b/drivers/cxl/mem.h > @@ -48,6 +48,11 @@ struct cxl_memdev { > int id; > }; > > +static inline struct cxl_memdev *to_cxl_memdev(struct device *dev) > +{ > + return container_of(dev, struct cxl_memdev, dev); > +} > + > /** > * struct cxl_mem - A CXL memory device > * @pdev: The PCI device associated with this CXL device. > diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c > index f8408e5f0754..52508282ec37 100644 > --- a/drivers/cxl/pci.c > +++ b/drivers/cxl/pci.c > @@ -1161,11 +1161,6 @@ static int cxl_mem_setup_regs(struct cxl_mem *cxlm) > return ret; > } > > -static struct cxl_memdev *to_cxl_memdev(struct device *dev) > -{ > - return container_of(dev, struct cxl_memdev, dev); > -} > - > static void cxl_memdev_release(struct device *dev) > { > struct cxl_memdev *cxlmd = to_cxl_memdev(dev); > -- > 2.32.0 >
diff --git a/drivers/cxl/mem.h b/drivers/cxl/mem.h index 8f02d02b26b4..fe12ef3c3dde 100644 --- a/drivers/cxl/mem.h +++ b/drivers/cxl/mem.h @@ -48,6 +48,11 @@ struct cxl_memdev { int id; }; +static inline struct cxl_memdev *to_cxl_memdev(struct device *dev) +{ + return container_of(dev, struct cxl_memdev, dev); +} + /** * struct cxl_mem - A CXL memory device * @pdev: The PCI device associated with this CXL device. diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index f8408e5f0754..52508282ec37 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -1161,11 +1161,6 @@ static int cxl_mem_setup_regs(struct cxl_mem *cxlm) return ret; } -static struct cxl_memdev *to_cxl_memdev(struct device *dev) -{ - return container_of(dev, struct cxl_memdev, dev); -} - static void cxl_memdev_release(struct device *dev) { struct cxl_memdev *cxlmd = to_cxl_memdev(dev);
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> --- drivers/cxl/mem.h | 5 +++++ drivers/cxl/pci.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)