linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] pinctrl: th1520: Improve code quality
@ 2024-10-06 17:43 Drew Fustini
  2024-10-06 17:43 ` [PATCH v2 1/3] pinctrl: th1520: Fix return value for unknown pin error Drew Fustini
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Drew Fustini @ 2024-10-06 17:43 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Linus Walleij
  Cc: linux-riscv, linux-gpio, linux-kernel, Drew Fustini,
	Dan Carpenter

This series contains code quality improvements for the new TH1520
pinctrl driver [1]:

 - Fix smatch warning that the return value is not correctly set when an
   unknown pin error occurs
 - Linus suggested using guarded mutexs so I've converted the thp->mutex
   lock to that usage.
 - Linus also suggested using a scoped iterator for the DT for-each
   child node loop: for_each_available_child_of_node_scoped.

The series is based on the linusw devel branch [2].

[1] https://lore.kernel.org/lkml/CACRpkdavPAv2sPRREQhx_A7EtOj6Ld_n+NcO+vH0QCnfVedXKw@mail.gmail.com/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=devel

Changes since v1:
- Move the scoped iterator conversion to a separate patch and remove the
  child put operations as they are no longer needed
- Link: https://lore.kernel.org/lkml/20241005-th1520-pinctrl-fixes-v1-0-5c65dffa0d00@tenstorrent.com/

Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
---
Drew Fustini (3):
      pinctrl: th1520: Fix return value for unknown pin error
      pinctrl: th1520: Convert thp->mutex to guarded mutex
      pinctrl: th1520: Convert dt child node loop to scoped iterator

 drivers/pinctrl/pinctrl-th1520.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
---
base-commit: 2694868880705e8f6bb61b24b1b25adc42a4a217
change-id: 20241005-th1520-pinctrl-fixes-d20db68387e6

Best regards,
-- 
Drew Fustini <dfustini@tenstorrent.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-07 18:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-06 17:43 [PATCH v2 0/3] pinctrl: th1520: Improve code quality Drew Fustini
2024-10-06 17:43 ` [PATCH v2 1/3] pinctrl: th1520: Fix return value for unknown pin error Drew Fustini
2024-10-06 17:43 ` [PATCH v2 2/3] pinctrl: th1520: Convert thp->mutex to guarded mutex Drew Fustini
2024-10-06 17:43 ` [PATCH v2 3/3] pinctrl: th1520: Convert dt child node loop to scoped iterator Drew Fustini
2024-10-07 12:26   ` kernel test robot
2024-10-07 18:03     ` Drew Fustini

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).