Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1807119ybg; Sat, 19 Oct 2019 02:56:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEyK79qpN2bmVnAdyg7xzRFg3VMC0BVVkgHqdc4VADKE0ThR78XSlsp69ybBdM9REyQ8y2 X-Received: by 2002:a50:fd16:: with SMTP id i22mr14111242eds.154.1571478990771; Sat, 19 Oct 2019 02:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571478990; cv=none; d=google.com; s=arc-20160816; b=aZ8Ee9MVl8laz2n6/QQSkFwhsNiIm7nKOS51h0mtLCMxi9FG0sHMQalGs0qsAVXlYy d2PBCkAALyRkOEHuvlzxr7hWWAEv11Lsbo3cpI/YLZ/dUc06YKt7ttnZEWTS58a0i/Ab RY9PFfIFa/Elh4wMQg+daIBJCxUNOW0FujJw9d91ieK7cL3ByWv3Qs0GqiZ5q6Nty59d crbKB2FhUFh/oiTCFJ3KXpGoRlSWUTpkY3/8Ys8wyIWRRR4seD0LJydVQGxNOg1bD7sw +e9q0giKZIsQPM+B5FrINN7NOSonOtm6wS2h+Wp2PU66953ObHcwGIRQOm0v+anm2sZv F5Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=eL5rqVUras4Vwh4LhNYnD2Kdt75jAMEYEHh9+JFFZMw=; b=K0/ScZP2M27e2rqRQq+rqfBMlxCzrfYauLq4rP7lrxumDlZqjJhjZMp20aiim97IVy R1sGPRscOjr84AsOTRnK6lxDG4SQ41a24+NG2uRKxY26KVKInaZcRRl6tnWqWX9vKONs qvRSFo0oqiyf50lAkXZHXd7MIcG3jysESfX4PQaJb7sdqCcDefftyrrRluaPdbXeNNr+ 4hEx4YndaUHF4oBXX6whKQKiA/jYBnRyaskYox3CD0Aw2pBX1damxQ/JjYtsXC1jtelq jXHQzu7OYH/CU8/yoA9epjCh3/1YbXyZ6SS7VNf/e5622Sk9Dk/1jXV2NCcI2W8RwE+d 4eSg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19si4874616ejj.83.2019.10.19.02.56.07; Sat, 19 Oct 2019 02:56:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727645AbfJSHaW (ORCPT + 99 others); Sat, 19 Oct 2019 03:30:22 -0400 Received: from h1.fbrelay.privateemail.com ([131.153.2.42]:47536 "EHLO h1.fbrelay.privateemail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbfJSHaW (ORCPT ); Sat, 19 Oct 2019 03:30:22 -0400 Received: from MTA-05-3.privateemail.com (mta-05.privateemail.com [198.54.127.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1.fbrelay.privateemail.com (Postfix) with ESMTPS id D4040800AA for ; Sat, 19 Oct 2019 03:18:48 -0400 (EDT) Received: from MTA-05.privateemail.com (localhost [127.0.0.1]) by MTA-05.privateemail.com (Postfix) with ESMTP id 1FE4E60049; Sat, 19 Oct 2019 03:18:47 -0400 (EDT) Received: from wambui.zuku.co.ke (unknown [10.20.151.220]) by MTA-05.privateemail.com (Postfix) with ESMTPA id 8E05560040; Sat, 19 Oct 2019 07:18:43 +0000 (UTC) From: Wambui Karuga To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, airlied@linux.ie, daniel@ffwll.ch, sean@poorly.run, mripard@kernel.org, maarten.lankhorst@linux.intel.com, outreachy-kernel@googlegroups.com, Wambui Karuga Subject: [PATCH] drm: remove unnecessary return variable Date: Sat, 19 Oct 2019 10:18:40 +0300 Message-Id: <20191019071840.16877-1-wambui@karuga.xyz> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wambui Karuga Remove unnecessary variable `ret` in drm_dp_atomic_find_vcpi_slots() only used to hold the function return value and have the function return the value directly. Issue found by coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Wambui Karuga --- drivers/gpu/drm/drm_dp_mst_topology.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 9cccc5e63309..b854a422a523 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3540,7 +3540,7 @@ int drm_dp_atomic_find_vcpi_slots(struct drm_atomic_state *state, { struct drm_dp_mst_topology_state *topology_state; struct drm_dp_vcpi_allocation *pos, *vcpi = NULL; - int prev_slots, req_slots, ret; + int prev_slots, req_slots; topology_state = drm_atomic_get_mst_topology_state(state, mgr); if (IS_ERR(topology_state)) @@ -3587,8 +3587,7 @@ int drm_dp_atomic_find_vcpi_slots(struct drm_atomic_state *state, } vcpi->vcpi = req_slots; - ret = req_slots; - return ret; + return req_slots; } EXPORT_SYMBOL(drm_dp_atomic_find_vcpi_slots); -- 2.23.0