linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Javier Carrasco <javier.carrasco.cruz@gmail.com>
Subject: [PATCH 0/6] input: use device_for_each_child_node_scoped()
Date: Fri, 12 Apr 2024 22:57:29 +0200	[thread overview]
Message-ID: <20240412-input_device_for_each_child_node_scoped-v1-0-dbad1bc7ea84@gmail.com> (raw)

Switch to the _scoped() version introduced in commit 365130fd47af
("device property: Introduce device_for_each_child_node_scoped()")
to remove the need for manual calling of fwnode_handle_put() in the
paths where the code exits the loop early. This modification simplifies
the code and eliminates the risk of leaking memory if any early exit is
added without de-allocating the child node.

There are six users of the non-scoped version in the input subsystem:

- iqs269a
- qt1050
- gpio_keys
- gpio_keys_polled
- adc-keys
- adc-joystick

This series is based on the master branch of linux-next (next-20240412)
to have access to the scoped version of device_for_each_child_node().

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Javier Carrasco (6):
      input: iqs269a: use device_for_each_child_node_scoped()
      input: qt1050: use device_for_each_child_node_scoped()
      input: gpio_keys: use device_for_each_child_node_scoped()
      input: gpio_keys_polled: use device_for_each_child_node_scoped()
      input: adc-keys: use device_for_each_child_node_scoped()
      input: adc-joystick: use device_for_each_child_node_scoped()

 drivers/input/joystick/adc-joystick.c     | 16 +++++-----------
 drivers/input/keyboard/adc-keys.c         |  5 +----
 drivers/input/keyboard/gpio_keys.c        |  4 +---
 drivers/input/keyboard/gpio_keys_polled.c |  4 +---
 drivers/input/keyboard/qt1050.c           | 12 ++++--------
 drivers/input/misc/iqs269a.c              |  7 ++-----
 6 files changed, 14 insertions(+), 34 deletions(-)
---
base-commit: 9ed46da14b9b9b2ad4edb3b0c545b6dbe5c00d39
change-id: 20240404-input_device_for_each_child_node_scoped-0a55a76ad7ee

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>


             reply	other threads:[~2024-04-12 20:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 20:57 Javier Carrasco [this message]
2024-04-12 20:57 ` [PATCH 1/6] input: iqs269a: use device_for_each_child_node_scoped() Javier Carrasco
2024-04-12 20:57 ` [PATCH 2/6] input: qt1050: " Javier Carrasco
2024-07-16  1:03   ` Dmitry Torokhov
2024-07-16  4:17     ` Javier Carrasco
2024-07-16  4:23       ` Dmitry Torokhov
2024-04-12 20:57 ` [PATCH 3/6] input: gpio_keys: " Javier Carrasco
2024-04-12 20:57 ` [PATCH 4/6] input: gpio_keys_polled: " Javier Carrasco
2024-04-12 20:57 ` [PATCH 5/6] input: adc-keys: " Javier Carrasco
2024-04-12 20:57 ` [PATCH 6/6] input: adc-joystick: " Javier Carrasco
2024-07-16  1:05 ` [PATCH 0/6] input: " Dmitry Torokhov

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=20240412-input_device_for_each_child_node_scoped-v1-0-dbad1bc7ea84@gmail.com \
    --to=javier.carrasco.cruz@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).