Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2954467pxk; Mon, 21 Sep 2020 01:07:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbkyW8/IUizsD2XmEzDRniqRvqAwIBjkpwlp16tA1mn/+VTEfeUZ7KDSzKNZ61XIpKfKTo X-Received: by 2002:a17:906:2e83:: with SMTP id o3mr50285000eji.47.1600675676503; Mon, 21 Sep 2020 01:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675676; cv=none; d=google.com; s=arc-20160816; b=Hb/nSa8A3/hpRF/ZXoZB+zy1HXi1YUuG5jbmuziLvyq7HDAQut+QYP9UfK+ls7RvPh oeazdF2z4DOz1o3QTm44bzFAg6PQ5ft9QtPeSG+ES9aYJkKXolEL3IzkA+ij8hkFuZXf qWpGh0cderKzOnuk17G25lbHEc229l9i09NcuALRTm0d/lzF8XVUL6tvCDyhfGL+DBcu ppH/ZXCZ63FSy+LdJFH5iFDtcHv0HpTTrGR8e3Yuz5b1I3diu71p2xZ2CIlu/Ix8IaKg vLHHTl24cM5Tloia3ANAaDzoUIiiQoMJTBEhkeuc5OeCmshlshBOAUFRHtPkJ+elKLcy 1LnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Fd5DBiUpLLurLwL2Fp5U5fws94KtBA2ZKaa79IyjT7M=; b=rNWpXKSoYz3myUCZKE0eZShT/vDGQil2dJKZGRnF/uonh4UOm4CTLECSQICjh6eUrm QStnMmePwdNAgAtqOnDq74F/SEGjtLOJWdj/j2H/jyztQEhER/cafH0JK8Usk/wNDej3 kjPsI6AYdomYCZUi5YtAadIleQ8mycCZ+Fr8fTUs/Y4j30JnjH6/shKhvnpV5m70U5sH X89wLRXnYXSE7AuUZmSoIFSgToCnL/HZ5ZsmENJUaXEwZM5o2i6RN9MCvBx+jDO0Ywv0 B86fQdk7zDMxzyMLepns9AqLoRfTAQrir6HnV68X+O5M7YxihmCEpD/IzgzgbCd4/6dz r9Bw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si5008741edt.429.2020.09.21.01.07.33; Mon, 21 Sep 2020 01:07:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727034AbgIUIDW (ORCPT + 99 others); Mon, 21 Sep 2020 04:03:22 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48064 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726893AbgIUIC3 (ORCPT ); Mon, 21 Sep 2020 04:02:29 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C81C425D22564A5CA31A; Mon, 21 Sep 2020 16:02:26 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:16 +0800 From: Liu Shixin To: Stanimir Varbanov , Andy Gross , Bjorn Andersson , "Mauro Carvalho Chehab" CC: , , , Liu Shixin Subject: [PATCH -next] media: venus: simplify the return expression of venus_sys_set_* function Date: Mon, 21 Sep 2020 16:24:40 +0800 Message-ID: <20200921082440.2591617-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. 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