linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylvain Pelissier <sylvain.pelissier@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: laurent.pinchart@skynet.be, kopiga.rasiah@epfl.ch,
	linux-usb@vger.kernel.org,
	Sylvain Pelissier <sylvain.pelissier@gmail.com>
Subject: [PATCH] usb: video: fix descriptor structures macros
Date: Thu, 28 Jan 2021 09:12:59 +0100	[thread overview]
Message-ID: <20210128081259.20940-1-sylvain.pelissier@gmail.com> (raw)

The macros defining structures for descriptors use token
pasting incorrectly. For example, the macro 
UVC_EXTENSION_UNIT_DESCRIPTOR(1, 2) defines a structure named 
uvc_extension_unit_descriptor_p_2 which should be
uvc_extension_unit_descriptor_1_2 instead.

Signed-off-by: Sylvain Pelissier <sylvain.pelissier@gmail.com>
---
 include/uapi/linux/usb/video.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/uapi/linux/usb/video.h b/include/uapi/linux/usb/video.h
index d854cb19c42c..1eb982df87a0 100644
--- a/include/uapi/linux/usb/video.h
+++ b/include/uapi/linux/usb/video.h
@@ -324,7 +324,7 @@ struct uvc_extension_unit_descriptor {
 #define UVC_DT_EXTENSION_UNIT_SIZE(p, n)		(24+(p)+(n))
 
 #define UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \
-	uvc_extension_unit_descriptor_##p_##n
+	uvc_extension_unit_descriptor_##p##_##n
 
 #define DECLARE_UVC_EXTENSION_UNIT_DESCRIPTOR(p, n)	\
 struct UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) {		\
@@ -371,7 +371,7 @@ struct uvc_input_header_descriptor {
 #define UVC_DT_INPUT_HEADER_SIZE(n, p)			(13+(n*p))
 
 #define UVC_INPUT_HEADER_DESCRIPTOR(n, p) \
-	uvc_input_header_descriptor_##n_##p
+	uvc_input_header_descriptor_##n##_##p
 
 #define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p)	\
 struct UVC_INPUT_HEADER_DESCRIPTOR(n, p) {		\
@@ -406,7 +406,7 @@ struct uvc_output_header_descriptor {
 #define UVC_DT_OUTPUT_HEADER_SIZE(n, p)			(9+(n*p))
 
 #define UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \
-	uvc_output_header_descriptor_##n_##p
+	uvc_output_header_descriptor_##n##_##p
 
 #define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p)	\
 struct UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) {		\
-- 
2.25.1


             reply	other threads:[~2021-01-28  8:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28  8:12 Sylvain Pelissier [this message]
2021-01-28  8:22 ` [PATCH] usb: video: fix descriptor structures macros Greg KH
2021-01-28 17:17   ` Sylvain Pelissier
2021-02-09 16:16     ` Sylvain Pelissier
2021-02-11 12:48       ` Greg KH
     [not found]         ` <CAOkUe-D2vCFiCp6qqvTTxgi5it+W2rEeXzf3-zu4rji7Cc106w@mail.gmail.com>
2021-02-11 13:04           ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210128081259.20940-1-sylvain.pelissier@gmail.com \
    --to=sylvain.pelissier@gmail.com \
    --cc=kopiga.rasiah@epfl.ch \
    --cc=laurent.pinchart@skynet.be \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).