From patchwork Tue Feb 2 06:05:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 8186961 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C88C49F4DD for ; Tue, 2 Feb 2016 06:06:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F199320268 for ; Tue, 2 Feb 2016 06:06:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EE1AE20260 for ; Tue, 2 Feb 2016 06:06:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47B4C6E388; Mon, 1 Feb 2016 22:06:05 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A17E6E388 for ; Mon, 1 Feb 2016 22:06:04 -0800 (PST) Received: by mail-pf0-f173.google.com with SMTP id w123so4549670pfb.0 for ; Mon, 01 Feb 2016 22:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=IxOhbPxA2jF76jMGkPUW1wGFdgsg5gf8RNlLa6Ytebs=; b=QgdznWfc3ECO/a0OefS0xd5sHlBu2+0ICtc4+9A/ortBrPZK6bjU+vTCUYTrZBD/r5 7VgnNN+Ueqorzw3OQjfIfhpDvyfalu22n9B/Y9a7RoxE5jA+Qm+Eqez0PYKCBeOIskGj h0z/TJcC1r+6vFRkDcwAlqsg9MfDnJxOkyseMLkbMQ4d9GnORFcYuPkYIvFHiszdVVYS 6h+3nJggmt1cttnbilw3eYTqrGpmtUgOueMS2GshWZFMRDNDIDNB6gakxu9CFG8UZ1JL tdTPnc+Qqe7SLXGGi3BgW57VMH7G1LZ0358HhD8r8xy3HHiXcM6FNkckMC8Z5k3Fa7wV r9rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IxOhbPxA2jF76jMGkPUW1wGFdgsg5gf8RNlLa6Ytebs=; b=QqAVRwgCG1gu1hUzfa9DaJeKwHcTm2AeZnlZmjSnxL8irwbxbLXpY6r5wyuXWgYW6W 9TPGiU5ZnlUfkIc+xZ4x25zbkJomQBIqGXAZ0UlLGqABzDnRW/j3Ql1lT6ps0W1abZMB mbIFD//9V6sDrBNoXSzKBrO2wxyj9UcupDok0RVXshitjmpoJeNbVjWMCb53UT7gNwbn i7xFaGbML0tHp9Bs7pZXXYY9LTkoS6eJOOJddDIQBy5S5VCK7eIjxazPdMSecOLnvkV8 E0pJd9ivP1ST8vxoyderErePa4tYN1FQA06/bKu9eAa9NkJmgiwNByr5BeVDI0W77MOJ 2g4w== X-Gm-Message-State: AG10YOTrx9EMA+bJaPx+KyDUJMfLKfXEcITaV61EK5vZWqzni7PR0QCuzko/mhMufncNlg== X-Received: by 10.98.18.15 with SMTP id a15mr11704410pfj.145.1454393163497; Mon, 01 Feb 2016 22:06:03 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([183.82.228.136]) by smtp.gmail.com with ESMTPSA id cq4sm47589150pad.28.2016.02.01.22.06.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 22:06:02 -0800 (PST) From: Sudip Mukherjee To: Patrik Jakobsson , David Airlie , Daniel Vetter Subject: [PATCH] drm/gma500: remove helper function Date: Tue, 2 Feb 2016 11:35:55 +0530 Message-Id: <1454393155-13142-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sudip Mukherjee X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We were getting build warning about: drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization from incompatible pointer type The callback to dpms was pointing to a helper function which had a return type of void, whereas the callback should point to a function which has a return type of int. On closer look it turned out that we do not need the helper function since if we call drm_helper_connector_dpms() directly, the first check that drm_helper_connector_dpms() does is: if (mode == connector->dpms) Signed-off-by: Sudip Mukherjee Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c index d758f4c..907cb51 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c @@ -382,16 +382,6 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector, return MODE_OK; } -static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode) -{ - if (mode == connector->dpms) - return; - - /*first, execute dpms*/ - - drm_helper_connector_dpms(connector, mode); -} - static struct drm_encoder *mdfld_dsi_connector_best_encoder( struct drm_connector *connector) { @@ -404,7 +394,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder( /*DSI connector funcs*/ static const struct drm_connector_funcs mdfld_dsi_connector_funcs = { - .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms, + .dpms = drm_helper_connector_dpms, .detect = mdfld_dsi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .set_property = mdfld_dsi_connector_set_property,