From patchwork Fri Sep 22 21:47:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9967163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 334BB6020C for ; Fri, 22 Sep 2017 21:48:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A6AA2978E for ; Fri, 22 Sep 2017 21:48:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AC64297E1; Fri, 22 Sep 2017 21:48:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 883EF2978E for ; Fri, 22 Sep 2017 21:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752188AbdIVVrN (ORCPT ); Fri, 22 Sep 2017 17:47:13 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:46529 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752134AbdIVVrM (ORCPT ); Fri, 22 Sep 2017 17:47:12 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 59FFEA0D5A; Fri, 22 Sep 2017 21:47:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Jz5W3dYypNM; Fri, 22 Sep 2017 21:47:39 +0000 (UTC) Received: from smtp.s-opensource.com (unknown [191.33.159.222]) by osg.samsung.com (Postfix) with ESMTPSA id 85571A05F0; Fri, 22 Sep 2017 21:47:39 +0000 (UTC) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.89) (envelope-from ) id 1dvVmt-0000zD-H3; Fri, 22 Sep 2017 18:47:07 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab Subject: [PATCH 8/8] media: v4l2-ioctl.h: convert debug macros into enum and document Date: Fri, 22 Sep 2017 18:47:06 -0300 Message-Id: <28dfd60cbe16605062003e895532bfeddfcc6ebc.1506116720.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, there's no way to document #define foo with kernel-doc. So, convert it to an enum, and document. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-ioctl.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index bd5312118013..136e2cffcf9e 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -588,20 +588,25 @@ struct v4l2_ioctl_ops { }; -/* v4l debugging and diagnostics */ - -/* Device debug flags to be used with the video device debug attribute */ - -/* Just log the ioctl name + error code */ -#define V4L2_DEV_DEBUG_IOCTL 0x01 -/* Log the ioctl name arguments + error code */ -#define V4L2_DEV_DEBUG_IOCTL_ARG 0x02 -/* Log the file operations open, release, mmap and get_unmapped_area */ -#define V4L2_DEV_DEBUG_FOP 0x04 -/* Log the read and write file operations and the VIDIOC_(D)QBUF ioctls */ -#define V4L2_DEV_DEBUG_STREAMING 0x08 -/* Log poll() */ -#define V4L2_DEV_DEBUG_POLL 0x10 +/** + * enum v4l2_debug_flags - Device debug flags to be used with the video + * device debug attribute + * + * @V4L2_DEV_DEBUG_IOCTL: Just log the ioctl name + error code. + * @V4L2_DEV_DEBUG_IOCTL_ARG: Log the ioctl name arguments + error code. + * @V4L2_DEV_DEBUG_FOP: Log the file operations and open, release, + * mmap and get_unmapped_area syscalls. + * @V4L2_DEV_DEBUG_STREAMING: Log the read and write syscalls and + * :c:ref:`VIDIOC_[Q|DQ]BUFF ` ioctls. + * @V4L2_DEV_DEBUG_POLL: Log poll syscalls. + */ +enum v4l2_debug_flags { + V4L2_DEV_DEBUG_IOCTL = 0x01, + V4L2_DEV_DEBUG_IOCTL_ARG = 0x02, + V4L2_DEV_DEBUG_FOP = 0x04, + V4L2_DEV_DEBUG_STREAMING = 0x08, + V4L2_DEV_DEBUG_POLL = 0x10, +}; /* Video standard functions */