From patchwork Thu Jun 10 21:43:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 457873 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp13781jae; Thu, 10 Jun 2021 14:45:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7K3R7eAwBpiBWolhBQzqMTAVYcXDx4fauej00ukQu58AXtSPfCMcvY+gxnZPFmNaEbiI3 X-Received: by 2002:a17:906:48c8:: with SMTP id d8mr552865ejt.176.1623361541027; Thu, 10 Jun 2021 14:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623361541; cv=none; d=google.com; s=arc-20160816; b=EoJZZY4o+jV55TFulobsTS6mcetxcWy2yzEd338Tu96hPY/CgfT+AXOoA+1NQcebCA cII1ftY6KQNwXbgp9Lvt0HLUB67G/zPVNn133RaxN+NyQp4gI3FONpbtX8JPTgj22+p2 sgSsTTzuA9AGVcyLnrl4QDk+fJhT9ZTJgznszqfpKKflceJ7p24EGs/xnTzFdLnq9cTx eQTAQh3+A7Gkj/fRVH9KoC5MVTzyJEIg7fRAUoPd7yjztuKWAzA/WbOEnPSsW7eoLdGk w2SGsroK7eBzoxzPSEffHhpO0kPt2ecQSh8QZVu68CVydx5OBv4kcg5U/8fec6T8yHoQ yMKg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E+2AEXg8oBKn9KPXSHsI8w84wk2JROf0w6pqZc56F40=; b=PxQ3NZTao7iD1G/V6Sw7ARKiY1mmW/svSTCZrMJxvvQltBjkRQgsm3Km2pxSanxYA7 VAOzrhOb3fVjd6hmGDRTxb0VcEfrurecZWRMi7xRMyZywu05n05I5kWjfOurGik38r8w 9jmnQJ/JxsDWrKa5QYJqDbQ4Npckrtknkt6ojEwEaxxQgXSCcEN8FykjszhSsLjMD/zh clZd6fcgu4vfESx44ogx54ToIi7l+3l/YSsJqGtC/Czv5FkCe4OK6zlzBPwLlyXaw84q 3B5nRfSWRg7zxhUSJdjvNl3lelnhPt2DnniJlrdTd3MHZliLGwp51Nrd4MnCsHivKm0P MAUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o3zoNLqS; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si3052531edv.294.2021.06.10.14.45.40; Thu, 10 Jun 2021 14:45:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-media-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=@kernel.org header.s=k20201202 header.b=o3zoNLqS; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230483AbhFJVrA (ORCPT + 4 others); Thu, 10 Jun 2021 17:47:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:54184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbhFJVq5 (ORCPT ); Thu, 10 Jun 2021 17:46:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 131D96141D; Thu, 10 Jun 2021 21:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623361500; bh=ql1oV1rq//CRvUy0F7HDTW6q+eFb02wnUXlrJrXa2hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o3zoNLqSXfQITog8yYtrX+ZX2vylMv1/BTTCG7KcA0/JgoQgIbZG5XIKnLPzzWbQm Tbo/h0e+5wB1KzXJUU3BrKDim5wLvvfNoEGb8O41Lpc0l/y50E3/BgXQImwLd+yByT PPCHOr+TSzEDJxf3tymMNcBXoDIIOI63e+BdbxyiNE9SqbKlzJ6LdLJQVM1Du7mvDY CxyK/DYN1BQFjBVOfS+8IRnSQzSMDhGYEWYo0A5rGadJoKyIYaPMr15hruK+wzW3y/ KT97fYsXzFN0CmJMl9h2XdAMw1/5XkZhXGWGWtx3Ac2OJOiEnKYF5YioL/lHO9QAI9 6WRt+eiriNmJw== From: Arnd Bergmann To: Hans Verkuil , Mauro Carvalho Chehab Cc: Arnd Bergmann , "Lad, Prabhakar" , Eduardo Valentin , Sakari Ailus , Greg Kroah-Hartman , Vaibhav Gupta , Liu Shixin , Laurent Pinchart , Jacopo Mondi , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v2 3/7] media: subdev: remove VIDIOC_DQEVENT_TIME32 handling Date: Thu, 10 Jun 2021 23:43:01 +0200 Message-Id: <20210610214305.4170835-4-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210610214305.4170835-1-arnd@kernel.org> References: <20210610214305.4170835-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Arnd Bergmann Converting the VIDIOC_DQEVENT_TIME32/VIDIOC_DQEVENT32/ VIDIOC_DQEVENT32_TIME32 arguments to the canonical form is done in common code, but for some reason I ended up adding another conversion helper to subdev_do_ioctl() as well. I must have concluded that this does not go through the common conversion, but it has done that since the ioctl handler was first added. I assume this one is harmless as there should be no way to arrive here from user space, but since it is dead code, it should just get removed. Fixes: 1a6c0b36dd19 ("media: v4l2-core: fix VIDIOC_DQEVENT for time64 ABI") Signed-off-by: Arnd Bergmann --- drivers/media/v4l2-core/v4l2-subdev.c | 24 ------------------------ 1 file changed, 24 deletions(-) -- 2.29.2 diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 956dafab43d4..bf3aa9252458 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -428,30 +428,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg) return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - case VIDIOC_DQEVENT_TIME32: { - struct v4l2_event_time32 *ev32 = arg; - struct v4l2_event ev = { }; - - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - rval = v4l2_event_dequeue(vfh, &ev, file->f_flags & O_NONBLOCK); - - *ev32 = (struct v4l2_event_time32) { - .type = ev.type, - .pending = ev.pending, - .sequence = ev.sequence, - .timestamp.tv_sec = ev.timestamp.tv_sec, - .timestamp.tv_nsec = ev.timestamp.tv_nsec, - .id = ev.id, - }; - - memcpy(&ev32->u, &ev.u, sizeof(ev.u)); - memcpy(&ev32->reserved, &ev.reserved, sizeof(ev.reserved)); - - return rval; - } - case VIDIOC_SUBSCRIBE_EVENT: return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg);