From: Brian Masney <bmasney@redhat.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Maxime Ripard <mripard@kernel.org>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Conor Dooley <conor@kernel.org>,
lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] clk: microchip: core: allow driver to be compiled with COMPILE_TEST
Date: Fri, 5 Dec 2025 06:35:36 -0500 [thread overview]
Message-ID: <aTLDiK50Me-iNkdz@redhat.com> (raw)
In-Reply-To: <202512050233.R9hAWsJN-lkp@intel.com>
On Fri, Dec 05, 2025 at 10:21:55AM +0300, Dan Carpenter wrote:
> smatch warnings:
> drivers/clk/microchip/clk-core.c:300 roclk_get_parent() warn: signedness bug returning '(-22)'
> drivers/clk/microchip/clk-core.c:833 sclk_get_parent() warn: signedness bug returning '(-22)'
>
> vim +300 drivers/clk/microchip/clk-core.c
>
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 286 static u8 roclk_get_parent(struct clk_hw *hw)
> ^^
> returns a u8.
>
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 287 {
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 288 struct pic32_ref_osc *refo = clkhw_to_refosc(hw);
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 289 u32 v, i;
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 290
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 291 v = (readl(refo->ctrl_reg) >> REFO_SEL_SHIFT) & REFO_SEL_MASK;
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 292
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 293 if (!refo->parent_map)
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 294 return v;
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 295
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 296 for (i = 0; i < clk_hw_get_num_parents(hw); i++)
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 297 if (refo->parent_map[i] == v)
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 298 return i;
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 299
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 @300 return -EINVAL;
> ^^^^^^^^^^^^^^^
> So it can't return negative error codes.
>
> ce6e11884659988 Purna Chandra Mandal 2016-05-13 301 }
This was an existing bug in the driver. Since I'm making changes
to this driver, I'll go ahead and fix this as well.
Brian
next prev parent reply other threads:[~2025-12-05 11:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 22:06 [PATCH v2 0/3] clk: microchip: core: fix issue with round_rate conversion and allow compile test Brian Masney
2025-12-01 22:06 ` [PATCH v2 1/3] clk: microchip: core: remove duplicate determine_rate on pic32_sclk_ops Brian Masney
2025-12-01 22:06 ` [PATCH v2 2/3] clk: microchip: core: remove unused include asm/traps.h Brian Masney
2025-12-01 22:06 ` [PATCH v2 3/3] clk: microchip: core: allow driver to be compiled with COMPILE_TEST Brian Masney
2025-12-04 19:24 ` kernel test robot
2025-12-05 7:21 ` Dan Carpenter
2025-12-05 11:35 ` Brian Masney [this message]
2025-12-05 3:51 ` kernel test robot
2025-12-05 11:33 ` Brian Masney
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=aTLDiK50Me-iNkdz@redhat.com \
--to=bmasney@redhat.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.