Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2348331rdb; Thu, 21 Sep 2023 16:29:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhkVYVAF5AC4QyAXAY6nTmx7DnlfvRAsjreXSaIWSnaE/20x+L8ANRN8xl+qEWk5l3iYy8 X-Received: by 2002:a17:90a:43c5:b0:273:f138:29cc with SMTP id r63-20020a17090a43c500b00273f13829ccmr6230344pjg.35.1695338950958; Thu, 21 Sep 2023 16:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695338950; cv=none; d=google.com; s=arc-20160816; b=y3beQ9V0yi5al68UHDhFV4uJdG1SQzV1PtjUXMbLiA1rQMuTU7klR69ZKBDpsPMG1u miat3pL9g3hmd0VvqmCf7QztQbXQWW4l6oPucQNJ8vW+TX2JaBgnlW/mAOGdQPTWNOkM A2JHc0Cg4oxuZkUj/HyHLuGQHwFN4bQRBnrxP0//rsLMNgMBCDQef0BiXQqPdbqKZ31A TRVTvzB9nRPVWJFPaoAa/2mtfKmCOFRBd4pZdGn67gDeXQSCIQakpYXyQhbjtHdiXcAV bSquxneFx5Ok0Wcb+eITt7QVta3WJG+QggbBdsCy+OByzRIyMzHxUTz3NMnkw1CFSjyP ZAiQ== 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=KlK68PiRYmNjDZ522KXFD15kcxu9BDel8MdfKGOwXpE=; fh=imUN2S227kXgsP+LoWtV3Urq5eXMDFAvxlbrkqI36eg=; b=e2tLvmauQoHxNZ5G+xM5IgiuzyU384Mi0D/eHb+xY+jarB5+Z5ioezX6gzV443T6J7 YGJo38PhcJqtakWMQ4zO4IQfA3GeZ2/5TmfdYsZBcoi6yys8RWsXdmWgQMkujOaBPApb H5l9n8kmDMNWgYv5AhwVOAVhaKdQtn0PNVB1XHWYrudXdrTUsBIEvvAvGD34+5UxiiPy wlBFlqKb4mrfRwMkfHT/IcEjWjYKaTyk0UCrasz5XmGQA8OI1n0VkKFz4mcM0vcPEJZr A8JCt3p5yB7ZsO5Q+Caai+uyDpYIjFRxTkTuaYUTCjxiwpDmmPW8kesImpMfmmcDaCoM Wl3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q5ielep+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id p12-20020a170902f08c00b001badbe8e441si2286264pla.106.2023.09.21.16.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 16:29:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q5ielep+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id D826C8258317; Thu, 21 Sep 2023 15:15:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231524AbjIUWPu (ORCPT + 99 others); Thu, 21 Sep 2023 18:15:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233176AbjIUWPZ (ORCPT ); Thu, 21 Sep 2023 18:15:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D103183F5A for ; Thu, 21 Sep 2023 10:37:17 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF65BC116B4; Thu, 21 Sep 2023 08:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695283948; bh=KlK68PiRYmNjDZ522KXFD15kcxu9BDel8MdfKGOwXpE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q5ielep+830ry6o1O39pwOmhlA5Dd3vzUZcRQoBZJURr/+cc5DnJGolJiIRGB3lTJ iWNjjS21c6r62YsrVzhW0MSOAQ6USouYky4eccKL6sMLbjkBTrt+m+3jyvSN1Zafbi BOAcYc4p0z80XbHapFdPWD35auDsgaTgejgzPCkRx4t3O2+pK6bywzePrw7JZUQcVm 9GeO+E6zQV9frsiN8hyVHpuBXSjha7sFejhkqK4QbfugMrnEsRomrpEsF8RXwfmlB0 mUHjG9RzU2vUghmNAXZ43wF+IHJDZs8kabj0yg9bfiRPBtdItnHB4tq4rtRSoLS8lv SAxdKepsipABg== Date: Thu, 21 Sep 2023 10:12:24 +0200 From: Maxime Ripard To: Geert Uytterhoeven Cc: Javier Martinez Canillas , Thomas Zimmermann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/ssd130x: Drop _helper prefix from struct drm_*_helper_funcs callbacks Message-ID: <2p53aei56tlr7k6w5oawlwpmv2k7agpbb6wfwpxcg3rqyueyrx@2as7tijrgnh4> 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="4d2dwrs5mcu6fwes" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Thu, 21 Sep 2023 15:15:57 -0700 (PDT) --4d2dwrs5mcu6fwes Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 21, 2023 at 09:57:22AM +0200, Geert Uytterhoeven wrote: > Hi Maxime, >=20 > On Thu, Sep 21, 2023 at 9:44=E2=80=AFAM Maxime Ripard wrote: > > On Mon, Sep 18, 2023 at 09:19:07AM +0200, Javier Martinez Canillas wrot= e: > > > Thomas Zimmermann writes: > > > > Am 14.09.23 um 21:51 schrieb Javier Martinez Canillas: > > > >> The driver uses a naming convention where functions for struct drm= _*_funcs > > > >> callbacks are named ssd130x_$object_$operation, while the callback= s for > > > >> struct drm_*_helper_funcs are named ssd130x_$object_helper_$operat= ion. > > > >> > > > >> The idea is that this helper_ prefix in the function names denote = that are > > > >> for struct drm_*_helper_funcs callbacks. This convention was copie= d from > > > >> other drivers, when ssd130x was written but Maxime pointed out tha= t is the > > > >> exception rather than the norm. > > > > > > > > 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. > > > > > > 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. > > > > > > 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. > > > > 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 > With several callbacks using the same (field) name, it is very helpful > to name the actual implementation by combining the struct type name > and the field name. I can't think of any (at least for a given object). Which one do you have in mind? > Anything else confuses the casual reader. Perhaps the real question is wh= ether > the structures should have "helper" in their name in the first place? Those structures are meant for functions used by the helpers, they are not helper functions. Maxime --4d2dwrs5mcu6fwes Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZQv66AAKCRDj7w1vZxhR xaUuAP49Dk5XZHDwOEMvFpUNAd5qO3W2XesVv7Vgkx9mVzpbiAD9Fd8QBcyq7FrB lGErmbmSM6/2LttSu9BDRi/YKeTRbws= =fnWn -----END PGP SIGNATURE----- --4d2dwrs5mcu6fwes--