Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6799812rwb; Mon, 12 Dec 2022 06:36:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Rd1gekzVFLe3NyDUiJKx7kHp0u7tIh2eo+yz+neS8q4hLF2YiTa5DoTwLmqa23IgnN6pC X-Received: by 2002:a17:906:c287:b0:7c0:daa3:b4ab with SMTP id r7-20020a170906c28700b007c0daa3b4abmr14011117ejz.40.1670855803464; Mon, 12 Dec 2022 06:36:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670855803; cv=none; d=google.com; s=arc-20160816; b=d9LCAAZUbsFb82LDCFZc69Lpw1zm0kTCuZJfis8eshAdlyJex4yXW48aoWpi9vFbDJ 921wJK5QwjapaFu8nmcjYJwx0ZSHEeyebQ9HqT/8sske4j6uAVbDvdJRXlCpM8QWZ+Cg 2xW+L9sH+El8phn9yS7jpLJFtjSZ9DCTZajn8bXVaNqm9+93aMz81mckTETIm1o+TbPE Rxir4rhdGowMo3h0FrfKFr1Qy0hyyvH9CK1VZUeL68VAei9qk/EOAhLUADEftpVFX99x vxX5+L7oIAjeEUgtXo8AdcyGlmN3BuQLdUQWkwVKcHyJ/8fDgmZSJnWMoIeAY7d5eA0w mStg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8u7DrSxg3zohXea3eBOMFKpTCXLGL7dZ9xKEUeGepGg=; b=OPqL7WGLK7flbKbVE25dRiygdHIrhalZLobd7rYmm5eJ/cU0StuqW2K4JanI56jbHo bJImWKBOw1dVx/1HcEnuR30nryBtoBEmwmZ+YF7+7oQgwbuFg+siAXPnuj2RQwfVauwi 0qdbk6gXwbFENsKVtv3azlOD3EQYkuWgAb6LD071K2LzONgXlzKign8AAlvTC9EfEjus DgP7skG7PVlhKYidscg8N4Visd4RrUA55PzXzTNOHJ16QWI/AgwDbdpq4osB1gvOMyaC qnQyaXVKjg1bdiVROyVDRk1CWvgv5MD5dVBKqbPGZRizzY7uJityuuzruXotCIeojL9o xwFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EYkDXB0C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xc10-20020a170907074a00b007c0eb33879asi5144904ejb.667.2022.12.12.06.36.24; Mon, 12 Dec 2022 06:36:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EYkDXB0C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232125AbiLLOOd (ORCPT + 75 others); Mon, 12 Dec 2022 09:14:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231642AbiLLOOb (ORCPT ); Mon, 12 Dec 2022 09:14:31 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 246DFDF30; Mon, 12 Dec 2022 06:14:29 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A1A73B80C8C; Mon, 12 Dec 2022 14:14:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57BDBC433F0; Mon, 12 Dec 2022 14:14:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670854467; bh=4rnwveyKqiOjTTvFsSiwrZeTN9NHsVO4DY/MAvqUSlw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EYkDXB0CESKifaoyTSdLIB/dcBDZGUNNgarhiaYGcNo1BQ0ApcorHZWMaaNffc1Y7 uhrlo+q6sey1HpSyCaXcVA4tM+7rVhkV04PxaeTQSj5CTy8djlOuO7wU7HyJ1CUMtB DR+B7c88srX/EPWMGIKRGPVQBcFvHPLEw5Xtqb3p2mJxwXGUR20B+sYA4lVAiTKCU/ /cfWw24DSwboikVC4AVtX7cf1rRiCkQdrl6bHnkZWfSp+wxlKyWO1QmMaeR2k8sJph 4edaxX9SiXiFM/jTgNklQxhRQ/B4X4IXegwd4k2EPS7kvyDHlHU0VEq0ncKHHEI8zQ JrjVj8YH3ld5g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p4jZx-0007Bz-Nk; Mon, 12 Dec 2022 15:14:50 +0100 Date: Mon, 12 Dec 2022 15:14:49 +0100 From: Johan Hovold To: Oliver Neukum Cc: Greg Kroah-Hartman , Vincent Mailhol , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: drop misleading usb_set_intfdata() kernel doc Message-ID: References: <20221211120626.12210-1-johan@kernel.org> <4cf7bce3-dfbb-b064-9d91-27616bf11d6a@suse.com> <2a2935e6-ae3c-85d9-a2e9-f42fb4ca7d59@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org On Mon, Dec 12, 2022 at 03:04:50PM +0100, Oliver Neukum wrote: > > > On 12.12.22 14:40, Johan Hovold wrote: > > On Mon, Dec 12, 2022 at 02:27:46PM +0100, Oliver Neukum wrote: > >> On 12.12.22 14:14, Johan Hovold wrote: > >>> On Mon, Dec 12, 2022 at 12:13:54PM +0100, Oliver Neukum wrote: > > > >>> And in this case there was also no kernel doc for usb_get_intfdata() > >>> which is equally self documenting. Why add redundant docs for only one > >>> of these functions? > >> > >> Because knowing that one of them exists makes the other much more > >> obvious. > > > > I doubt anyone finds out about this function by reading generated kernel > > documentation. You look at a driver, grep the function and look at the > > single-line implementation. > > Look, we cannot solve the issue whether kerneldoc is a good idea > in general here. If you want to open that can of worms on lkml, > by all means. go for it. > But failing that, silently eliminating it is just not nice. It was just added. It's mostly misleading and incorrect. Hence revert, rather than put the burden of adding proper documentation on the person calling out the misunderstanding (which has already led to a series of bogus patches). > > But it was never perfectly good. It claims that a driver "should" use it, > > when it may not need to (think simple driver using devres) and talks > > If you are presented with an interface something needs to be done > specific to that interface. I'm not sure what you're saying here. > > about driver core resetting the pointer which is irrelevant. > > But correct and topical. I am not arguing what people should or should > mot know. The comment is also misleading as it signals that this is something you need to care about. > If you just remove the last sentence, all will be well. And if you > insist replace "should" with "can". Since you insist, I'll just rewrite the whole thing. Johan