lkml.org 
[lkml]   [2022]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] media: v4l2-tpg: Use 'unsigned int' instead of just 'unsigned'.
Date
'unsigned int' should be clearer than 'unsigned'.

Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
---
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
index 9b7bcdce6e44..10ed9e65eecc 100644
--- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
+++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
@@ -86,7 +86,7 @@ void tpg_set_font(const u8 *f)
}
EXPORT_SYMBOL_GPL(tpg_set_font);

-void tpg_init(struct tpg_data *tpg, unsigned w, unsigned h)
+void tpg_init(struct tpg_data *tpg, unsigned int w, unsigned int h)
{
memset(tpg, 0, sizeof(*tpg));
tpg->scaled_width = tpg->src_width = w;
@@ -109,15 +109,15 @@ void tpg_init(struct tpg_data *tpg, unsigned w, unsigned h)
}
EXPORT_SYMBOL_GPL(tpg_init);

-int tpg_alloc(struct tpg_data *tpg, unsigned max_w)
+int tpg_alloc(struct tpg_data *tpg, unsigned int max_w)
{
- unsigned pat;
- unsigned plane;
+ unsigned int pat;
+ unsigned int plane;

tpg->max_line_width = max_w;
for (pat = 0; pat < TPG_MAX_PAT_LINES; pat++) {
for (plane = 0; plane < TPG_MAX_PLANES; plane++) {
- unsigned pixelsz = plane ? 2 : 4;
+ unsigned int pixelsz = plane ? 2 : 4;

tpg->lines[pat][plane] =
vzalloc(array3_size(max_w, 2, pixelsz));
@@ -132,7 +132,7 @@ int tpg_alloc(struct tpg_data *tpg, unsigned max_w)
}
}
for (plane = 0; plane < TPG_MAX_PLANES; plane++) {
- unsigned pixelsz = plane ? 2 : 4;
+ unsigned int pixelsz = plane ? 2 : 4;

tpg->contrast_line[plane] =
vzalloc(array_size(pixelsz, max_w));
@@ -153,8 +153,8 @@ EXPORT_SYMBOL_GPL(tpg_alloc);

void tpg_free(struct tpg_data *tpg)
{
- unsigned pat;
- unsigned plane;
+ unsigned int pat;
+ unsigned int plane;

for (pat = 0; pat < TPG_MAX_PAT_LINES; pat++)
for (plane = 0; plane < TPG_MAX_PLANES; plane++) {
--
2.36.1
\
 
 \ /
  Last update: 2022-09-01 03:13    [W:0.045 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site