Message ID | 20220602171948.2790690-7-farman@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | VFIO ccw/mdev rework | expand |
On Thu, Jun 02, 2022 at 07:19:36PM +0200, Eric Farman wrote: > The FSM has an enumerated list of events defined. > Use that as the argument passed to the jump table, > instead of a regular int. > > Suggested-by: Jason Gunthorpe <jgg@nvidia.com> > Fixes: bbe37e4cb8970 ("vfio: ccw: introduce a finite state machine") > Signed-off-by: Eric Farman <farman@linux.ibm.com> > --- > drivers/s390/cio/vfio_ccw_private.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Jason
On 6/2/22 1:19 PM, Eric Farman wrote: > The FSM has an enumerated list of events defined. > Use that as the argument passed to the jump table, > instead of a regular int. > > Suggested-by: Jason Gunthorpe <jgg@nvidia.com> > Fixes: bbe37e4cb8970 ("vfio: ccw: introduce a finite state machine") Not sure if this change really merits a fixes tag Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> > Signed-off-by: Eric Farman <farman@linux.ibm.com> > --- > drivers/s390/cio/vfio_ccw_private.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h > index 12b5537d478f..5c128eec596b 100644 > --- a/drivers/s390/cio/vfio_ccw_private.h > +++ b/drivers/s390/cio/vfio_ccw_private.h > @@ -156,7 +156,7 @@ typedef void (fsm_func_t)(struct vfio_ccw_private *, enum vfio_ccw_event); > extern fsm_func_t *vfio_ccw_jumptable[NR_VFIO_CCW_STATES][NR_VFIO_CCW_EVENTS]; > > static inline void vfio_ccw_fsm_event(struct vfio_ccw_private *private, > - int event) > + enum vfio_ccw_event event) > { > trace_vfio_ccw_fsm_event(private->sch->schid, private->state, event); > vfio_ccw_jumptable[private->state][event](private, event);
diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h index 12b5537d478f..5c128eec596b 100644 --- a/drivers/s390/cio/vfio_ccw_private.h +++ b/drivers/s390/cio/vfio_ccw_private.h @@ -156,7 +156,7 @@ typedef void (fsm_func_t)(struct vfio_ccw_private *, enum vfio_ccw_event); extern fsm_func_t *vfio_ccw_jumptable[NR_VFIO_CCW_STATES][NR_VFIO_CCW_EVENTS]; static inline void vfio_ccw_fsm_event(struct vfio_ccw_private *private, - int event) + enum vfio_ccw_event event) { trace_vfio_ccw_fsm_event(private->sch->schid, private->state, event); vfio_ccw_jumptable[private->state][event](private, event);
The FSM has an enumerated list of events defined. Use that as the argument passed to the jump table, instead of a regular int. Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Fixes: bbe37e4cb8970 ("vfio: ccw: introduce a finite state machine") Signed-off-by: Eric Farman <farman@linux.ibm.com> --- drivers/s390/cio/vfio_ccw_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)