Skip to content

Commit

Permalink
Mark unused arguments
Browse files Browse the repository at this point in the history
In future those will be covered by the logic that is not yet there
  • Loading branch information
klogg committed May 10, 2024
1 parent 505c8b0 commit 7c2a33e
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bridge/it66121.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "it66121_registers.h"

#define UNUSED(x) (void)(x)

/* HW defect leading to losing 3 first bytes during EDID read operation */
#define EDID_LOSS_LEN 3

Expand Down
11 changes: 9 additions & 2 deletions bridge/it66121_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static const struct regmap_range_cfg it66121_regmap_banks[] = {

static bool it66121_reg_volatile(struct device *dev, unsigned int reg)
{
UNUSED(dev);
return IT66121_REG_VOLATILE(reg);
}

Expand Down Expand Up @@ -414,6 +415,8 @@ static enum drm_mode_status it66121_connector_mode_valid(struct drm_connector *c
struct drm_display_mode *mode)
{
/* TODO: validate mode */
UNUSED(connector);
UNUSED(mode);

return MODE_OK;
}
Expand Down Expand Up @@ -466,9 +469,11 @@ static int it66121_bind(struct device *comp, struct device *master, void *master

static void it66121_unbind(struct device *comp, struct device *master, void *master_data)
{
dev_info(comp, "Unbinding IT66121 component");

/* TODO: drm_bridge_detach()? */
UNUSED(master);
UNUSED(master_data);

dev_info(comp, "Unbinding IT66121 component");
}

static const struct component_ops it66121_component_ops = {
Expand Down Expand Up @@ -608,6 +613,8 @@ static void it66121_bridge_mode_set(struct drm_bridge *bridge, const struct drm_
IT66121_HDMI_AVIINFO_DB13
};

UNUSED(adjusted_mode);

dev_info(bridge->dev->dev, "Setting AVI infoframe for mode: " DRM_MODE_FMT,
DRM_MODE_ARG(mode));

Expand Down
2 changes: 2 additions & 0 deletions fl2000.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@

#include "fl2000_registers.h"

#define UNUSED(x) (void)(x)

/* Known USB interfaces of FL2000 */
enum fl2000_interface {
FL2000_USBIF_AVCONTROL = 0,
Expand Down
4 changes: 4 additions & 0 deletions fl2000_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ static void fl2000_display_enable(struct drm_simple_display_pipe *pipe,
struct fl2000_drm_if *drm_if = drm->dev_private;

/* TODO: check cstate/pstate? */
UNUSED(cstate);
UNUSED(plane_state);

fl2000_stream_enable(drm_if->stream);

Expand All @@ -305,6 +307,8 @@ static void fb2000_dirty(struct drm_framebuffer *fb, struct drm_rect *rect)
struct fl2000_drm_if *drm_if = drm->dev_private;
struct drm_gem_dma_object *dma_obj = drm_fb_dma_get_gem_obj(fb, 0);

UNUSED(rect);

if (!drm_dev_enter(fb->dev, &idx)) {
dev_err(drm->dev, "DRM enter failed!");
return;
Expand Down
6 changes: 6 additions & 0 deletions fl2000_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ static int fl2000_compare(struct device *dev, void *data)
"it66121", /* IT66121 driver name*/
};

UNUSED(data);

if (!client)
return 0;

Expand Down Expand Up @@ -88,6 +90,8 @@ static int fl2000_probe(struct usb_interface *interface, const struct usb_device
struct usb_device *usb_dev = interface_to_usbdev(interface);
struct fl2000_devs *devs = dev_get_drvdata(&usb_dev->dev);

UNUSED(usb_dev_id);

if (usb_dev->speed < USB_SPEED_HIGH) {
dev_err(&usb_dev->dev, "USB 1.1 is not supported!");
return -ENODEV;
Expand Down Expand Up @@ -156,6 +160,8 @@ static int fl2000_suspend(struct usb_interface *interface, pm_message_t message)
{
struct usb_device *usb_dev = interface_to_usbdev(interface);

UNUSED(message);

dev_dbg(&usb_dev->dev, "resume");

/* TODO: suspend
Expand Down
1 change: 1 addition & 0 deletions fl2000_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static int fl2000_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, in

static u32 fl2000_i2c_func(struct i2c_adapter *adap)
{
UNUSED(adap);
return I2C_FUNC_I2C | I2C_FUNC_NOSTART;
}

Expand Down
2 changes: 2 additions & 0 deletions fl2000_registers.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@

static bool fl2000_reg_precious(struct device *dev, unsigned int reg)
{
UNUSED(dev);
return FL2000_REG_PRECIOUS(reg);
}

static bool fl2000_reg_volatile(struct device *dev, unsigned int reg)
{
UNUSED(dev);
return FL2000_REG_VOLATILE(reg);
}

Expand Down
2 changes: 2 additions & 0 deletions fl2000_streaming.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ static void fl2000_stream_release(struct device *dev, void *res)
{
struct fl2000_stream *stream = res;

UNUSED(dev);

fl2000_stream_disable(stream);
destroy_workqueue(stream->work_queue);
fl2000_stream_put_buffers(stream);
Expand Down

0 comments on commit 7c2a33e

Please sign in to comment.