Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3759158pxk; Tue, 22 Sep 2020 01:34:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpuQyg6SOsrkq+56KKP3gMVMJ1u3xzyLMPP0Fc/vViwU4duxhEdiO5SSea42mNTqmGax1K X-Received: by 2002:a17:907:aa9:: with SMTP id bz9mr3523755ejc.421.1600763656728; Tue, 22 Sep 2020 01:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600763656; cv=none; d=google.com; s=arc-20160816; b=MRMRTB0YdEsFNTVH7WBrSUao638iu5vq2yiFs8hEFLSSMoKBxo//IrWWxlwR57MHpr XGV9vhU+tR6g9mfU0HB1iGxpi40+CVsBG76aufZrSuRCHAkEvdaFPeVzahLDR94fjLsL QT7z/7T46zJrcU/huIJq+AiExnGQWn/K5XnMTbPBynROLuiQ7gUY7YNn2zLNHshXxeC0 5l/187BvWKnXt72VJ3KL05XqscxIDl1oS9+thHRvYZhy1jR2pbKWsw95D2FjNADlzy76 qmD+glmXbDgU6Gy9neSglsveQs0PzQg0MSUxLzUwR1CiIPrTTosLoG9BSbMCmMQ9GlQe RLPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=f62nUcAkkaRrPFpR20I05LLXPOMjYUjTZ+1XFllDRcI=; b=VwlBK9rHPSm70Jc23eyQUnU2SQUcr1BrO7ZcXZlmVmmM2FSROCwp9bOMP6rDFOD4HY Dz3Ue9dka+1qb878U84uXm3gKP+z6/g1AHqOQeuXdRStqFNb4hG097HMdfKQoPOw6N76 5Uu/qRJl8emMRhRamfcqzfYYErulK2qpm9fUIH+z4t56CSVu7CpmMCiFLOkbxXjU58oV RnnNdLVU8KghXNc3bVdU30OFulRN/YbZtPnYL+vPoYn6e91pOMh2AuxwMu3Tc84K25CY KZabkWIqN3Xcik5deq1JyxH6BOAMl0xYQNP9foFWFffDdZ1APrbEVLEg7ERS+SNgfU6m Yriw== 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 jr15si10628232ejb.183.2020.09.22.01.33.53; Tue, 22 Sep 2020 01:34:16 -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 S1730157AbgIVHqD (ORCPT + 99 others); Tue, 22 Sep 2020 03:46:03 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:34132 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729751AbgIVHqD (ORCPT ); Tue, 22 Sep 2020 03:46:03 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A0169698CB3418CF2C0F; Tue, 22 Sep 2020 15:46:00 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Tue, 22 Sep 2020 15:45:53 +0800 From: Zou Wei To: , , , , , , , CC: , , , , Zou Wei Subject: [PATCH -next] dma-buf: heaps: Remove unused variable ret Date: Tue, 22 Sep 2020 15:53:28 +0800 Message-ID: <1600761208-45229-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes below warnings reported by coccicheck ./drivers/dma-buf/heaps/heap-helpers.c:202:5-8: Unneeded variable: "ret". Return "0" on line 215 Signed-off-by: Zou Wei --- drivers/dma-buf/heaps/heap-helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma-buf/heaps/heap-helpers.c b/drivers/dma-buf/heaps/heap-helpers.c index d0696cf..7969510 100644 --- a/drivers/dma-buf/heaps/heap-helpers.c +++ b/drivers/dma-buf/heaps/heap-helpers.c @@ -199,7 +199,6 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, { struct heap_helper_buffer *buffer = dmabuf->priv; struct dma_heaps_attachment *a; - int ret = 0; mutex_lock(&buffer->lock); @@ -212,7 +211,7 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, } mutex_unlock(&buffer->lock); - return ret; + return 0; } static int dma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, -- 2.6.2