From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: [radeon-alex:amd-mainline-dkms-4.15 1231/1759] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2183 fill_plane_attributes() warn: if statement not indented Date: Thu, 26 Apr 2018 15:54:17 +0300 Message-ID: <20180426125417.copld3cfbebmhitf@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kbuild-bounces@lists.01.org Sender: "kbuild" To: kbuild@01.org, "Leo (Sunpeng) Li" Cc: Alex Deucher , Kevin Wang , Harry Wentland , kbuild-all@01.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-4.15 head: 9556f93f18f7923978fb90f860c107fed9ca7f57 commit: 265083076187e619aa9176aeb05ad630013429b4 [1231/1759] drm/amd/displa= y: Hookup color management functions smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2183 fill_plane= _attributes() warn: if statement not indented git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git git remote update radeon-alex git checkout 265083076187e619aa9176aeb05ad630013429b4 vim +2183 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c e7b07ceef Harry Wentland 2017-08-10 2143 = 3ee6b26b7 Alex Deucher 2017-10-10 2144 static int fill_plane_attribut= es(struct amdgpu_device *adev, 3be5262e3 Harry Wentland 2017-07-27 2145 struct dc_plane_state *dc= _plane_state, e7b07ceef Harry Wentland 2017-08-10 2146 struct drm_plane_state *p= lane_state, ab8968728 Michel D=E4nzer 2017-10-26 2147 struct drm_crtc_state *= crtc_state) e7b07ceef Harry Wentland 2017-08-10 2148 { e7b07ceef Harry Wentland 2017-08-10 2149 const struct amdgpu_framebuff= er *amdgpu_fb =3D e7b07ceef Harry Wentland 2017-08-10 2150 to_amdgpu_framebuffer(plane_= state->fb); 25b138493 Roger He 2018-02-26 2151 #if LINUX_VERSION_CODE >=3D KE= RNEL_VERSION(4, 6, 0) || \ 25b138493 Roger He 2018-02-26 2152 defined(OS_NAME_RHEL_7_3) || \ 25b138493 Roger He 2018-02-26 2153 defined(OS_NAME_RHEL_7_4_5) e7b07ceef Harry Wentland 2017-08-10 2154 const struct drm_crtc *crtc = =3D plane_state->crtc; 30b13a59d Junwei Zhang 2018-02-08 2155 #else 30b13a59d Junwei Zhang 2018-02-08 2156 struct drm_crtc *crtc =3D pla= ne_state->crtc; 30b13a59d Junwei Zhang 2018-02-08 2157 #endif e7b07ceef Harry Wentland 2017-08-10 2158 struct dc_transfer_func *inpu= t_tf; e7b07ceef Harry Wentland 2017-08-10 2159 int ret =3D 0; e7b07ceef Harry Wentland 2017-08-10 2160 = 3be5262e3 Harry Wentland 2017-07-27 2161 if (!fill_rects_from_plane_st= ate(plane_state, dc_plane_state)) e7b07ceef Harry Wentland 2017-08-10 2162 return -EINVAL; e7b07ceef Harry Wentland 2017-08-10 2163 = e7b07ceef Harry Wentland 2017-08-10 2164 ret =3D fill_plane_attributes= _from_fb( e7b07ceef Harry Wentland 2017-08-10 2165 crtc->dev->dev_private, 3be5262e3 Harry Wentland 2017-07-27 2166 dc_plane_state, ab8968728 Michel D=E4nzer 2017-10-26 2167 amdgpu_fb); e7b07ceef Harry Wentland 2017-08-10 2168 = e7b07ceef Harry Wentland 2017-08-10 2169 if (ret) e7b07ceef Harry Wentland 2017-08-10 2170 return ret; e7b07ceef Harry Wentland 2017-08-10 2171 = e7b07ceef Harry Wentland 2017-08-10 2172 input_tf =3D dc_create_transf= er_func(); e7b07ceef Harry Wentland 2017-08-10 2173 = e7b07ceef Harry Wentland 2017-08-10 2174 if (input_tf =3D=3D NULL) e7b07ceef Harry Wentland 2017-08-10 2175 return -ENOMEM; e7b07ceef Harry Wentland 2017-08-10 2176 = 3be5262e3 Harry Wentland 2017-07-27 2177 dc_plane_state->in_transfer_f= unc =3D input_tf; e7b07ceef Harry Wentland 2017-08-10 2178 = e7b07ceef Harry Wentland 2017-08-10 2179 /* In case of gamma set, upda= te gamma value */ 25b138493 Roger He 2018-02-26 2180 #if LINUX_VERSION_CODE >=3D KE= RNEL_VERSION(4, 6, 0) || \ 25b138493 Roger He 2018-02-26 2181 defined(OS_NAME_RHEL_7_3) || \ 25b138493 Roger He 2018-02-26 2182 defined(OS_NAME_RHEL_7_4_5) e7b07ceef Harry Wentland 2017-08-10 @2183 if (crtc_state->gamma_lut) 265083076 Leo (Sunpeng Li 2018-02-02 2184) /* 265083076 Leo (Sunpeng Li 2018-02-02 2185) * Always set input transfer = function, since plane state is refreshed 265083076 Leo (Sunpeng Li 2018-02-02 2186) * every time. 265083076 Leo (Sunpeng Li 2018-02-02 2187) */ 265083076 Leo (Sunpeng Li 2018-02-02 2188) ret =3D amdgpu_dm_set_degamma= _lut(crtc_state, dc_plane_state); It should be indented and I would normally use curly braces around the whole thing as well for readability. 3f4b5749a Junwei Zhang 2018-02-07 2189 #else 3f4b5749a Junwei Zhang 2018-02-07 2190 if (crtc->mode.private_flags = & AMDGPU_CRTC_MODE_PRIVATE_FLAGS_GAMMASET) { 3f4b5749a Junwei Zhang 2018-02-07 2191 fill_gamma_from_crtc(crtc, d= c_plane_state); 3f4b5749a Junwei Zhang 2018-02-07 2192 /* reset trigger of gamma */ 3f4b5749a Junwei Zhang 2018-02-07 2193 crtc->mode.private_flags &= =3D 3f4b5749a Junwei Zhang 2018-02-07 2194 ~AMDGPU_CRTC_MODE_PRIVATE_F= LAGS_GAMMASET; 3f4b5749a Junwei Zhang 2018-02-07 2195 } 3f4b5749a Junwei Zhang 2018-02-07 2196 #endif e7b07ceef Harry Wentland 2017-08-10 2197 = e7b07ceef Harry Wentland 2017-08-10 2198 return ret; e7b07ceef Harry Wentland 2017-08-10 2199 } e7b07ceef Harry Wentland 2017-08-10 2200 =