Commit d1877e63 authored by Alex Williamson's avatar Alex Williamson
Browse files

vfio: de-extern-ify function prototypes



The use of 'extern' in function prototypes has been disrecommended in
the kernel coding style for several years now, remove them from all vfio
related files so contributors no longer need to decide between style and
consistency.

Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Reviewed-by: default avatarEric Farman <farman@linux.ibm.com>
Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/165471414407.203056.474032786990662279.stgit@omen


Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 03c765b0
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -114,11 +114,11 @@ to register and unregister itself with the core driver:

* Register::

    extern int  mdev_register_driver(struct mdev_driver *drv);
    int mdev_register_driver(struct mdev_driver *drv);

* Unregister::

    extern void mdev_unregister_driver(struct mdev_driver *drv);
    void mdev_unregister_driver(struct mdev_driver *drv);

The mediated bus driver's probe function should create a vfio_device on top of
the mdev_device and connect it to an appropriate implementation of
@@ -127,7 +127,7 @@ vfio_device_ops.
When a driver wants to add the GUID creation sysfs to an existing device it has
probe'd to then it should call::

	extern int  mdev_register_device(struct device *dev,
    int mdev_register_device(struct device *dev,
                             struct mdev_driver *mdev_driver);

This will provide the 'mdev_supported_types/XX/create' files which can then be
@@ -136,7 +136,7 @@ attached to the specified driver.

When the driver needs to remove itself it calls::

	extern void mdev_unregister_device(struct device *dev);
    void mdev_unregister_device(struct device *dev);

Which will unbind and destroy all the created mdevs and remove the sysfs files.

+6 −6
Original line number Diff line number Diff line
@@ -41,11 +41,11 @@ struct channel_program {
	struct ccw1 *guest_cp;
};

extern int cp_init(struct channel_program *cp, union orb *orb);
extern void cp_free(struct channel_program *cp);
extern int cp_prefetch(struct channel_program *cp);
extern union orb *cp_get_orb(struct channel_program *cp, u32 intparm, u8 lpm);
extern void cp_update_scsw(struct channel_program *cp, union scsw *scsw);
extern bool cp_iova_pinned(struct channel_program *cp, u64 iova);
int cp_init(struct channel_program *cp, union orb *orb);
void cp_free(struct channel_program *cp);
int cp_prefetch(struct channel_program *cp);
union orb *cp_get_orb(struct channel_program *cp, u32 intparm, u8 lpm);
void cp_update_scsw(struct channel_program *cp, union scsw *scsw);
bool cp_iova_pinned(struct channel_program *cp, u64 iova);

#endif
+3 −3
Original line number Diff line number Diff line
@@ -119,10 +119,10 @@ struct vfio_ccw_private {
	struct work_struct	crw_work;
} __aligned(8);

extern int vfio_ccw_mdev_reg(struct subchannel *sch);
extern void vfio_ccw_mdev_unreg(struct subchannel *sch);
int vfio_ccw_mdev_reg(struct subchannel *sch);
void vfio_ccw_mdev_unreg(struct subchannel *sch);

extern int vfio_ccw_sch_quiesce(struct subchannel *sch);
int vfio_ccw_sch_quiesce(struct subchannel *sch);

extern struct mdev_driver vfio_ccw_mdev_driver;

+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ struct vfio_fsl_mc_device {
	struct vfio_fsl_mc_irq      *mc_irqs;
};

extern int vfio_fsl_mc_set_irqs_ioctl(struct vfio_fsl_mc_device *vdev,
int vfio_fsl_mc_set_irqs_ioctl(struct vfio_fsl_mc_device *vdev,
			       u32 flags, unsigned int index,
			       unsigned int start, unsigned int count,
			       void *data);
+10 −11
Original line number Diff line number Diff line
@@ -78,20 +78,19 @@ struct vfio_platform_reset_node {
	vfio_platform_reset_fn_t of_reset;
};

extern int vfio_platform_probe_common(struct vfio_platform_device *vdev,
int vfio_platform_probe_common(struct vfio_platform_device *vdev,
			       struct device *dev);
void vfio_platform_remove_common(struct vfio_platform_device *vdev);

extern int vfio_platform_irq_init(struct vfio_platform_device *vdev);
extern void vfio_platform_irq_cleanup(struct vfio_platform_device *vdev);
int vfio_platform_irq_init(struct vfio_platform_device *vdev);
void vfio_platform_irq_cleanup(struct vfio_platform_device *vdev);

extern int vfio_platform_set_irqs_ioctl(struct vfio_platform_device *vdev,
int vfio_platform_set_irqs_ioctl(struct vfio_platform_device *vdev,
				 uint32_t flags, unsigned index,
					unsigned start, unsigned count,
					void *data);
				 unsigned start, unsigned count, void *data);

extern void __vfio_platform_register_reset(struct vfio_platform_reset_node *n);
extern void vfio_platform_unregister_reset(const char *compat,
void __vfio_platform_register_reset(struct vfio_platform_reset_node *n);
void vfio_platform_unregister_reset(const char *compat,
				    vfio_platform_reset_fn_t fn);
#define vfio_platform_register_reset(__compat, __reset)		\
static struct vfio_platform_reset_node __reset ## _node = {	\
Loading