From cb843a4062be29207a08c1670595865cd996f9be Mon Sep 17 00:00:00 2001 From: Artem Mygaiev Date: Wed, 11 Sep 2024 18:32:31 +0300 Subject: [PATCH] Checkpatch and clang-format style fixes --- fl2000_drm.c | 11 +++++------ fl2000_drv.c | 2 +- fl2000_interrupt.c | 12 ++++++------ fl2000_streaming.c | 24 +++++++++++++----------- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/fl2000_drm.c b/fl2000_drm.c index 62c05a4..1e3427d 100644 --- a/fl2000_drm.c +++ b/fl2000_drm.c @@ -544,12 +544,12 @@ static struct component_master_ops fl2000_master_ops = { /** * Will only allocate structures on 'probe' function call. There is still no bridge at this moment, * so registration of the device and modesetting does not make any sense. - * + * * We do not configure DMA mask here because we link DRM device to the USB device provided. * We also do not set up polling because connect/disconnect events are provided in interrupts. - * + * * @param usb_dev USB device structure - * + * * @return 0 on success, negative value on error */ int fl2000_drm_init(struct usb_device *usb_dev) @@ -560,7 +560,6 @@ int fl2000_drm_init(struct usb_device *usb_dev) struct drm_mode_config *mode_config; struct component_match *match = NULL; - /* DRM device is allocated together with private data structure and attached to the device */ drm_if = devm_drm_dev_alloc(&usb_dev->dev, &fl2000_drm_driver, struct fl2000_drm_if, drm); if (IS_ERR(drm_if)) { dev_err(&usb_dev->dev, "Cannot allocate DRM structure (%ld)", PTR_ERR(drm_if)); @@ -616,8 +615,8 @@ int fl2000_drm_init(struct usb_device *usb_dev) drm_dev_put(drm); return -ENODEV; } - /* Register component master - component bind/unbind functions will complete the registration - * and initializtion of DRM device chain + /* Register component master - component bind/unbind functions will complete the + * registration and initializtion of DRM device chain */ ret = component_master_add_with_match(&usb_dev->dev, &fl2000_master_ops, match); if (ret) { diff --git a/fl2000_drv.c b/fl2000_drv.c index 62b3241..c940622 100644 --- a/fl2000_drv.c +++ b/fl2000_drv.c @@ -13,7 +13,7 @@ #define FL2000_USB_INTERFACE(ifnum, table) \ { \ USB_DEVICE_INTERFACE_NUMBER(FL2000_USB_VENDOR, FL2000_USB_PRODUCT, ifnum), \ - .driver_info = (kernel_ulong_t) & (table) \ + .driver_info = (kernel_ulong_t)(table) \ } struct fl2000_if_api { diff --git a/fl2000_interrupt.c b/fl2000_interrupt.c index 281a648..2284266 100644 --- a/fl2000_interrupt.c +++ b/fl2000_interrupt.c @@ -53,9 +53,9 @@ static void fl2000_intr_release(struct device *dev, void *res) /** * fl2000_enable_interrupt() - interrupt processing start - * + * * @usb_dev: USB device - * + * * @returns: Operation result */ int fl2000_enable_interrupt(struct usb_device *usb_dev) @@ -75,7 +75,7 @@ int fl2000_enable_interrupt(struct usb_device *usb_dev) * fl2000_disable_interrupt() - interrupt processing stop * * @usb_dev: USB device - * + * * @returns: Operation result */ int fl2000_disable_interrupt(struct usb_device *usb_dev) @@ -93,9 +93,9 @@ int fl2000_disable_interrupt(struct usb_device *usb_dev) /** * fl2000_interrupt_create() - interrupt processing context creation - * + * * @interface: USB interrupt transfers interface - * + * * @returns: Operation result */ int fl2000_interrupt_create(struct usb_interface *interface) @@ -127,7 +127,7 @@ int fl2000_interrupt_create(struct usb_interface *interface) /** * fl2000_interrupt_destroy() - interrupt processing context destruction - * + * * @interface: USB interrupt transfers interface */ void fl2000_interrupt_destroy(struct usb_interface *interface) diff --git a/fl2000_streaming.c b/fl2000_streaming.c index 2775ec5..18ff0fb 100644 --- a/fl2000_streaming.c +++ b/fl2000_streaming.c @@ -226,7 +226,9 @@ static int fl2000_send_stream(struct usb_device *usb_dev, struct fl2000_stream * usb_unanchor_urb(urb); usb_free_urb(urb); - /* NOTE: actually in some cases we can try and resend the URB (-EAGAIN, some -ENOMEM) */ + /* NOTE: actually in some cases we can try and resend the URB after sleep + * e.g. -EAGAIN, few attempts on -ENOMEM... We will need work for this + */ return ret; } } while (atomic_dec_and_test(&stream->urb_cnt)); @@ -289,7 +291,7 @@ static void fl2000_streaming_release(struct device *dev, void *res) /** * fl2000_streaming_compress() - compress XRGB888 data to RGB565 or RGB888 - * + * * @usb_dev: USB device * @src: Source buffer * @height: Image height @@ -340,11 +342,11 @@ void fl2000_streaming_compress(struct usb_device *usb_dev, void *src, unsigned i /** * fl2000_streaming_mode_set() - streaming mode setup - * + * * @usb_dev: USB device * @pixels: Number of pixels in a line * @bytes_pix: Bytes per pixel - * + * * @returns: Operation result */ int fl2000_streaming_mode_set(struct usb_device *usb_dev, int pixels, u32 bytes_pix) @@ -381,9 +383,9 @@ int fl2000_streaming_mode_set(struct usb_device *usb_dev, int pixels, u32 bytes_ /** * fl2000_streaming_enable() - streaming processing start - * + * * @usb_dev: USB device - * + * * @returns: Operation result */ int fl2000_streaming_enable(struct usb_device *usb_dev) @@ -416,7 +418,7 @@ int fl2000_streaming_enable(struct usb_device *usb_dev) /** * fl2000_streaming_disable() - streaming processing stop - * + * * @usb_dev: USB device */ void fl2000_streaming_disable(struct usb_device *usb_dev) @@ -451,12 +453,12 @@ void fl2000_streaming_disable(struct usb_device *usb_dev) /** * fl2000_streaming_create() - streaming processing context creation - * + * * It shall not initiate any USB transfers. URB is not allocated here because we do not know the * stream requirements yet. - * + * * @interface: streaming transfers interface - * + * * @returns: Operation result */ int fl2000_streaming_create(struct usb_interface *interface) @@ -486,7 +488,7 @@ int fl2000_streaming_create(struct usb_interface *interface) /** * fl2000_streaming_destroy() - streaming processing context destruction - * + * * @interface: streaming transfers interface */ void fl2000_streaming_destroy(struct usb_interface *interface)