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 v7 0/3] i2c: pcf8584: Fix errors and warnings reported by checkpatch
Date: Sat, 18 Oct 2025 12:12:55 +0300 [thread overview]
Message-ID: <20251018091258.5266-1-chiru.cezar.89@gmail.com> (raw)
Hello maintainers,
This patch series fixes 18 errors and multiple warnings reported by
checkpatch.pl on drivers/i2c/algos/i2c-algo-pcf.c file.
The series v1->v4 is a response to the discussion on the mailing list
with Markus Elfring who had comments on my earlier submissions.
He suggested:
-to split my initial submission in a patch series
-had some valid points on imperative mood usage in commit messages
-wrapping commit message to 75 columns per line
-change some of the commit message to point usage of checkpatch.pl
The series v4->v6 is a response to the discussion on the mailing list with
I2C SUBSYSTEM maintainer Wolfram Sang who requested some changes:
He requested:
- to remove debug macros from i2c-algo-pcf.c as no code change was done
for almost 16 years.
- remove wrapping paranthesis from value assigned of '(0)''.
- resolve conficts caused by debug macros removal.
- remove also printk and dev_dbg function calls related to DEB macros.
The series v6->v7 was a result of feedback received from Andi Shyti:
- Remove not useful information from commit message
- use better the 'ret' variable by moving it inside for loop of pcf_xfer
function and inside of loop check if ret < 0 then break;
Here is a brief summary and order of patches to be applied:
Patch 1/3: i2c: pcf8584: Remove debug macros from i2c-algo-pcf.c
This patch remove the define of debug macros and also their usage from
code along with printk and dev_dbg function calls. Removes also i2c_debug
parameter as its implementation was removed.
Patch 2/3: i2c: pcf8584: Fix do not use assignment inside if conditional
This patch takes the assignement from if conditional and moves it by 1 line
up.
Patch 3/3: i2c: pcf8584: Move 'ret' variable inside for loop, break if
ret < 0.
This patch adds space(s) around some binary operators. Also moves ret
variable inside for loop and check in the loop if (ret < 0) break;
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: Remove debug macros from i2c-algo-pcf.c
i2c: pcf8584: Fix do not use assignment inside if conditional
i2c: pcf8584: Move 'ret' variable inside for loop, break if ret < 0.
drivers/i2c/algos/i2c-algo-pcf.c | 99 ++++++++------------------------
1 file changed, 23 insertions(+), 76 deletions(-)
--
2.43.0
next reply other threads:[~2025-10-18 9:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 9:12 Cezar Chiru [this message]
2025-10-18 9:12 ` [PATCH v7 1/3] i2c: pcf8584: Remove debug macros from i2c-algo-pcf.c Cezar Chiru
2025-10-18 9:12 ` [PATCH v7 2/3] i2c: pcf8584: Fix do not use assignment inside if conditional Cezar Chiru
2025-10-18 9:12 ` [PATCH v7 3/3] i2c: pcf8584: Move 'ret' variable inside for loop, break if ret < 0 Cezar Chiru
2025-10-18 18:00 ` Markus Elfring
2025-10-19 22:03 ` Andi Shyti
2025-10-19 22:07 ` [PATCH v7 0/3] i2c: pcf8584: Fix errors and warnings reported by checkpatch Andi Shyti
2025-10-19 22:10 ` 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=20251018091258.5266-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