From patchwork Mon Jun 14 10:34:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 459802 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3161512jae; Mon, 14 Jun 2021 03:44:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxG0eAkde++ZX1pphY9T9vFhbrTNz+5VQUj/s6aVJHDHPX8hiIvpArvRBkZPes16FqcIhOv X-Received: by 2002:a05:6402:1713:: with SMTP id y19mr16160317edu.346.1623667495292; Mon, 14 Jun 2021 03:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623667495; cv=none; d=google.com; s=arc-20160816; b=yZzd+rF0KACHKKjGcoqBe8vZgOUuM+u567T4E+hD9oRqcvMPO0KSyJFzpmcEsIXupT tRSrG+s+hqRqowWlmVhrXO5PRtIpcQSSHDRtVH7yWuxvrGt1QcYPNfvqsMCOKfXwvX3u TbzSm1RG0S0U8gt/iUifM4v0T2EZmO6il/kN75IfPj9b7gWSON02Hi9Ww2qtU9qOURL+ IwE4XVU2v3a09SzvhGIlqv83LPSQg5ihhtW5jxwxpdpMSUrOmKXJco3yrtpJ/lvmvst3 iIn16nNErqfaHliggq8wzEYrzOlbvQ9Z2GH4auk1HnrTiPBclD2vCubuDMmSIYac0ldM JXgg== 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=fZsubD6zNSSDFRqDZ3zEnW90ASgsr/odYai3BP0EnQNaXyJeWJymkpZnilUI/l/fT3 92tCPmQC3P2N+0gD91Ma2nxFaLPC+ZUilv6eJuocPMYYWtFPygEMS2Ie25gbEavPUEBt ApF/CY5GYl2Kbb8bvRCeNjHQNzfgtL28vSNILGxLZqdK3/DZ2/7Hx3eeWgZznKS4pomJ Nsn8VIfumAmWHkQND4BCDzylFj8gwwNfm8EacDfR+imQxnjyMmQQqTb0LW24LlylTlmV +m1Uyp5+/i2eC2G5667XoUezzjbeVSVlR1T1Rhj1goRJS8Jz9B3eXIoHvvgaZq4PqjcM cHmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KUruyy5g; 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 w19si10609433edc.458.2021.06.14.03.44.55; Mon, 14 Jun 2021 03:44:55 -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=KUruyy5g; 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 S233490AbhFNKq3 (ORCPT + 4 others); Mon, 14 Jun 2021 06:46:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:47606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234187AbhFNKo1 (ORCPT ); Mon, 14 Jun 2021 06:44:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6457A61404; Mon, 14 Jun 2021 10:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623666980; bh=ql1oV1rq//CRvUy0F7HDTW6q+eFb02wnUXlrJrXa2hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KUruyy5gO6Rmb9YkIRNn/KwupM5Pb0ct4xe1wCoCaBnmYprT1PW9wqxiuu2Xunb7R qrEUnCiomDmSUCPgnyvv8y6bYDk0bcci3f2U0amKU/oKmuvJl9Z6RvPntny/JT3feD 2bYU8/RhCaW+A0ehXoiP+mktv7qyupCkZKNxkWLqj5vDAPICGNd1D5VMeNqIQzrMEd 0o1Ug/EUQeklXR3bH5p6MHpZlADgSxXUQ69J3l0Y/q2XlkKzT6N5skalKKc/0dEa1k 8uETFO7ZrPtTMoEUittl+hs7k5ywoQni8JuDoZULVXmVhfxA/Gxu1Kw+FXVhtB4eff +b0GHFN11F7lg== 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 v3 4/8] media: subdev: remove VIDIOC_DQEVENT_TIME32 handling Date: Mon, 14 Jun 2021 12:34:05 +0200 Message-Id: <20210614103409.3154127-5-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210614103409.3154127-1-arnd@kernel.org> References: <20210614103409.3154127-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 Reviewed-by: Laurent Pinchart 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);