]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: remove conversion to bool in dc_link_ddc.c
authorJason Yan <yanaijie@huawei.com>
Mon, 27 Apr 2020 06:37:26 +0000 (14:37 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Apr 2020 19:52:17 +0000 (15:52 -0400)
The '>' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:

drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c:602:28-33: WARNING:
conversion to bool not needed here

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c

index 256889eed93e37dc0ee49de0b68a0055058a18cd..aefd29a440b52060781753360b97cb2d61711b4c 100644 (file)
@@ -599,7 +599,7 @@ bool dal_ddc_submit_aux_command(struct ddc_service *ddc,
        do {
                struct aux_payload current_payload;
                bool is_end_of_payload = (retrieved + DEFAULT_AUX_MAX_DATA_SIZE) >
-                       payload->length ? true : false;
+                       payload->length;
 
                current_payload.address = payload->address;
                current_payload.data = &payload->data[retrieved];