From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 092B2C61DA4 for ; Thu, 2 Feb 2023 11:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230213AbjBBLs3 (ORCPT ); Thu, 2 Feb 2023 06:48:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbjBBLs1 (ORCPT ); Thu, 2 Feb 2023 06:48:27 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 073DD7307D for ; Thu, 2 Feb 2023 03:48:26 -0800 (PST) Received: from [192.168.0.43] (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ED6FF505; Thu, 2 Feb 2023 12:48:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1675338504; bh=T0PZ0nZgQyiAd3VeBm00YudHzYjoZzfsp0nZfV4h36g=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=oJWokWx5XlKdbGmuWru/ootheCdkKGcDAWweIeu1tz7u0lWid46wR+bsTM9Rqi4KV ygogBdy1Sf/g1Ry31bDFy16P+MoBh2QHamFoX+suLsZLGbKuzBxQOMl8aZDcbjoLK2 YbF9OMeYodKJ9CoxjAueZq1lu1jzWXGwdm4hxxvg= Message-ID: <403623e4-58df-0514-708b-00e5b7421376@ideasonboard.com> Date: Thu, 2 Feb 2023 11:48:20 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] usb: gadget: uvc: Make bmControls attr read/write Content-Language: en-US To: Greg KH Cc: linux-usb@vger.kernel.org, laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com, mgr@pengutronix.de, torleiv@huddly.com References: <20230131095738.429197-1-dan.scally@ideasonboard.com> <779061ef-6a1f-f7b6-f378-8d77d1567aa3@ideasonboard.com> From: Dan Scally In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 >>>> --- >>>> >>>> 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