From patchwork Thu May 18 13:36:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 91935 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1pzdoc-006C3W-UA; Thu, 18 May 2023 13:37:11 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231162AbjERNhI (ORCPT + 1 other); Thu, 18 May 2023 09:37:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230455AbjERNhH (ORCPT ); Thu, 18 May 2023 09:37:07 -0400 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACB071A6 for ; Thu, 18 May 2023 06:37:00 -0700 (PDT) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5613984739; Thu, 18 May 2023 15:36:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1684417018; bh=13hzaE4MXX2E3Cr4nd2iVxAH5/Qiu91ubUeg58YqZdo=; h=From:To:Cc:Subject:Date:From; b=oL9nqR11kwhUqdqjjVqbb29BPLIvqg7pJQ1zXE98wNBxYiKotwu7abIQjjbhqAXx6 kiNwNtP3V6uk7gkmB6FsI+vZCR1YsvVJ8zNPQh12ytRAsOhbJ4WmvlzCSK45Q61Cg0 y6RJZy0ugIvZ9Q4EZqUV4w7cIgLKTmAoHo5n62wahpiSEujTMX5ji88EZG73/yXTeL mOAgLkKIHR9lkRI2dTrQ8QDfVsLxt33Byd342DNDu5x8AE+n82GCVyBkHCCNuE+cTD Vc0yYLZvvbmcy0zsYTMUVD0ezNq9w50c0HzfEN+TrF4bAgK7+Ez3G2/mMrOHTxdjo1 wmNSPmYwjSWNA== From: Marek Vasut To: linux-media@vger.kernel.org Cc: Marek Vasut , "Dmitry V . Levin" , Mauro Carvalho Chehab , Sakari Ailus Subject: [PATCH] media: videodev2.h: Fix struct v4l2_input tuner index comment Date: Thu, 18 May 2023 15:36:49 +0200 Message-Id: <20230518133649.6913-1-marex@denx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no VIDIOC_ENUMINPUT documentation describes the tuner field of struct v4l2_input as index: Documentation/userspace-api/media/v4l/vidioc-enuminput.rst " * - __u32 - ``tuner`` - Capture devices can have zero or more tuners (RF demodulators). When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an RF connector and this field identifies the tuner. It corresponds to struct :c:type:`v4l2_tuner` field ``index``. For details on tuners see :ref:`tuner`. " Drivers I could find also use the 'tuner' field as an index, e.g.: drivers/media/pci/bt8xx/bttv-driver.c bttv_enum_input() drivers/media/usb/go7007/go7007-v4l2.c vidioc_enum_input() However, the UAPI comment claims this field is 'enum v4l2_tuner_type': include/uapi/linux/videodev2.h This field being 'enum v4l2_tuner_type' is unlikely as it seems to be never used that way in drivers, and documentation confirms it. It seem this comment got in accidentally in the commit which this patch fixes. Fix the UAPI comment to stop confusion. This was pointed out by Dmitry while reviewing VIDIOC_ENUMINPUT support for strace. Fixes: 6016af82eafc ("[media] v4l2: use __u32 rather than enums in ioctl() structs") Signed-off-by: Marek Vasut --- Cc: Dmitry V. Levin Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Cc: linux-media@vger.kernel.org --- include/uapi/linux/videodev2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index aee75eb9e6863..192afa88539a8 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1720,7 +1720,7 @@ struct v4l2_input { __u8 name[32]; /* Label */ __u32 type; /* Type of input */ __u32 audioset; /* Associated audios (bitfield) */ - __u32 tuner; /* enum v4l2_tuner_type */ + __u32 tuner; /* Tuner index */ v4l2_std_id std; __u32 status; __u32 capabilities;