linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Benson Leung <bleung@chromium.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Michael Walle <michael@walle.cc>, Johan Hovold <johan@kernel.org>,
	Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-pwm@vger.kernel.org, kernel@pengutronix.de,
	linux-arm-kernel@lists.infradead.org,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Guenter Roeck <groeck@chromium.org>,
	chrome-platform@lists.linux.dev,
	linux-rockchip@lists.infradead.org,
	linux-riscv@lists.infradead.org, greybus-dev@lists.linaro.org,
	linux-staging@lists.linux.dev
Subject: [PATCH 00/10] pwm: Constistenly name pwm_chip variables "chip"
Date: Fri, 14 Jul 2023 22:56:13 +0200	[thread overview]
Message-ID: <20230714205623.2496590-1-u.kleine-koenig@pengutronix.de> (raw)

while working on an extension for the pwm framework, I noticed that some
drivers and even the core only nearly consistently named all variables
and struct members holding a pointer to a struct pwm_chip "chip":

$ git grep -Pho 'struct pwm_chip \**[a-z0-9_]+(*nla:[\(a-z0-9_])' v6.5-rc1 | sort | uniq -c | sort -n
      1 struct pwm_chip *pwm
      1 struct pwm_chip pwm
      1 struct pwm_chip pwm_chip
      2 struct pwm_chip *_chip
      4 struct pwm_chip *c
      8 struct pwm_chip *pc
     57 struct pwm_chip chip
    358 struct pwm_chip *chip

With this series applied these are all called "chip" with one exception:
The led driver drivers/leds/rgb/leds-qcom-lpg.c uses "pwm". Maybe
"pwmchip" would be a better name, but I'm not sure that using "chip" was
an improvement there as this isn't a pure pwm driver. I'm not touching
that one.

The first offenders I found were the core and the atmel-hlcdc driver.
After I found these I optimistically assumed these were the only ones
with the unusual names and send patches for these out individually
before checking systematically.

The atmel-hlcdc patch is included here unchanged, the core patch now
also adapted the declaration of the changed functions in <linux/pwm.h>.
I marked these two as "superseded" in patchwork already.

All patches in this series are pairwise independent of each other. I
don't know if the staging patch should better go in via the greybus tree
or via pwm. Both is possible without needing coordination.

Best regards
Uwe


Uwe Kleine-König (10):
  pwm: Use a consistent name for pwm_chip pointers in the core
  pwm: atmel-hlcdc: Use consistent variable naming
  pwm: bcm-kona: Consistenly name pwm_chip variables "chip"
  pwm: crc: Consistenly name pwm_chip variables "chip"
  pwm: cros-ec: Consistenly name pwm_chip variables "chip"
  pwm: lp3943: Consistenly name pwm_chip variables "chip"
  pwm: rockchip: Consistenly name pwm_chip variables "chip"
  pwm: sifive: Consistenly name pwm_chip variables "chip"
  pwm: sl28cpld: Consistenly name pwm_chip variables "chip"
  staging: greybus: pwm: Consistenly name pwm_chip variables "chip"

 drivers/pwm/core.c            | 28 +++++++--------
 drivers/pwm/pwm-atmel-hlcdc.c | 64 +++++++++++++++++------------------
 drivers/pwm/pwm-bcm-kona.c    |  4 +--
 drivers/pwm/pwm-crc.c         |  4 +--
 drivers/pwm/pwm-cros-ec.c     | 10 +++---
 drivers/pwm/pwm-lp3943.c      |  4 +--
 drivers/pwm/pwm-rockchip.c    |  4 +--
 drivers/pwm/pwm-sifive.c      |  4 +--
 drivers/pwm/pwm-sl28cpld.c    | 10 +++---
 drivers/staging/greybus/pwm.c | 12 +++----
 include/linux/pwm.h           |  6 ++--
 11 files changed, 75 insertions(+), 75 deletions(-)

base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2023-07-14 20:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 20:56 Uwe Kleine-König [this message]
2023-07-14 20:56 ` [PATCH 08/10] pwm: sifive: Consistenly name pwm_chip variables "chip" Uwe Kleine-König
2023-07-20  6:48 ` [PATCH 00/10] pwm: Constistenly " Thierry Reding
2023-07-20  7:10   ` Uwe Kleine-König
2023-07-20 15:03     ` Thierry Reding
2023-07-20 14:41 ` Thierry Reding
2023-09-11  4:31 ` patchwork-bot+chrome-platform
2023-09-11  4:49 ` patchwork-bot+chrome-platform

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230714205623.2496590-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=claudiu.beznea@microchip.com \
    --cc=elder@kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=groeck@chromium.org \
    --cc=heiko@sntech.de \
    --cc=johan@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=michael@walle.cc \
    --cc=nicolas.ferre@microchip.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).