Re: [PATCH v2 1/9] vfio/ccw: Use functions for alloc/free of the vfio_ccw_private

2021-09-23 Thread Eric Farman
On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote: > Makes the code easier to understand what is memory lifecycle and what > is > other stuff. > > Signed-off-by: Jason Gunthorpe > --- > drivers/s390/cio/vfio_ccw_drv.c | 137 ++-- > > 1 file changed, 78 inserti

Re: [PATCH v2 1/9] vfio/ccw: Use functions for alloc/free of the vfio_ccw_private

2021-09-14 Thread Jason Gunthorpe
On Tue, Sep 14, 2021 at 05:50:25PM +0200, Cornelia Huck wrote: > On Fri, Sep 10 2021, Christoph Hellwig wrote: > > > On Thu, Sep 09, 2021 at 04:38:41PM -0300, Jason Gunthorpe wrote: > >> + > >> + private = kzalloc(sizeof(*private), GFP_KERNEL | GFP_DMA); > >> + if (!private) > >> + ret

Re: [PATCH v2 1/9] vfio/ccw: Use functions for alloc/free of the vfio_ccw_private

2021-09-14 Thread Cornelia Huck
On Fri, Sep 10 2021, Christoph Hellwig wrote: > On Thu, Sep 09, 2021 at 04:38:41PM -0300, Jason Gunthorpe wrote: >> + >> +private = kzalloc(sizeof(*private), GFP_KERNEL | GFP_DMA); >> +if (!private) >> +return ERR_PTR(-ENOMEM); > > Nit: there is no need to add GFP_KERNEL when