Linux USB
 help / color / mirror / Atom feed
From: Dan Scally <dan.scally@ideasonboard.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	kieran.bingham@ideasonboard.com, mgr@pengutronix.de,
	torleiv@huddly.com
Subject: Re: [PATCH] usb: gadget: uvc: Make bmControls attr read/write
Date: Thu, 2 Feb 2023 11:48:20 +0000	[thread overview]
Message-ID: <403623e4-58df-0514-708b-00e5b7421376@ideasonboard.com> (raw)
In-Reply-To: <Y9uUiwbH53YP/ogn@kroah.com>

Hi Greg

On 02/02/2023 10:46, Greg KH wrote:
> On Thu, Feb 02, 2023 at 10:25:20AM +0000, Dan Scally wrote:
>> Hi Greg
>>
>> On 02/02/2023 10:18, Greg KH wrote:
>>> On Tue, Jan 31, 2023 at 09:57:38AM +0000, Daniel Scally wrote:
>>>> For the Processing Unit and Camera Terminal descriptors defined in
>>>> the UVC Gadget we currently hard-code values into their bmControls
>>>> fields, which enumerates the controls the gadget is able to
>>>> support. This isn't appropriate since only the userspace companion
>>>> program to the kernel driver will know which controls are supported.
>>>> Make the configfs attributes that point to those fields read/write
>>>> so userspace can set them to appropriate values.
>>>>
>>>> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
>>>> ---
>>>>
>>>> This patch depends on "usb: gadget: uvc: Generalise helper functions for reuse"
>>>> from my recent series:
>>>>
>>>> https://lore.kernel.org/linux-usb/20230130093443.25644-3-dan.scally@ideasonboard.com/T/#u
>>> Odd, I think I have that in my tree, yet this fails to build with:
>>>
>>>     CALL    scripts/checksyscalls.sh
>>>     CC [M]  drivers/usb/gadget/function/uvc_configfs.o
>>> drivers/usb/gadget/function/uvc_configfs.c: In function ‘uvcg_default_processing_bm_controls_store’:
>>> drivers/usb/gadget/function/uvc_configfs.c:295:15: error: implicit declaration of function ‘__uvcg_iter_item_entries’ [-Werror=implicit-function-declaration]
>>>     295 |         ret = __uvcg_iter_item_entries(page, len, __uvcg_count_item_entries, &n,
>>>         |               ^~~~~~~~~~~~~~~~~~~~~~~~
>>> drivers/usb/gadget/function/uvc_configfs.c:295:51: error: ‘__uvcg_count_item_entries’ undeclared (first use in this function)
>>>     295 |         ret = __uvcg_iter_item_entries(page, len, __uvcg_count_item_entries, &n,
>>>         |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
>>> drivers/usb/gadget/function/uvc_configfs.c:295:51: note: each undeclared identifier is reported only once for each function it appears in
>>> drivers/usb/gadget/function/uvc_configfs.c:311:51: error: ‘__uvcg_fill_item_entries’ undeclared (first use in this function)
>>>     311 |         ret = __uvcg_iter_item_entries(page, len, __uvcg_fill_item_entries, &tmp,
>>>         |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~
>>> drivers/usb/gadget/function/uvc_configfs.c: In function ‘uvcg_default_camera_bm_controls_store’:
>>> drivers/usb/gadget/function/uvc_configfs.c:465:51: error: ‘__uvcg_count_item_entries’ undeclared (first use in this function)
>>>     465 |         ret = __uvcg_iter_item_entries(page, len, __uvcg_count_item_entries, &n,
>>>         |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
>>> drivers/usb/gadget/function/uvc_configfs.c:481:51: error: ‘__uvcg_fill_item_entries’ undeclared (first use in this function)
>>>     481 |         ret = __uvcg_iter_item_entries(page, len, __uvcg_fill_item_entries, &tmp,
>>>         |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~
>>> cc1: all warnings being treated as errors
>>>
>>> What did I do wrong?
>>
>> That's the error set I would expect if you didn't have that series earlier
>> in the tree as __uvcg_iter_item_entries() is declared in one of those
>> patches...if you have a link to the tree I can look more closely for you?
> It's my usb-testing branch right now, rebase on that and see what
> happens.


I get the same build errors, but I also don't see the earlier patch in 
that tree, or indeed any of that series. I probably need to rebase that 
series to usb-testing anyway as it was also built on usb-linus. I'll do 
that series now and resend this patch immediately after too.

>
> thanks,
>
> greg k-h

      reply	other threads:[~2023-02-02 11:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  9:57 [PATCH] usb: gadget: uvc: Make bmControls attr read/write Daniel Scally
2023-02-02 10:18 ` Greg KH
2023-02-02 10:25   ` Dan Scally
2023-02-02 10:46     ` Greg KH
2023-02-02 11:48       ` Dan Scally [this message]

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=403623e4-58df-0514-708b-00e5b7421376@ideasonboard.com \
    --to=dan.scally@ideasonboard.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mgr@pengutronix.de \
    --cc=torleiv@huddly.com \
    /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