]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: vim2m: remove unused CLIP macro
authorYunseong Kim <ysk@kzalloc.com>
Mon, 14 Jul 2025 13:33:11 +0000 (22:33 +0900)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Fri, 29 Aug 2025 09:04:01 +0000 (11:04 +0200)
The CLIP macro, which was used to clamp color component values to the
[0, 255] range, is no longer used anywhere in the vim2m driver. Remove it
to clean up the code and avoid confusion.

The following issues were reported by checkpatch:
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Yunseong Kim <ysk@kzalloc.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/test-drivers/vim2m.c

index 350b454b1e0d7f7503e7bf4bf6b2066150f88f72..86c32699111adc838d4304ec0c0f0026db128d70 100644 (file)
@@ -266,9 +266,6 @@ static const char *type_name(enum v4l2_buf_type type)
        }
 }
 
-#define CLIP(__color) \
-       (u8)(((__color) > 0xff) ? 0xff : (((__color) < 0) ? 0 : (__color)))
-
 static void copy_line(struct vim2m_q_data *q_data_out,
                      u8 *src, u8 *dst, bool reverse)
 {