38bcbbd2d9a23570ab22c9d74b376857428183ac
[oweals/openwrt.git] /
1 From 54fde7601287891754bef85efbbc9b5648d043f4 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] 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   |  3 +-
14  .../bcm2835-camera/mmal-parameters.h          | 12 +++----
15  3 files changed, 24 insertions(+), 23 deletions(-)
16
17 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
18 +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
19 @@ -1123,10 +1123,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 @@ -1135,18 +1135,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 @@ -223,7 +223,8 @@ struct mmal_msg_port_action_reply {
68  #define MMAL_BUFFER_HEADER_FLAG_FRAME_END              BIT(2)
69  /* Signals that the current payload contains only complete frames (>1) */
70  #define MMAL_BUFFER_HEADER_FLAG_FRAME                  \
71 -       (MMAL_BUFFER_HEADER_FLAG_FRAME_START|MMAL_BUFFER_HEADER_FLAG_FRAME_END)
72 +       (MMAL_BUFFER_HEADER_FLAG_FRAME_START | \
73 +        MMAL_BUFFER_HEADER_FLAG_FRAME_END)
74  /* Signals that the current payload is a keyframe (i.e. self decodable) */
75  #define MMAL_BUFFER_HEADER_FLAG_KEYFRAME               BIT(3)
76  /*
77 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h
78 +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h
79 @@ -23,17 +23,17 @@
80  #define __MMAL_PARAMETERS_H
81  
82  /** Common parameter ID group, used with many types of component. */
83 -#define MMAL_PARAMETER_GROUP_COMMON            (0<<16)
84 +#define MMAL_PARAMETER_GROUP_COMMON            (0 << 16)
85  /** Camera-specific parameter ID group. */
86 -#define MMAL_PARAMETER_GROUP_CAMERA            (1<<16)
87 +#define MMAL_PARAMETER_GROUP_CAMERA            (1 << 16)
88  /** Video-specific parameter ID group. */
89 -#define MMAL_PARAMETER_GROUP_VIDEO             (2<<16)
90 +#define MMAL_PARAMETER_GROUP_VIDEO             (2 << 16)
91  /** Audio-specific parameter ID group. */
92 -#define MMAL_PARAMETER_GROUP_AUDIO             (3<<16)
93 +#define MMAL_PARAMETER_GROUP_AUDIO             (3 << 16)
94  /** Clock-specific parameter ID group. */
95 -#define MMAL_PARAMETER_GROUP_CLOCK             (4<<16)
96 +#define MMAL_PARAMETER_GROUP_CLOCK             (4 << 16)
97  /** Miracast-specific parameter ID group. */
98 -#define MMAL_PARAMETER_GROUP_MIRACAST       (5<<16)
99 +#define MMAL_PARAMETER_GROUP_MIRACAST       (5 << 16)
100  
101  /* Common parameters */
102  enum mmal_parameter_common_type {