Received: by 10.192.165.148 with SMTP id m20csp4694406imm; Tue, 24 Apr 2018 07:02:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx49dRJ/I4tQFewyMNW7O2UewSbeHK6NlIhtK8FSbaTuVfmR7bxJ0vFH0ly4bkhPqcY0cynHL X-Received: by 10.99.115.78 with SMTP id d14mr8696821pgn.1.1524578520226; Tue, 24 Apr 2018 07:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524578520; cv=none; d=google.com; s=arc-20160816; b=oCGmx/QrxvFEOLDgVYusFzUR3vxV8wS76qTfZpw+2hRClWnpnD1V82kGiDH9iJdHoW 0ZvTbC2u/rZ4SxN1xwvdqfGGgpDG3Al7pLawkukmkLkvt9M8dkyX9GOoZB6GpBVc9k7G UrcK6NNmDPRR2ZqEoCbmE3LrpozA6L0AEkWCBflG77aNevdSGzwcsblTYS9KFL3KRjtj ublEykFlyPYmzpzJu8l0G10yM6NvsN/De1g79vpEm7J1nXwjUgGfZ90dnncQlh/9VDVE 5r6LYFlYYQeJXEPMDjCOPp+uHJZe6FLFttNdW1yX/Qi2U0XDVKiRQAlTZ4TGfSTaACC8 LoEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=IsLnKR9k1JC+JxOxFtrBzuoMnJO0TUWaF6gS8PqA+xI=; b=1D7RVh5g1SJKj1ImVndKk3US5aPzndfUJvQpIZpF5Gsd17Cu6JpH8UEVFHnB7ZxC/5 I/WO0cUJ14kcM+cxBcF/64Onrow2LB7vom2uVoyQXQcL6M2IaH0CkOdILMq4nWiJwIv9 bwzK3QArM9vlql1hVHS6GYzFzR5e4F6wDIWPy+4kl/q2duRkQcDxpPYyzWeMQRYm0wBL LrR/fK+NkGek/3J+ibl4VZoWO8rYzKnMoNbwMKsNhxjFi7Ju1alNN4NKZFHJG/dQMOHr nHt/K1L16+tkIFZ+NjbQMhpKst2s5Hvgvb4bz3Yt26ytpvKl/aP06GXlJP6s2pSUjPDq ayTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OLX4f46Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si11996120pgu.626.2018.04.24.07.01.44; Tue, 24 Apr 2018 07:02:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OLX4f46Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933391AbeDXNOo (ORCPT + 99 others); Tue, 24 Apr 2018 09:14:44 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:51419 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757942AbeDXNOl (ORCPT ); Tue, 24 Apr 2018 09:14:41 -0400 Received: by mail-wm0-f66.google.com with SMTP id j4so891247wme.1 for ; Tue, 24 Apr 2018 06:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=IsLnKR9k1JC+JxOxFtrBzuoMnJO0TUWaF6gS8PqA+xI=; b=OLX4f46Z7iecIbRHDbLrZ5MR3zKxekaiECu3FBcGS9ztdbQImUl7B/NQgbh27AYvdL fUsVKhrJDLPoel+GM2G31g9DChLiteA7zr5Rn76kpggtUADpbm0H+m/MyN+xDET6sMFt WqiLPXoQR0vtYimC/PUlHMNry62h7u5gPZCve7KaY3cWnAc/80D3mI/JbE2kNAIjwnUW cOWAIeIQsZhajeeGJfb649sZGHgMnNNXXEeZMClfdfkgqZ4zfl8KhD6eQSIBy2R+Gt+o tcPL7QmPP/fe3EngBsxN8QYrKhCCwhKli80aWnl02WbjSILt1b+cvsmlYxhc1gZYyb2k kQVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IsLnKR9k1JC+JxOxFtrBzuoMnJO0TUWaF6gS8PqA+xI=; b=uf5gekSmWTn1Zbjc6HNod/FCyMqTEeL4vVYtqFPVNrFuQLQO6VUF3j8kdh7CeXYB3n 03OO8aeJP7xbl6qOzldpQxjo9MoMeHcdxpbFQh21t//wi0Q39Vjl3uFdnoyhQW3AatE9 VLAeO3p8hELgI06f8PM+qpI2EbEiuegUx4wcHnRH7JuyIeZVQycKug6EsDmmTSck0fMh ut4vzACE9N7pr92msRup+G8Jr8RXyO8xptOnJXXuhOfeWqxybl5LeDWWLhuS3vGZHBXi 1E1QLgZZmvu25pPUXo4BousuhIxUBVvpBuq2PJxYgLPF6PDdAoJFjNGyK5LRhVzF/8ti uRpA== X-Gm-Message-State: ALQs6tDOLFu3Mte0HiDdBnd+LhG9LZ94OB94km+QIcUrTIf0GhPzek9p dic4I7d3FS3+b18nXtNSyAzH7w8P X-Received: by 10.167.216.74 with SMTP id f10mr22219758eds.204.1524575680112; Tue, 24 Apr 2018 06:14:40 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:40e7:cd00:5113:f351:d61c:108c]) by smtp.gmail.com with ESMTPSA id c15sm1461025edr.78.2018.04.24.06.14.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 06:14:39 -0700 (PDT) From: Luc Van Oostenryck To: linux-kernel@vger.kernel.org Cc: Luc Van Oostenryck , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Dave Airlie , Samuel Li , Himanshu Jha , Jani Nikula , Lukas Wunner , Keith Packard , Daniel Vetter , Monk Liu , Masahiro Yamada , Peter Rosin , Harry Wentland , Andrey Grodzovsky , Tony Cheng , "Leo (Sunpeng) Li" , Shirish S , "Jerry (Fangzhi) Zuo" , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/admgpu: fix mode_valid's return type Date: Tue, 24 Apr 2018 15:14:18 +0200 Message-Id: <20180424131438.1751-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The method struct drm_connector_helper_funcs::mode_valid is defined as returning an 'enum drm_mode_status' but the driver implementation for this method uses an 'int' for it. Fix this by using 'enum drm_mode_status' in the driver too. Signed-off-by: Luc Van Oostenryck --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index 96501ff0e..8e66851eb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -691,7 +691,7 @@ static int amdgpu_connector_lvds_get_modes(struct drm_connector *connector) return ret; } -static int amdgpu_connector_lvds_mode_valid(struct drm_connector *connector, +static enum drm_mode_status amdgpu_connector_lvds_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); @@ -843,7 +843,7 @@ static int amdgpu_connector_vga_get_modes(struct drm_connector *connector) return ret; } -static int amdgpu_connector_vga_mode_valid(struct drm_connector *connector, +static enum drm_mode_status amdgpu_connector_vga_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { struct drm_device *dev = connector->dev; @@ -1172,7 +1172,7 @@ static void amdgpu_connector_dvi_force(struct drm_connector *connector) amdgpu_connector->use_digital = true; } -static int amdgpu_connector_dvi_mode_valid(struct drm_connector *connector, +static enum drm_mode_status amdgpu_connector_dvi_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { struct drm_device *dev = connector->dev; @@ -1448,7 +1448,7 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force) return ret; } -static int amdgpu_connector_dp_mode_valid(struct drm_connector *connector, +static enum drm_mode_status amdgpu_connector_dp_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index b51f05dc9..476c9b987 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c @@ -329,7 +329,7 @@ static int dce_virtual_get_modes(struct drm_connector *connector) return 0; } -static int dce_virtual_mode_valid(struct drm_connector *connector, +static enum drm_mode_status dce_virtual_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { return MODE_OK; diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 4e2f379ce..d7e52c4f6 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2855,7 +2855,7 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector) create_eml_sink(aconnector); } -int amdgpu_dm_connector_mode_valid(struct drm_connector *connector, +enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { int result = MODE_ERROR; diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index b68400c11..cb7e20cb3 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -246,7 +246,7 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm, struct dc_link *link, int link_index); -int amdgpu_dm_connector_mode_valid(struct drm_connector *connector, +enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode); void dm_restore_drm_connector_state(struct drm_device *dev, -- 2.17.0