drm/amd/display/dc/dce/dce_aux: Mark 'dce_aux_transfer_raw' as __maybe_unused
authorLee Jones <lee.jones@linaro.org>
Mon, 11 Jan 2021 19:18:47 +0000 (19:18 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Jan 2021 04:53:25 +0000 (23:53 -0500)
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c: In function ‘dce_aux_transfer_raw’:
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:579:7: warning: variable ‘bytes_replied’ set but not used [-Wunused-but-set-variable]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c

index 3204292..d51b5fe 100644 (file)
@@ -576,7 +576,7 @@ int dce_aux_transfer_raw(struct ddc_service *ddc,
        *operation_result = get_channel_status(aux_engine, &returned_bytes);
 
        if (*operation_result == AUX_CHANNEL_OPERATION_SUCCEEDED) {
-               int bytes_replied = 0;
+               int __maybe_unused bytes_replied = 0;
                bytes_replied = read_channel_reply(aux_engine, payload->length,
                                         payload->data, payload->reply,
                                         &status);