Commit 3e33a840 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915/dsi: s/size_t/int/

This fixes a printf warn from gcc:

drivers/gpu/drm/i915/intel_dsi_cmd.c: In function ‘dsi_vc_send_long’:
drivers/gpu/drm/i915/intel_dsi_cmd.c:181:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t’ [-Wformat=]
Suggested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 3cfca973
...@@ -167,7 +167,7 @@ static int dsi_vc_send_short(struct intel_dsi *intel_dsi, int channel, ...@@ -167,7 +167,7 @@ static int dsi_vc_send_short(struct intel_dsi *intel_dsi, int channel,
} }
static int dsi_vc_send_long(struct intel_dsi *intel_dsi, int channel, static int dsi_vc_send_long(struct intel_dsi *intel_dsi, int channel,
u8 data_type, const u8 *data, size_t len) u8 data_type, const u8 *data, int len)
{ {
struct drm_encoder *encoder = &intel_dsi->base.base; struct drm_encoder *encoder = &intel_dsi->base.base;
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
...@@ -175,7 +175,7 @@ static int dsi_vc_send_long(struct intel_dsi *intel_dsi, int channel, ...@@ -175,7 +175,7 @@ static int dsi_vc_send_long(struct intel_dsi *intel_dsi, int channel,
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
enum pipe pipe = intel_crtc->pipe; enum pipe pipe = intel_crtc->pipe;
u32 data_reg; u32 data_reg;
size_t i, j, n; int i, j, n;
u32 mask; u32 mask;
DRM_DEBUG_KMS("channel %d, data_type %d, len %04x\n", DRM_DEBUG_KMS("channel %d, data_type %d, len %04x\n",
...@@ -194,7 +194,7 @@ static int dsi_vc_send_long(struct intel_dsi *intel_dsi, int channel, ...@@ -194,7 +194,7 @@ static int dsi_vc_send_long(struct intel_dsi *intel_dsi, int channel,
for (i = 0; i < len; i += n) { for (i = 0; i < len; i += n) {
u32 val = 0; u32 val = 0;
n = min_t(size_t, len - i, 4); n = min_t(int, len - i, 4);
for (j = 0; j < n; j++) for (j = 0; j < n; j++)
val |= *data++ << 8 * j; val |= *data++ << 8 * j;
...@@ -208,7 +208,7 @@ static int dsi_vc_send_long(struct intel_dsi *intel_dsi, int channel, ...@@ -208,7 +208,7 @@ static int dsi_vc_send_long(struct intel_dsi *intel_dsi, int channel,
} }
static int dsi_vc_write_common(struct intel_dsi *intel_dsi, static int dsi_vc_write_common(struct intel_dsi *intel_dsi,
int channel, const u8 *data, size_t len, int channel, const u8 *data, int len,
enum dsi_type type) enum dsi_type type)
{ {
int ret; int ret;
...@@ -240,13 +240,13 @@ static int dsi_vc_write_common(struct intel_dsi *intel_dsi, ...@@ -240,13 +240,13 @@ static int dsi_vc_write_common(struct intel_dsi *intel_dsi,
} }
int dsi_vc_dcs_write(struct intel_dsi *intel_dsi, int channel, int dsi_vc_dcs_write(struct intel_dsi *intel_dsi, int channel,
const u8 *data, size_t len) const u8 *data, int len)
{ {
return dsi_vc_write_common(intel_dsi, channel, data, len, DSI_DCS); return dsi_vc_write_common(intel_dsi, channel, data, len, DSI_DCS);
} }
int dsi_vc_generic_write(struct intel_dsi *intel_dsi, int channel, int dsi_vc_generic_write(struct intel_dsi *intel_dsi, int channel,
const u8 *data, size_t len) const u8 *data, int len)
{ {
return dsi_vc_write_common(intel_dsi, channel, data, len, DSI_GENERIC); return dsi_vc_write_common(intel_dsi, channel, data, len, DSI_GENERIC);
} }
...@@ -260,7 +260,7 @@ static int dsi_vc_dcs_send_read_request(struct intel_dsi *intel_dsi, ...@@ -260,7 +260,7 @@ static int dsi_vc_dcs_send_read_request(struct intel_dsi *intel_dsi,
static int dsi_vc_generic_send_read_request(struct intel_dsi *intel_dsi, static int dsi_vc_generic_send_read_request(struct intel_dsi *intel_dsi,
int channel, u8 *reqdata, int channel, u8 *reqdata,
size_t reqlen) int reqlen)
{ {
u16 data; u16 data;
u8 data_type; u8 data_type;
...@@ -286,14 +286,14 @@ static int dsi_vc_generic_send_read_request(struct intel_dsi *intel_dsi, ...@@ -286,14 +286,14 @@ static int dsi_vc_generic_send_read_request(struct intel_dsi *intel_dsi,
} }
static int dsi_read_data_return(struct intel_dsi *intel_dsi, static int dsi_read_data_return(struct intel_dsi *intel_dsi,
u8 *buf, size_t buflen) u8 *buf, int buflen)
{ {
struct drm_encoder *encoder = &intel_dsi->base.base; struct drm_encoder *encoder = &intel_dsi->base.base;
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
enum pipe pipe = intel_crtc->pipe; enum pipe pipe = intel_crtc->pipe;
size_t i, len = 0; int i, len = 0;
u32 data_reg, val; u32 data_reg, val;
if (intel_dsi->hs) { if (intel_dsi->hs) {
...@@ -312,7 +312,7 @@ static int dsi_read_data_return(struct intel_dsi *intel_dsi, ...@@ -312,7 +312,7 @@ static int dsi_read_data_return(struct intel_dsi *intel_dsi,
} }
int dsi_vc_dcs_read(struct intel_dsi *intel_dsi, int channel, u8 dcs_cmd, int dsi_vc_dcs_read(struct intel_dsi *intel_dsi, int channel, u8 dcs_cmd,
u8 *buf, size_t buflen) u8 *buf, int buflen)
{ {
struct drm_encoder *encoder = &intel_dsi->base.base; struct drm_encoder *encoder = &intel_dsi->base.base;
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
...@@ -348,7 +348,7 @@ int dsi_vc_dcs_read(struct intel_dsi *intel_dsi, int channel, u8 dcs_cmd, ...@@ -348,7 +348,7 @@ int dsi_vc_dcs_read(struct intel_dsi *intel_dsi, int channel, u8 dcs_cmd,
} }
int dsi_vc_generic_read(struct intel_dsi *intel_dsi, int channel, int dsi_vc_generic_read(struct intel_dsi *intel_dsi, int channel,
u8 *reqdata, size_t reqlen, u8 *buf, size_t buflen) u8 *reqdata, int reqlen, u8 *buf, int buflen)
{ {
struct drm_encoder *encoder = &intel_dsi->base.base; struct drm_encoder *encoder = &intel_dsi->base.base;
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
......
...@@ -36,16 +36,16 @@ ...@@ -36,16 +36,16 @@
void dsi_hs_mode_enable(struct intel_dsi *intel_dsi, bool enable); void dsi_hs_mode_enable(struct intel_dsi *intel_dsi, bool enable);
int dsi_vc_dcs_write(struct intel_dsi *intel_dsi, int channel, int dsi_vc_dcs_write(struct intel_dsi *intel_dsi, int channel,
const u8 *data, size_t len); const u8 *data, int len);
int dsi_vc_generic_write(struct intel_dsi *intel_dsi, int channel, int dsi_vc_generic_write(struct intel_dsi *intel_dsi, int channel,
const u8 *data, size_t len); const u8 *data, int len);
int dsi_vc_dcs_read(struct intel_dsi *intel_dsi, int channel, u8 dcs_cmd, int dsi_vc_dcs_read(struct intel_dsi *intel_dsi, int channel, u8 dcs_cmd,
u8 *buf, size_t buflen); u8 *buf, int buflen);
int dsi_vc_generic_read(struct intel_dsi *intel_dsi, int channel, int dsi_vc_generic_read(struct intel_dsi *intel_dsi, int channel,
u8 *reqdata, size_t reqlen, u8 *buf, size_t buflen); u8 *reqdata, int reqlen, u8 *buf, int buflen);
int dpi_send_cmd(struct intel_dsi *intel_dsi, u32 cmd); int dpi_send_cmd(struct intel_dsi *intel_dsi, u32 cmd);
...@@ -84,21 +84,21 @@ static inline int dsi_vc_generic_write_2(struct intel_dsi *intel_dsi, ...@@ -84,21 +84,21 @@ static inline int dsi_vc_generic_write_2(struct intel_dsi *intel_dsi,
/* XXX: questionable read helpers */ /* XXX: questionable read helpers */
static inline int dsi_vc_generic_read_0(struct intel_dsi *intel_dsi, static inline int dsi_vc_generic_read_0(struct intel_dsi *intel_dsi,
int channel, u8 *buf, size_t buflen) int channel, u8 *buf, int buflen)
{ {
return dsi_vc_generic_read(intel_dsi, channel, NULL, 0, buf, buflen); return dsi_vc_generic_read(intel_dsi, channel, NULL, 0, buf, buflen);
} }
static inline int dsi_vc_generic_read_1(struct intel_dsi *intel_dsi, static inline int dsi_vc_generic_read_1(struct intel_dsi *intel_dsi,
int channel, u8 param, u8 *buf, int channel, u8 param, u8 *buf,
size_t buflen) int buflen)
{ {
return dsi_vc_generic_read(intel_dsi, channel, &param, 1, buf, buflen); return dsi_vc_generic_read(intel_dsi, channel, &param, 1, buf, buflen);
} }
static inline int dsi_vc_generic_read_2(struct intel_dsi *intel_dsi, static inline int dsi_vc_generic_read_2(struct intel_dsi *intel_dsi,
int channel, u8 param1, u8 param2, int channel, u8 param1, u8 param2,
u8 *buf, size_t buflen) u8 *buf, int buflen)
{ {
u8 req[2] = { param1, param2 }; u8 req[2] = { param1, param2 };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment