From: Ivan Vecera <ivecera@redhat.com>
To: Sang-Heon Jeon <ekffu200098@gmail.com>,
kuba@kernel.org, Prathosh Satish <Prathosh.Satish@microchip.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/4] dpll: zl3073x: remove conditional return with no effect
Date: Mon, 27 Jul 2026 11:57:49 +0200 [thread overview]
Message-ID: <613FABA8-E03B-49D3-ACB9-175BF46ED165@redhat.com> (raw)
In-Reply-To: <20260725150852.859188-2-ekffu200098@gmail.com>
25. července 2026 17:08:49 SELČ, Sang-Heon Jeon <ekffu200098@gmail.com> napsal:
>Both branches of the check return the same value, so the check has
>no effect. Remove it and return the value directly.
>
>This is the result of running the Coccinelle script from
>scripts/coccinelle/misc/cond_return_no_effect.cocci.
>
>Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
>---
> drivers/dpll/zl3073x/dpll.c | 6 +-----
> drivers/dpll/zl3073x/out.c | 8 ++------
> 2 files changed, 3 insertions(+), 11 deletions(-)
>
>diff --git a/drivers/dpll/zl3073x/dpll.c b/drivers/dpll/zl3073x/dpll.c
>index a2a641b8358f..0488ae6ac486 100644
>--- a/drivers/dpll/zl3073x/dpll.c
>+++ b/drivers/dpll/zl3073x/dpll.c
>@@ -2272,11 +2272,7 @@ zl3073x_dpll_init_fine_phase_adjust(struct zl3073x_dev *zldev)
> if (rc)
> return rc;
>
>- rc = zl3073x_write_u8(zldev, ZL_REG_SYNTH_PHASE_SHIFT_CTRL, 0x01);
>- if (rc)
>- return rc;
>-
>- return rc;
>+ return zl3073x_write_u8(zldev, ZL_REG_SYNTH_PHASE_SHIFT_CTRL, 0x01);
> }
>
> /**
>diff --git a/drivers/dpll/zl3073x/out.c b/drivers/dpll/zl3073x/out.c
>index eb5628aebcee..410d15b96d0b 100644
>--- a/drivers/dpll/zl3073x/out.c
>+++ b/drivers/dpll/zl3073x/out.c
>@@ -85,12 +85,8 @@ int zl3073x_out_state_fetch(struct zl3073x_dev *zldev, u8 index)
> if (rc)
> return rc;
>
>- rc = zl3073x_read_u32(zldev, ZL_REG_OUTPUT_PHASE_COMP,
>- &out->phase_comp);
>- if (rc)
>- return rc;
>-
>- return rc;
>+ return zl3073x_read_u32(zldev, ZL_REG_OUTPUT_PHASE_COMP,
>+ &out->phase_comp);
> }
>
> /**
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
next prev parent reply other threads:[~2026-07-27 9:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 15:08 [PATCH net-next v2 0/4] net: remove conditional returns with no effect Sang-Heon Jeon
2026-07-25 15:08 ` [PATCH net-next v2 1/4] dpll: zl3073x: remove conditional return " Sang-Heon Jeon
2026-07-27 9:57 ` Ivan Vecera [this message]
2026-07-25 15:08 ` [PATCH net-next v2 2/4] net: ethernet: " Sang-Heon Jeon
2026-07-27 11:27 ` Ioana Ciornei
2026-07-25 15:08 ` [PATCH net-next v2 3/4] net: " Sang-Heon Jeon
2026-07-25 15:08 ` [PATCH net-next v2 4/4] net: intel: " Sang-Heon Jeon
2026-07-27 9:45 ` [Intel-wired-lan] " Marcin Szycik
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=613FABA8-E03B-49D3-ACB9-175BF46ED165@redhat.com \
--to=ivecera@redhat.com \
--cc=Prathosh.Satish@microchip.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=ekffu200098@gmail.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vadim.fedorenko@linux.dev \
/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