Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3513367ybz; Mon, 4 May 2020 04:35:18 -0700 (PDT) X-Google-Smtp-Source: APiQypI2bjtLwNBVyWjCcjTGEW0YaEFGPOOeAgTDbSpErpwXxW1EAZwqVaqP/wQysSAdrllwFoIR X-Received: by 2002:a05:6402:17f1:: with SMTP id t17mr14307958edy.239.1588592118706; Mon, 04 May 2020 04:35:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588592118; cv=none; d=google.com; s=arc-20160816; b=SzFNWJ0VlTQ9SAmExIaXXfioYdgTPU1IpfoONsEvNPoLscKs2k88P3X38aPrYsD1G2 xG0wqBtDi61D2akU2Z0kb4f8CKKRDU+tbaJaHJpIpg0Llm9sRJqXtSvazr4D27Ge1BWU Gh6dp31PWsTopYHkOUhHIKftG2fK3tezTmYlpzPP5P5sxdTzzR13LqaXDe6vZmFC3xIL Vq3V978dS8qymldFH8lopFAI28b9dcanqEPmmRF+JOspDr2GYxfCS3LPaQjLFCBfkNIp sV2FS/cfA5o1wakKcW2sUIxFyQPWU3TTipG7IuITgbTVwwD+BXRU6Hvnb4BlYxp8ZQKf fQUw== 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=3S7cjwBPJ6Vo2mbJwBOBdkoFUIZuj34WI9I2ehRxX4k=; b=RagT6AJdDaP/e1pnjmHsHXjvFhqI4F7ZKhN+hcO3GYoQILuGyZpbLIrVbSGUrw/q1E jSCnv499ZF28BjZx9riYMYcHsSq6Ctb+c/1NJ0DL+kzhCbAD2t4sZ5alhsY4taXZ4o4G fwoROckB8dgiE4ucpH7qeQEKQtlosv0nEIPAbqghVx8m11xyp0GJ/nkIsmIlWUeyJJbI N7Wb2rM1BtmlMxYZIdwO/uJyzVXCzQ92ZSRiiCnx9XEcfu/bbatXAF14Xv3u8GlA4dJr 1ANGcF3rUOJTZs9eyVeqW/5mA1TMozNnLGSzvfmyj7hQBruEcsx3ovMfi8UeMz6xN9DE dkHQ== 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 e6si7963916edc.18.2020.05.04.04.34.56; Mon, 04 May 2020 04:35:18 -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 S1728611AbgEDLdG (ORCPT + 99 others); Mon, 4 May 2020 07:33:06 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:55120 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726445AbgEDLdG (ORCPT ); Mon, 4 May 2020 07:33:06 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A203D400EF87F3558DB5; Mon, 4 May 2020 19:33:04 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Mon, 4 May 2020 19:32:59 +0800 From: Jason Yan To: , , , , , , , CC: Jason Yan Subject: [PATCH] drm/vc4: make vc4_queue_seqno_cb() return void Date: Mon, 4 May 2020 19:32:21 +0800 Message-ID: <20200504113221.40488-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No one uses the return value of this function, so make it return void. This fixes the following coccicheck warning: drivers/gpu/drm/vc4/vc4_gem.c:1029:5-8: Unneeded variable: "ret". Return "0" on line 1044 Signed-off-by: Jason Yan --- drivers/gpu/drm/vc4/vc4_drv.h | 6 +++--- drivers/gpu/drm/vc4/vc4_gem.c | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index 3b1f02efefbe..990b15b82e24 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -810,9 +810,9 @@ void vc4_move_job_to_render(struct drm_device *dev, struct vc4_exec_info *exec); int vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, uint64_t timeout_ns, bool interruptible); void vc4_job_handle_completed(struct vc4_dev *vc4); -int vc4_queue_seqno_cb(struct drm_device *dev, - struct vc4_seqno_cb *cb, uint64_t seqno, - void (*func)(struct vc4_seqno_cb *cb)); +void vc4_queue_seqno_cb(struct drm_device *dev, + struct vc4_seqno_cb *cb, uint64_t seqno, + void (*func)(struct vc4_seqno_cb *cb)); int vc4_gem_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index e1cfc3ccd05a..fbcb4fa4e80a 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -1021,12 +1021,11 @@ static void vc4_seqno_cb_work(struct work_struct *work) cb->func(cb); } -int vc4_queue_seqno_cb(struct drm_device *dev, - struct vc4_seqno_cb *cb, uint64_t seqno, - void (*func)(struct vc4_seqno_cb *cb)) +void vc4_queue_seqno_cb(struct drm_device *dev, + struct vc4_seqno_cb *cb, uint64_t seqno, + void (*func)(struct vc4_seqno_cb *cb)) { struct vc4_dev *vc4 = to_vc4_dev(dev); - int ret = 0; unsigned long irqflags; cb->func = func; @@ -1040,8 +1039,6 @@ int vc4_queue_seqno_cb(struct drm_device *dev, schedule_work(&cb->work); } spin_unlock_irqrestore(&vc4->job_lock, irqflags); - - return ret; } /* Scheduled when any job has been completed, this walks the list of -- 2.21.1