Message ID | 20190618202352.39702-6-farman@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | s390: more vfio-ccw code rework | expand |
On Tue, 18 Jun 2019 22:23:52 +0200 Eric Farman <farman@linux.ibm.com> wrote: > Just to keep things tidy. > > Signed-off-by: Eric Farman <farman@linux.ibm.com> > --- > drivers/s390/cio/vfio_ccw_cp.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) Reviewed-by: Cornelia Huck <cohuck@redhat.com>
On 06/18/2019 04:23 PM, Eric Farman wrote: > Just to keep things tidy. > > Signed-off-by: Eric Farman <farman@linux.ibm.com> > --- > drivers/s390/cio/vfio_ccw_cp.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) > > diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c > index 9a8bf06281e0..9cddc1288059 100644 > --- a/drivers/s390/cio/vfio_ccw_cp.c > +++ b/drivers/s390/cio/vfio_ccw_cp.c > @@ -228,17 +228,6 @@ static long copy_from_iova(struct device *mdev, > return l; > } > > -static long copy_ccw_from_iova(struct channel_program *cp, > - struct ccw1 *to, u64 iova, > - unsigned long len) > -{ > - int ret; > - > - ret = copy_from_iova(cp->mdev, to, iova, len * sizeof(struct ccw1)); > - > - return ret; > -} > - > /* > * Helpers to operate ccwchain. > */ > @@ -435,7 +424,8 @@ static int ccwchain_handle_ccw(u32 cda, struct channel_program *cp) > int len; > > /* Copy 2K (the most we support today) of possible CCWs */ > - len = copy_ccw_from_iova(cp, cp->guest_cp, cda, CCWCHAIN_LEN_MAX); > + len = copy_from_iova(cp->mdev, cp->guest_cp, cda, > + CCWCHAIN_LEN_MAX * sizeof(struct ccw1)); > if (len) > return len; > > This patch probably could be squashed with patch 4. Not a big deal though.
diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c index 9a8bf06281e0..9cddc1288059 100644 --- a/drivers/s390/cio/vfio_ccw_cp.c +++ b/drivers/s390/cio/vfio_ccw_cp.c @@ -228,17 +228,6 @@ static long copy_from_iova(struct device *mdev, return l; } -static long copy_ccw_from_iova(struct channel_program *cp, - struct ccw1 *to, u64 iova, - unsigned long len) -{ - int ret; - - ret = copy_from_iova(cp->mdev, to, iova, len * sizeof(struct ccw1)); - - return ret; -} - /* * Helpers to operate ccwchain. */ @@ -435,7 +424,8 @@ static int ccwchain_handle_ccw(u32 cda, struct channel_program *cp) int len; /* Copy 2K (the most we support today) of possible CCWs */ - len = copy_ccw_from_iova(cp, cp->guest_cp, cda, CCWCHAIN_LEN_MAX); + len = copy_from_iova(cp->mdev, cp->guest_cp, cda, + CCWCHAIN_LEN_MAX * sizeof(struct ccw1)); if (len) return len;
Just to keep things tidy. Signed-off-by: Eric Farman <farman@linux.ibm.com> --- drivers/s390/cio/vfio_ccw_cp.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)