[PATCH v2] media: staging: tegra-vde: Cleaned uapi.h from checkpatch warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



BIT and __packed macros defined.
Removing old copyright notice in favor of SPDX identifier.

Signed-off-by: Mateo de Mayo <mateodemayo@xxxxxxxxx>
---

I added __packed and BIT macros definition and removed copyright notice.
Now the problem is that checkpatch warns about the __packed definition line,
but at least it may be clearer for future patchers that __packed can't be used.

 drivers/staging/media/tegra-vde/uapi.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/media/tegra-vde/uapi.h b/drivers/staging/media/tegra-vde/uapi.h
index 4bce08a7a54c..e29d806013ec 100644
--- a/drivers/staging/media/tegra-vde/uapi.h
+++ b/drivers/staging/media/tegra-vde/uapi.h
@@ -1,18 +1,18 @@
-/*
- * Copyright (C) 2016-2017 Dmitry Osipenko <digetx@xxxxxxxxx>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UAPI_TEGRA_VDE_H_
 #define _UAPI_TEGRA_VDE_H_

 #include <linux/types.h>
 #include <asm/ioctl.h>

+#ifndef __packed
+#define __packed		__attribute__((packed))
+#endif
+
+#ifndef BIT
+#define BIT(nr)			(1UL << (nr))
+#endif
+
 #define FLAG_B_FRAME		BIT(0)
 #define FLAG_REFERENCE		BIT(1)

@@ -29,7 +29,7 @@ struct tegra_vde_h264_frame {
 	__u32 flags;

 	__u32 reserved;
-} __attribute__((packed));
+} __packed;

 struct tegra_vde_h264_decoder_ctx {
 	__s32 bitstream_data_fd;
@@ -61,7 +61,7 @@ struct tegra_vde_h264_decoder_ctx {
 	__u8  num_ref_idx_l1_active_minus1;

 	__u32 reserved;
-} __attribute__((packed));
+} __packed;

 #define VDE_IOCTL_BASE			('v' + 0x20)

--
2.19.1




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux