From: Bart Van Assche <bvanassche@acm.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev, lkp@intel.com,
oe-kbuild-all@lists.linux.dev,
Avri Altman <avri.altman@sandisk.com>
Subject: Re: [bvanassche:ufs-lrbp-as-priv-data 27/28] drivers/ufs/core/ufshcd.c:7594 ufshcd_advanced_rpmb_req_handler() warn: inconsistent returns '&hba->clk_scaling_lock'.
Date: Fri, 31 Oct 2025 11:23:39 -0700 [thread overview]
Message-ID: <fd51be38-8000-48e8-a5a0-0289904d4756@acm.org> (raw)
In-Reply-To: <aQT5iXgmRCzaa_xZ@stanley.mountain>
On 10/31/25 11:01 AM, Dan Carpenter wrote:
> These are from the zero day bot so how they are generated is mysterious.
> The zero day bot thought the patch was 3 days old. I think someone did
> a merge or something.
>
> I re-ran it on that branch and there were three warnings. The "literal
> zero" is a style issue thing so I haven't published that check.
>
> drivers/ufs/core/ufshcd.c:2955 __ufshcd_setup_cmd() warn: variable dereferenced before check 'cmd' (see line 2950)
>
> drivers/ufs/core/ufshcd.c:6849 ufshcd_err_handler() warn: inconsistent returns '&hba->host_sem'.
> Locked on : 6696
> Unlocked on: 6688,6849
>
> drivers/ufs/core/ufshcd.c:9035 ufshcd_device_init() info: returning a literal zero is cleaner
Hi Dan,
The inconsistent returns issue for hba->host_sem has been fixed on
Martin Petersen's fixes branch but unfortunately that fix is not yet
present on his for-next branch.
I plan to include a fix for the "variable dereferenced before check
'cmd'" complaint.
Is it expected that I don't see the above reports if I run smatch
myself? This is what I see if I run smatch (commit 2fb2b9093c5d
("sleep_info: The synchronize_srcu() sleeps")):
$ make drivers/ufs/ C=2 CHECK="smatch -p=__kernel__"
CHECK scripts/mod/empty.c
CALL scripts/checksyscalls.sh
CHECK drivers/ufs/core/ufshcd.c
drivers/ufs/core/ufshcd.c:1536 ufshcd_clk_scaling_suspend_work() warn:
ignoring unreachable code.
drivers/ufs/core/ufshcd.c:1551 ufshcd_clk_scaling_resume_work() warn:
ignoring unreachable code.
drivers/ufs/core/ufshcd.c:1616 ufshcd_devfreq_target() warn: ignoring
unreachable code.
drivers/ufs/core/ufshcd.c:1761 ufshcd_suspend_clkscaling() warn:
ignoring unreachable code.
drivers/ufs/core/ufshcd.c:1777 ufshcd_resume_clkscaling() warn: ignoring
unreachable code.
drivers/ufs/core/ufshcd.c:1910 ufshcd_ungate_work() warn: ignoring
unreachable code.
drivers/ufs/core/ufshcd.c:2095 __ufshcd_release() warn: ignoring
unreachable code.
drivers/ufs/core/ufshcd.c:9450 ufshcd_setup_clocks() warn: ignoring
unreachable code.
CHECK drivers/ufs/core/ufs-sysfs.c
CHECK drivers/ufs/core/ufs-mcq.c
CHECK drivers/ufs/core/ufs-debugfs.c
CHECK drivers/ufs/core/ufs_bsg.c
CHECK drivers/ufs/core/ufshcd-crypto.c
CHECK drivers/ufs/core/ufs-fault-injection.c
CHECK drivers/ufs/host/tc-dwc-g210-pci.c
CHECK drivers/ufs/host/ufshcd-dwc.c
CHECK drivers/ufs/host/tc-dwc-g210.c
CHECK drivers/ufs/host/ufshcd-pci.c
drivers/ufs/host/ufshcd-pci.c:45 __intel_dsm_supported() warn: always
true condition '(fn >= 0) => (0-u32max >= 0)'
CHECK drivers/ufs/host/ufshcd-pltfrm.c
Thanks!
Bart.
next prev parent reply other threads:[~2025-10-31 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 5:40 [bvanassche:ufs-lrbp-as-priv-data 27/28] drivers/ufs/core/ufshcd.c:7594 ufshcd_advanced_rpmb_req_handler() warn: inconsistent returns '&hba->clk_scaling_lock' kernel test robot
2025-10-31 6:06 ` Dan Carpenter
2025-10-31 15:57 ` Bart Van Assche
2025-10-31 18:01 ` Dan Carpenter
2025-10-31 18:23 ` Bart Van Assche [this message]
2025-11-01 17:10 ` Dan Carpenter
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=fd51be38-8000-48e8-a5a0-0289904d4756@acm.org \
--to=bvanassche@acm.org \
--cc=avri.altman@sandisk.com \
--cc=dan.carpenter@linaro.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.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 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.