Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2293146ybg; Sat, 19 Oct 2019 12:07:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJ8uGedKTtRB3qAM4HV2+sFmtZYkltiz9ggMAZeUw6R16Q80swxVG2QVF2WwErjkdMmCK6 X-Received: by 2002:aa7:d888:: with SMTP id u8mr15947804edq.144.1571512042913; Sat, 19 Oct 2019 12:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571512042; cv=none; d=google.com; s=arc-20160816; b=cVKODuDkOXCDj3RxAtLaeTAYM2lkNhMM0Ra6s/wU9e0s78USihClsJPqmHrSbUuQ3V 5e5A+kZcPp9ydGRdxhXaz9Yi8bpCZZg0cDv0kIMVV3JC1J9hvJ+0q05+9OD6hOuF3chx 9gvbHSgDcibwGQVJPpFwbVuBfwJerZe7lXpjpO+Unlr/Gu1tsdAOuwDx+baTtYizsoI0 pf9+mOmcJYpR1jhl1EeHe5ldZ0O9D3jPUbIO9KmbNlH1ldqHuk9rsFHVlXaBTQ8Vthwr UeqlQTG2YcUwAD7C2TItDq88QNQZSXknPPysmEpTnvlRK27BCKeG3zI1MZVBpJQzpUI0 UPQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=8s7hH2oq67USPr3c3KTYDwTXtKzu1IZRS8T0+ID15JY=; b=kJnQXH9wiT9pO0Q6iviTQOyIcuID23Y+tu3KnqYRkPnU9y9hAFM53ohC1NU83lFtXU ELy/4KtnXIL6tMha6ykxrW+apvd9fKM6x/BlqBnTSAGAUb4WvRVZulTz0GzAZISw4gAc 2JtzU2mjUxQPFhxbJRPm2uaYWt3K/1Y1fAzT3fBQGnJibF+mAy7dyK5rMzC7yoYKXSB0 8SLAOiTt5bRpCi/RToi5SdoCYg+ByK/kklmJxZE//pkFXcdmGT7l929ml9lw3/dnfxIe vb3GKdix2KjU6u519wMYQiBHgBxtyif7qq9Qlf6/rRImS6IlQZ+U49QKkPAB1tZf3Ghd TiYQ== 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 h28si6862043edh.278.2019.10.19.12.06.59; Sat, 19 Oct 2019 12:07:22 -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 S1726162AbfJSTEf (ORCPT + 99 others); Sat, 19 Oct 2019 15:04:35 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:32453 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbfJSTEf (ORCPT ); Sat, 19 Oct 2019 15:04:35 -0400 X-IronPort-AV: E=Sophos;i="5.67,316,1566856800"; d="scan'208";a="323314015" Received: from ip-121.net-89-2-166.rev.numericable.fr (HELO hadrien) ([89.2.166.121]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Oct 2019 21:04:31 +0200 Date: Sat, 19 Oct 2019 21:04:31 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Wambui Karuga cc: dri-devel@lists.freedesktop.org, 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: Re: [Outreachy kernel] [PATCH] drm: remove unnecessary return variable In-Reply-To: <20191019071840.16877-1-wambui@karuga.xyz> Message-ID: References: <20191019071840.16877-1-wambui@karuga.xyz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 19 Oct 2019, Wambui Karuga wrote: > 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. This patch applies for me, but with a huge offset. What tree are you using? Also, Greg won't apply this, because it's not targeting staging. Is this for a specific outreachy project? julia > 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 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191019071840.16877-1-wambui%40karuga.xyz. >