Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2168227rdb; Thu, 21 Sep 2023 10:17:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGITYIcXApuMLHR1CLS53n0MDdQfh0CzOd9E+bV5BOQ441JMrVWI1APVHVy6gAE+NWtbeO0 X-Received: by 2002:a17:903:2349:b0:1c0:d17a:bfef with SMTP id c9-20020a170903234900b001c0d17abfefmr6953930plh.30.1695316661823; Thu, 21 Sep 2023 10:17:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695316661; cv=none; d=google.com; s=arc-20160816; b=LAtW+sjugCkby1U3v+JtixEtu6yRB7fL9cLP3ZL80e3S9BJfYQd3hiVX9oOy2IUCeS Bgt4c6ThN3M7Lp5LGc6gxLUEg/Ol49j4xuu575l17x7JijvCr3U6NalMnN8ifJ93wtxZ rZUE2tDUslqJZTrlYP3WxQKlKOnXeF5zb77cLmqRAt2PKhJX3Xd5bStNggCfIkhljEp/ MJSsqBuuN7cwPX/fzQZZFGUtFMobrqxmxkVxtjSb1CLx55Ohni/uBJ/P+BpXBIMplOYD x/odpz/i90MLept+8xKI48F2htCMOjdHt1I7zF6NW1lApgepiaEW9L+pyr3ADt/qOO1H g7pw== 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=TDkHjuBAUHGaA9x0jaeflmG3lngMSTMxWnqRP7KO9WE=; fh=BnnPYOxDdwek9MqXKCm0fmIHOGiEX4Wbsz5Oj3RAWH8=; b=TRPvCQ/QSZkJ8KuCMhN58DCUbpi0p3gWY5Ie67ZjIS607TJXmzkjlO5yxToHeXpGSj nR3KdMbATI1CzNIq5zsaoOa7rb6clWLVJnDvKZ733h9e+a2QRiMqL19SeiPf7LdSKz+r Pl39rucOf6pbfXmhxl9S9qrsS3NbfcbwaeNvs6dBmXiwiymw9xCTeKij7TO3hgq/zrF7 ZCFU5ecVkLeQZobr7WHVsV+Q1HirNa/b3oGs3HELUQVqc788Xr6a/BBkqZUPPk9ZW+oP puXdSpi4HAKKWMlq5MrUbUjBEyyHoog7CBVL9wamCwE/74wAoIxf8kZvjP5XEgWVytFO pRbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hDx0Pr44; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i10-20020a17090332ca00b001c5bcc9d918si1881743plr.352.2023.09.21.10.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 10:17:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hDx0Pr44; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 08DAA827B485; Thu, 21 Sep 2023 10:07:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230190AbjIURHd (ORCPT + 99 others); Thu, 21 Sep 2023 13:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbjIURHR (ORCPT ); Thu, 21 Sep 2023 13:07:17 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD1E9E5E for ; Thu, 21 Sep 2023 10:05:02 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CB7EC4E686; Thu, 21 Sep 2023 13:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695302561; bh=TDkHjuBAUHGaA9x0jaeflmG3lngMSTMxWnqRP7KO9WE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hDx0Pr44vyHbTUmSchVYbhM2n5mFxeA8rzoLd2GYz+TceZEKtqSphUUIUdmm2K7bh eqgACJcTy+PJXs5P0sRjVMpALU+yhfiHVvhi9547tC1axdSmUJD4jo+LDBmMUVaZLC XZpjfjilEBMuX++ajKrHU2vlCCBe3rVOSIRGdHJlXgsJZ8PK6b6XcS1tTtgXenfTfx SJVCKdtbtragyRUoxLKX3eNnGegzX37KexTYgzNcCmD94RI8mY0lZG91+jarSYVRC8 xdprc6PRR2mPuWooCPjlpw0ULY1UnS7ie2izMnQryTRWzpc0tWpomkOPylGnPD2i11 OKjWwKT8CPXjg== Date: Thu, 21 Sep 2023 15:22:39 +0200 From: Maxime Ripard To: Thomas Zimmermann Cc: Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/ssd130x: Drop _helper prefix from struct drm_*_helper_funcs callbacks Message-ID: References: <20230914195138.1518065-1-javierm@redhat.com> <87wmwo3q50.fsf@minerva.mail-host-address-is-not-set> <552hpgr7qzbjxuyei3n5m7rsn7ekwbdgzv25oe5vy6qb35gf23@q4etussk5jwl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4sox4ca5522j7baz" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 21 Sep 2023 10:07:37 -0700 (PDT) --4sox4ca5522j7baz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Sep 21, 2023 at 10:52:14AM +0200, Thomas Zimmermann wrote: > Am 21.09.23 um 09:44 schrieb Maxime Ripard: > > On Mon, Sep 18, 2023 at 09:19:07AM +0200, Javier Martinez Canillas wrot= e: > > > Thomas Zimmermann writes: > > >=20 > > > > Hi > > > >=20 > > > > Am 14.09.23 um 21:51 schrieb Javier Martinez Canillas: > > > > > The driver uses a naming convention where functions for struct dr= m_*_funcs > > > > > callbacks are named ssd130x_$object_$operation, while the callbac= ks for > > > > > struct drm_*_helper_funcs are named ssd130x_$object_helper_$opera= tion. > > > > >=20 > > > > > The idea is that this helper_ prefix in the function names denote= that are > > > > > for struct drm_*_helper_funcs callbacks. This convention was copi= ed from > > > > > other drivers, when ssd130x was written but Maxime pointed out th= at is the > > > > > exception rather than the norm. > > > >=20 > > > > I guess you found this in my code. I want to point out that I use t= he > > > > _helper infix to signal that these are callback for > > > > drm_primary_plane_helper_funcs and *not* drm_primary_plane_funcs. T= he > > > > naming is intentional. > > > >=20 > > >=20 > > > Yes, that's what tried to say in the commit message and indeed I got = the > > > convention from drivers in drivers/gpu/drm/tiny. In fact I believe th= ese > > > function names are since first iteration of the driver, when was mean= t to > > > be a tiny driver. > > >=20 > > > According to Maxime it's the exception rather than the rule and sugge= sted > > > to change it, I don't really have a strong opinion on either naming T= BH. > >=20 > > Maybe that's just me, but the helper in the name indeed throws me off. = In my > > mind, it's supposed to be used only for helpers, not functions implemen= ting the > > helpers hooks. >=20 > Tying the function name to its _funcs structure makes perfect sense to me, > as it helps to structure the driver code. So I always use the _helper_ > infix. >=20 > In contrast, the DRM helpers that implement certain functionality does not > seem to follow any naming scheme. For example drm_atomic_helper_check() > implements struct drm_mode_config_funcs.atomic_check. To me, it's not > obvious that these two belong together. Right, but then we end up with functions that have helpers in their name and are indeed helpers, and then we have functions that have helpers in their name but are not meant to help anyone or be reused anywhere else. > And in the same structure, there's fb_create, which is provided by > drm_gem_fb_create_with_dirty(). This one doesn't even mention that > it's a helper. We should fix that then I guess? Anyway, we're way past bikeshedding there :) Maxime --4sox4ca5522j7baz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZQxDnwAKCRDj7w1vZxhR xfIlAPoCfb2reRTsVtu9qhrHlPz2UwCkF0z2C+wLodtroBc6IwD/WKlUWcJnrYCe LHprscyABhnpC6rvcpeGF6+mLyQopg0= =WXlm -----END PGP SIGNATURE----- --4sox4ca5522j7baz--