022c12eec91ee0f2ee374744819abebee81b0da3
[openwrt/staging/xback.git] /
1 From 4310db07054697c7c1750cafa57b843f76fd7df0 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Wed, 21 Feb 2018 14:13:03 +0000
4 Subject: [PATCH 396/454] staging: bcm2835-camera: Fix spacing around operators
5
6 Fix checkpatch warnings over spaces around operators.
7 Many were around operations that can be replaced with the
8 BIT(x) macro, so replace with that where appropriate.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
11 ---
12 .../vc04_services/bcm2835-camera/controls.c | 32 +++++++++----------
13 .../vc04_services/bcm2835-camera/mmal-msg.h | 25 ++++++++-------
14 .../bcm2835-camera/mmal-parameters.h | 12 +++----
15 3 files changed, 35 insertions(+), 34 deletions(-)
16
17 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
18 +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
19 @@ -1126,10 +1126,10 @@ static const struct bm2835_mmal_v4l2_ctr
20 {
21 V4L2_CID_MPEG_VIDEO_H264_PROFILE,
22 MMAL_CONTROL_TYPE_STD_MENU,
23 - ~((1<<V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) |
24 - (1<<V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE) |
25 - (1<<V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) |
26 - (1<<V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)),
27 + ~(BIT(V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) |
28 + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE) |
29 + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) |
30 + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)),
31 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,
32 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, 1, NULL,
33 MMAL_PARAMETER_PROFILE,
34 @@ -1138,18 +1138,18 @@ static const struct bm2835_mmal_v4l2_ctr
35 },
36 {
37 V4L2_CID_MPEG_VIDEO_H264_LEVEL, MMAL_CONTROL_TYPE_STD_MENU,
38 - ~((1<<V4L2_MPEG_VIDEO_H264_LEVEL_1_0) |
39 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_1B) |
40 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_1_1) |
41 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_1_2) |
42 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_1_3) |
43 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_2_0) |
44 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_2_1) |
45 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_2_2) |
46 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_3_0) |
47 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_3_1) |
48 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_3_2) |
49 - (1<<V4L2_MPEG_VIDEO_H264_LEVEL_4_0)),
50 + ~(BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1_0) |
51 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1B) |
52 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1_1) |
53 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1_2) |
54 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1_3) |
55 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_2_0) |
56 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_2_1) |
57 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_2_2) |
58 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_3_0) |
59 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_3_1) |
60 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_3_2) |
61 + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_4_0)),
62 V4L2_MPEG_VIDEO_H264_LEVEL_4_0,
63 V4L2_MPEG_VIDEO_H264_LEVEL_4_0, 1, NULL,
64 MMAL_PARAMETER_PROFILE,
65 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h
66 +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h
67 @@ -219,39 +219,40 @@ struct mmal_msg_port_action_reply {
68 #define MMAL_VC_SHORT_DATA 128
69
70 /* Signals that the current payload is the end of the stream of data */
71 -#define MMAL_BUFFER_HEADER_FLAG_EOS (1<<0)
72 +#define MMAL_BUFFER_HEADER_FLAG_EOS BIT(0)
73 /* Signals that the start of the current payload starts a frame */
74 -#define MMAL_BUFFER_HEADER_FLAG_FRAME_START (1<<1)
75 +#define MMAL_BUFFER_HEADER_FLAG_FRAME_START BIT(1)
76 /* Signals that the end of the current payload ends a frame */
77 -#define MMAL_BUFFER_HEADER_FLAG_FRAME_END (1<<2)
78 +#define MMAL_BUFFER_HEADER_FLAG_FRAME_END BIT(2)
79 /* Signals that the current payload contains only complete frames (>1) */
80 #define MMAL_BUFFER_HEADER_FLAG_FRAME \
81 - (MMAL_BUFFER_HEADER_FLAG_FRAME_START|MMAL_BUFFER_HEADER_FLAG_FRAME_END)
82 + (MMAL_BUFFER_HEADER_FLAG_FRAME_START | \
83 + MMAL_BUFFER_HEADER_FLAG_FRAME_END)
84 /* Signals that the current payload is a keyframe (i.e. self decodable) */
85 -#define MMAL_BUFFER_HEADER_FLAG_KEYFRAME (1<<3)
86 +#define MMAL_BUFFER_HEADER_FLAG_KEYFRAME BIT(3)
87 /*
88 * Signals a discontinuity in the stream of data (e.g. after a seek).
89 * Can be used for instance by a decoder to reset its state
90 */
91 -#define MMAL_BUFFER_HEADER_FLAG_DISCONTINUITY (1<<4)
92 +#define MMAL_BUFFER_HEADER_FLAG_DISCONTINUITY BIT(4)
93 /*
94 * Signals a buffer containing some kind of config data for the component
95 * (e.g. codec config data)
96 */
97 -#define MMAL_BUFFER_HEADER_FLAG_CONFIG (1<<5)
98 +#define MMAL_BUFFER_HEADER_FLAG_CONFIG BIT(5)
99 /* Signals an encrypted payload */
100 -#define MMAL_BUFFER_HEADER_FLAG_ENCRYPTED (1<<6)
101 +#define MMAL_BUFFER_HEADER_FLAG_ENCRYPTED BIT(6)
102 /* Signals a buffer containing side information */
103 -#define MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO (1<<7)
104 +#define MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO BIT(7)
105 /*
106 * Signals a buffer which is the snapshot/postview image from a stills
107 * capture
108 */
109 -#define MMAL_BUFFER_HEADER_FLAGS_SNAPSHOT (1<<8)
110 +#define MMAL_BUFFER_HEADER_FLAGS_SNAPSHOT BIT(8)
111 /* Signals a buffer which contains data known to be corrupted */
112 -#define MMAL_BUFFER_HEADER_FLAG_CORRUPTED (1<<9)
113 +#define MMAL_BUFFER_HEADER_FLAG_CORRUPTED BIT(9)
114 /* Signals that a buffer failed to be transmitted */
115 -#define MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED (1<<10)
116 +#define MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED BIT(10)
117
118 struct mmal_driver_buffer {
119 u32 magic;
120 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h
121 +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h
122 @@ -26,17 +26,17 @@
123 #define __MMAL_PARAMETERS_H
124
125 /** Common parameter ID group, used with many types of component. */
126 -#define MMAL_PARAMETER_GROUP_COMMON (0<<16)
127 +#define MMAL_PARAMETER_GROUP_COMMON (0 << 16)
128 /** Camera-specific parameter ID group. */
129 -#define MMAL_PARAMETER_GROUP_CAMERA (1<<16)
130 +#define MMAL_PARAMETER_GROUP_CAMERA (1 << 16)
131 /** Video-specific parameter ID group. */
132 -#define MMAL_PARAMETER_GROUP_VIDEO (2<<16)
133 +#define MMAL_PARAMETER_GROUP_VIDEO (2 << 16)
134 /** Audio-specific parameter ID group. */
135 -#define MMAL_PARAMETER_GROUP_AUDIO (3<<16)
136 +#define MMAL_PARAMETER_GROUP_AUDIO (3 << 16)
137 /** Clock-specific parameter ID group. */
138 -#define MMAL_PARAMETER_GROUP_CLOCK (4<<16)
139 +#define MMAL_PARAMETER_GROUP_CLOCK (4 << 16)
140 /** Miracast-specific parameter ID group. */
141 -#define MMAL_PARAMETER_GROUP_MIRACAST (5<<16)
142 +#define MMAL_PARAMETER_GROUP_MIRACAST (5 << 16)
143
144 /* Common parameters */
145 enum mmal_parameter_common_type {