Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1179077pxk; Fri, 25 Sep 2020 08:09:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8GFOyrw0Fnbh93QymxM2DvOn42J/G0IfdzHJ5A/8dZUFi9VVp42Je+NffnlCP34b82Sur X-Received: by 2002:a50:99d5:: with SMTP id n21mr1833576edb.88.1601046573590; Fri, 25 Sep 2020 08:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601046573; cv=none; d=google.com; s=arc-20160816; b=lnxFCwMz5UN0yXKq3jMybccwjjeyuaWeVLhdl6tVOzcyMHmf5rD/KwoJcm5AtSlOtB m9MXviAvAeOKCGFgUOOV6GCuKVKi7oWQ93h6fmaYrLMLcNYBkyFyXgQVNl0H2Z1tnH2Z ao0i3diKpjepBkreqWB40xmk7+osRSOOBsod7uRo4jSiL9gecegLWJAe+cusNOXPHWrj /V0hnhkHur6o5/Hk94VTU5L+ld5bxST0E0j59nVDNy+PqYBdu+CJFUB0+N3MTL+CCmUH Mclb29ibUZYvYXgkfCIGgC5TGI4CMLOIsb7Q58G3RdJAKH5GtffzKTlTakDGUj6GE8Fn YTfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x1sbmZ75NGM7AD1AjHWbiOyh9jrSaY5rZ5i9u5wAYJo=; b=HuGJwzYhk46kzcTuSRqq7X127fvOgMNfHcCupb3yLwH7qSNo1q86JjMiikjjc+gcXt bK/JbQKLScHmIzWGMCFaTHh59rFHsAur5vI1UNwbQr399KKEn96WFWK1Qmf5iwWbG0h3 1n2p5qi+i0QJdqBL8ymChDHZ5/k4CePikNjGWPg87ermYe+00kDjwFTFfIOqarbSZmG2 yRingkcHSsv3L0FUuEDw5jQOrjaUtn+K797I8aOTkHPcPEDffVeE7Dsq27FL+Ratwl5G cimjak9fkYOqmO8E4izvK9Ys1PkZErWxCpqtWoJ2sgC5ns3Clf2jF0y8Pada42ct065W 3XqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pyo7C3Hq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oi22si2352297ejb.85.2020.09.25.08.09.09; Fri, 25 Sep 2020 08:09:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pyo7C3Hq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729165AbgIYPGK (ORCPT + 99 others); Fri, 25 Sep 2020 11:06:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729157AbgIYPGK (ORCPT ); Fri, 25 Sep 2020 11:06:10 -0400 Received: from mail-oo1-xc44.google.com (mail-oo1-xc44.google.com [IPv6:2607:f8b0:4864:20::c44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAEF9C0613D4 for ; Fri, 25 Sep 2020 08:06:09 -0700 (PDT) Received: by mail-oo1-xc44.google.com with SMTP id c4so821050oou.6 for ; Fri, 25 Sep 2020 08:06:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=x1sbmZ75NGM7AD1AjHWbiOyh9jrSaY5rZ5i9u5wAYJo=; b=pyo7C3HqTnTZw96JOVwCGuKcQv8AZnFVKCuVi44ecNIPXuVs/QKnG7KkR8HaWa8mi8 +4RXIpIV7yC+DMPFGmlC1znrpeyirczZoRhDcniz3Sq21NbUfdnNa2cgexCi5Rsyfy22 64UKby7l0HD3iX3+UfPshE3Fq7vMhS4XjNz8Grg1ahfGucyEqlR5pLmq+CMjqsO1HT+e Q43UiaWwI7PqTbxfbK8JebEj+r57ydaCbgZE18CNMMl3VrIG8L3eK9SbbzHS3Ck+LTK0 P5Gz6Z4O+64+SiMK6/iHKJLP4cA1/FMChf/Q4HGshS3UHT51NbTNuQ081yIpXRIMaKco o/2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=x1sbmZ75NGM7AD1AjHWbiOyh9jrSaY5rZ5i9u5wAYJo=; b=aM6oBt7Glct/2jl7R2nmcsHagOG2nrQX1ONC/0u0BGxPj6l6K6SutxAz4dkzDPql8M yzgM+w0XU/QWcakdfoWlRX5JlNQekdZqQKtTDzX+usWAU21cq6tvTTF3gl4ROSWFfLzP zbJgqHsHjqbYx5RRSS3mdxkc3fxchY0dV5IUXmOu741NCPvr5Pv5bi52mHWjGsE6qy39 DyhykxSh+ANnckRq3qcrZeQLCQ/9dGmwKXGljVm2y6zDIQUL6527PosjRI5ghFTwiU0k KrB1NKuSR6qT/7q4q9bpAT52VCyLKpJQlBSKlqWs1A7SZBWOB7iTGYGuWxZb0QYbqoCk bSOA== X-Gm-Message-State: AOAM531MoZw3Y1+Fx8wQVbc9A14C0wzE9eBEaWuJxYC10Z0aLpvjOo8A LLdzQ5o0cB+3kWJ/umF925/XA4OgWAFCM0wL X-Received: by 2002:a4a:5896:: with SMTP id f144mr1136706oob.49.1601046369049; Fri, 25 Sep 2020 08:06:09 -0700 (PDT) Received: from yoga (99-135-181-32.lightspeed.austtx.sbcglobal.net. [99.135.181.32]) by smtp.gmail.com with ESMTPSA id o13sm698493otj.2.2020.09.25.08.06.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 08:06:08 -0700 (PDT) Date: Fri, 25 Sep 2020 10:06:05 -0500 From: Bjorn Andersson To: Liu Shixin Cc: Stanimir Varbanov , Andy Gross , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] media: venus: simplify the return expression of venus_sys_set_* function Message-ID: <20200925150605.GA2510@yoga> References: <20200921082440.2591617-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200921082440.2591617-1-liushixin2@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 21 Sep 03:24 CDT 2020, Liu Shixin wrote: > Simplify the return expression. > Reviewed-by: Bjorn Andersson > Signed-off-by: Liu Shixin > --- > drivers/media/platform/qcom/venus/hfi_venus.c | 28 +++---------------- > 1 file changed, 4 insertions(+), 24 deletions(-) > > diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c > index 4be4a75ddcb6..05ddb68023b8 100644 > --- a/drivers/media/platform/qcom/venus/hfi_venus.c > +++ b/drivers/media/platform/qcom/venus/hfi_venus.c > @@ -772,34 +772,24 @@ static int venus_sys_set_debug(struct venus_hfi_device *hdev, u32 debug) > { > struct hfi_sys_set_property_pkt *pkt; > u8 packet[IFACEQ_VAR_SMALL_PKT_SIZE]; > - int ret; > > pkt = (struct hfi_sys_set_property_pkt *)packet; > > pkt_sys_debug_config(pkt, HFI_DEBUG_MODE_QUEUE, debug); > > - ret = venus_iface_cmdq_write(hdev, pkt); > - if (ret) > - return ret; > - > - return 0; > + return venus_iface_cmdq_write(hdev, pkt); > } > > static int venus_sys_set_coverage(struct venus_hfi_device *hdev, u32 mode) > { > struct hfi_sys_set_property_pkt *pkt; > u8 packet[IFACEQ_VAR_SMALL_PKT_SIZE]; > - int ret; > > pkt = (struct hfi_sys_set_property_pkt *)packet; > > pkt_sys_coverage_config(pkt, mode); > > - ret = venus_iface_cmdq_write(hdev, pkt); > - if (ret) > - return ret; > - > - return 0; > + return venus_iface_cmdq_write(hdev, pkt); > } > > static int venus_sys_set_idle_message(struct venus_hfi_device *hdev, > @@ -807,7 +797,6 @@ static int venus_sys_set_idle_message(struct venus_hfi_device *hdev, > { > struct hfi_sys_set_property_pkt *pkt; > u8 packet[IFACEQ_VAR_SMALL_PKT_SIZE]; > - int ret; > > if (!enable) > return 0; > @@ -816,11 +805,7 @@ static int venus_sys_set_idle_message(struct venus_hfi_device *hdev, > > pkt_sys_idle_indicator(pkt, enable); > > - ret = venus_iface_cmdq_write(hdev, pkt); > - if (ret) > - return ret; > - > - return 0; > + return venus_iface_cmdq_write(hdev, pkt); > } > > static int venus_sys_set_power_control(struct venus_hfi_device *hdev, > @@ -828,17 +813,12 @@ static int venus_sys_set_power_control(struct venus_hfi_device *hdev, > { > struct hfi_sys_set_property_pkt *pkt; > u8 packet[IFACEQ_VAR_SMALL_PKT_SIZE]; > - int ret; > > pkt = (struct hfi_sys_set_property_pkt *)packet; > > pkt_sys_power_control(pkt, enable); > > - ret = venus_iface_cmdq_write(hdev, pkt); > - if (ret) > - return ret; > - > - return 0; > + return venus_iface_cmdq_write(hdev, pkt); > } > > static int venus_get_queue_size(struct venus_hfi_device *hdev, > -- > 2.25.1 >