public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Cezar Chiru <chiru.cezar.89@gmail.com>
To: andi.shyti@kernel.org, wsa+renesas@sang-engineering.com
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Cezar Chiru <chiru.cezar.89@gmail.com>
Subject: [PATCH v9 0/3] Improve usage of 'ret' variable and make pcf_doAdress() void
Date: Thu, 23 Oct 2025 15:00:40 +0300	[thread overview]
Message-ID: <20251023120043.8661-1-chiru.cezar.89@gmail.com> (raw)

Hello maintainers,
This patch series is a response to Change Requests made by Andi Shyti on
[PATCH v7 0/3] i2c: pcf8584: Fix errors and warnings reported by checkpatch
and more specific on PATCH: i2c: pcf8584: Move 'ret' variable inside for
loop, break if ret < 0.
Also a comment from Andy Shevchenko on "[PATCH v8 1/1] i2c: pcf8584: Move
'ret' variable inside for loop, break if ret < 0." about using 'goto out;'
instead of break since the goto out; was used in other error path branches
so it makes sense to be consistent.

2 new patches have been introduced into this patch series and they are
dependent on each other that's why the need for a new patch series v9.

Change Requests:
 -remove initialization of 'ret' variable inside for loop of pcf_xfer() as
 it is not needed
 -change pcf_doAddress() function type from int to void as it always
 returns 0.
 -change if (ret < 0) break; with if (ret < 0) goto out; to be consistent
 -change pcf_doAddress() function name to pcf_send_address()

Testing:
 *built kernel and modules with I2C_ALGOPCF=m and my 3 patches applied on
 top of 6.18.0-rc1.
 *installed kernel and external modules generated by build on my laptop
 *rebooted and loaded i2c-algo-pcf.ko without i2c_debug parameter.
 *when loading the .ko with i2c_debug parameter an error is seen in dmesg
 and this is expected as the parameter was removed.
 *No success message related to i2c_algo_pcf was seen in dmesg but also
 no failures.
 *Module loading and unloading successful.
 *No PCF8584 Hardware was available

Cezar Chiru (3):
  i2c: pcf8584: Move 'ret' variable inside for loop, goto out if ret <
    0.
  i2c: pcf8584: Make pcf_doAddress() function void
  i2c: pcf8584: Change pcf_doAdress() to pcf_send_address()

 drivers/i2c/algos/i2c-algo-pcf.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

--
2.43.0


             reply	other threads:[~2025-10-23 12:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23 12:00 Cezar Chiru [this message]
2025-10-23 12:00 ` [PATCH v9 1/3] i2c: pcf8584: Move 'ret' variable inside for loop, goto out if ret < 0 Cezar Chiru
2025-10-23 18:34   ` Andy Shevchenko
2025-10-24 10:57   ` Andi Shyti
2025-10-24 13:55     ` Cezar Chiru
2025-10-27 16:28       ` Andi Shyti
2025-10-23 12:00 ` [PATCH v9 2/3] i2c: pcf8584: Make pcf_doAddress() function void Cezar Chiru
2025-10-23 12:00 ` [PATCH v9 3/3] i2c: pcf8584: Change pcf_doAdress() to pcf_send_address() Cezar Chiru
2025-10-28 17:39 ` [PATCH v9 0/3] Improve usage of 'ret' variable and make pcf_doAdress() void Andi Shyti

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=20251023120043.8661-1-chiru.cezar.89@gmail.com \
    --to=chiru.cezar.89@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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