Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1327176ybt; Thu, 25 Jun 2020 03:27:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6GYpIx+uKeI7EiSU8jWwgKZ90fziFzrr4Bf79XbR9g/+QsnePzfaVTsITAlJNR5TCLl3/ X-Received: by 2002:aa7:d4c5:: with SMTP id t5mr30313477edr.357.1593080869741; Thu, 25 Jun 2020 03:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593080869; cv=none; d=google.com; s=arc-20160816; b=aVWC5w9bVEMVPYX2MEnrRa4za0HmFnmkrK2aH3wHtNU2w32Of5XKUZECc9oSA/vrJw XHRfAlDIbg+4aJEDo8X/02Py/C8D4r2ff8t2ZoSJWnADRdSvUwQ2ZdPNWYkfx4EDalNP yNsUM/ntwNEbhAAeKjZF95Ncr8cN/zTQIjgRp6yMPLSD7boBg9dT8n/josBrjyLQiut7 FPCYR6gHqV5WAMK+2uuQSV60INhfiFjVgPiPfeaDYE0soQYEHxDKJxAm5+dEOaLpYb2v 8R5GYkCck6zMmhUCsxQRAJcGp2GYHn+iPMRprpjv9FD7d6bpZV0Ye30J3XH4jj7Lz0c0 +GwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=99pUPKZkDICBscx6IMwhfX3GDmfJWT4VBE0tHyrRPo0=; b=odf5ffJyw8DihCgF8W1WbPWKcmwDFO6xgxKoE6Wa9izFyuaE7D8BAXNYlkvvNGo7A7 aDjtjR//dSRBOAnPS2vwysKqX2g0NdurQojoiVXNTHpY2pzl4zHgAvnNl2nX/cfEjmc+ 0EycT66utgDSw4+076gvlWa/Jtz2a+eZ6Pyrw7VWspNFD4EKEKPvvlATA+aOVMgVd9XG O8tDBjRs627H4JCmhtUw6JZhoPs7PuuSBbk38lcvXbkAHm+upqmmhzmhpNEByzO+x8PV MmEkj94m5V5W03l8Sr+7pCQ5YoDip+9y1/0DcMRlUoKGvRnLFy/sNG02cw9BGf2nU1Ck T09g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=tC8ezzWd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si15053872edr.207.2020.06.25.03.27.25; Thu, 25 Jun 2020 03:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=tC8ezzWd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403979AbgFYK1E (ORCPT + 99 others); Thu, 25 Jun 2020 06:27:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403800AbgFYK0r (ORCPT ); Thu, 25 Jun 2020 06:26:47 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA14CC061573 for ; Thu, 25 Jun 2020 03:26:46 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id z2so4176364qts.5 for ; Thu, 25 Jun 2020 03:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=99pUPKZkDICBscx6IMwhfX3GDmfJWT4VBE0tHyrRPo0=; b=tC8ezzWdPiPEZ6KMH8cVuWoSivcTRRfwm7e5F3qBiBL+tCorvjtizYJb7nxpY/XtM0 gmrcnV7c4sABi/aEllK843+4hvPna2JoDibtxw1Bu9jUR813QbL6XpvPCPWBNGS4YgIq 1pKdMwAfQA79q7UH0l50RBPSK4Aszc0OrAoXN3A9O35p3TPVKpbLhoRwFZfoIpT06CX3 JYZWM+g5kZii662tsrx3YbU4XzQ/b8u04u0FWjuLuadC6hr9dhQAH6IuUlUfwIOigCQy +SiSk7K8EqU6val/jMSPrEZbxcBlmoBxv5OkDJ50CueY9DYUCE7PfpyIkporqPfLCuko h3Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=99pUPKZkDICBscx6IMwhfX3GDmfJWT4VBE0tHyrRPo0=; b=Re/g6Gym6Km3y1ecvTdCGSaTwPZ0Pb2UbFP4MjH7a7AVfatOXRlimRlK7goKQCC5yY kgHMWJ3fKmCdSN2Fw9xQPb4pQzjjKEm3L4rIDScaNL+yhSwN5YLz79vM+BR/DwT9E5W2 KI9vF6LcZAU2oHsEWJlbWBw3zvvLaJFBnphJo/l4j4jy7oZdTk4iOjjS0hfERYcliVS/ FwZmFbB3DYwIV7OUDqeNoO9ENNc6z65acVEOU1/5m4P2RNxqLDoTQZZnkoqEVnyS4gRw P49bvbw+qIO1ee+tG1H4ETo+2H5eh7OtSvqQQZOUyFiID7renFZaTtYbl4yJd2KFCGbn cYjQ== X-Gm-Message-State: AOAM531GJHWSCmUUWg87pkZC0B/8bv1i2i5+9ONsHHhezC5qWzVXl2Aw jFlB1d4K8ETf8N7RhC6mHZtnjgW0PtAi/11bpEs5NA== X-Received: by 2002:ac8:134a:: with SMTP id f10mr23676521qtj.131.1593080806009; Thu, 25 Jun 2020 03:26:46 -0700 (PDT) MIME-Version: 1.0 References: <20200623040107.22270-1-warthog618@gmail.com> <20200623040107.22270-10-warthog618@gmail.com> <20200624141912.GB7569@sol> <20200624231611.GA6751@sol> In-Reply-To: <20200624231611.GA6751@sol> From: Bartosz Golaszewski Date: Thu, 25 Jun 2020 12:26:35 +0200 Message-ID: Subject: Re: [PATCH 09/22] gpiolib: cdev: rename priv to gcdev To: Kent Gibson Cc: LKML , linux-gpio , Linus Walleij Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 25, 2020 at 1:16 AM Kent Gibson wrote: > > On Wed, Jun 24, 2020 at 04:20:49PM +0200, Bartosz Golaszewski wrote: > > =C5=9Br., 24 cze 2020 o 16:19 Kent Gibson napisa= =C5=82(a): > > > > > > On Wed, Jun 24, 2020 at 04:04:09PM +0200, Bartosz Golaszewski wrote: > > > > wt., 23 cze 2020 o 06:02 Kent Gibson napisa= =C5=82(a): > > > > > > > > > > Rename priv to gcdev to improve readability. > > > > > > > > > > The name "priv" indicates that the object is pointed to by > > > > > file->private_data, not what the object is actually is. > > > > > It is always used to point to a struct gpio_chardev_data so renam= ing > > > > > it to gcdev seemed as good as anything, and certainly clearer tha= n "priv". > > > > > > > > > > Signed-off-by: Kent Gibson > > > > > > > > > > > > > Ugh now it's gcdev and gdev everywhere and it doesn't really make i= t > > > > more readable. Maybe chardev_data or cdev_data? > > > > > > > > > > Agreed, it isn't ideal visually, but is at least more unique than pri= v. > > > Linus was going for short names recently (e.g. gc for gpiochip), so I= was > > > going for something short. > > > > > > And I try avoid names ending in _data or _state or similar where they > > > don't really add anything. > > > > > > Would chardev or gchardev work for you? > > > > > > > Yes, chardev is fine. Even cdev is fine for me: gdev vs gcdev is > > confusing but gdev vs cdev looks better IMO. > > > > OK, I was avoiding cdev to try to make the name more likely to be > globally unique, hence the leading "g". > > To try to keep it short, how about attacking it from the other end and > reducing it to gcd? > That would also be in keeping with the naming convention I use in later > patches, e.g. glv for gpioline_values. > So gcd for gpio_chardev_data. Hmmm, or maybe gcdd? > > Why is it that naming things is always the hardest part ;-)? > I prefer cdev here but it's just a personal preference. If anyone has a better idea I'm happy to switch to it. Bart