From: Dilip Kota <eswara.kota@linux.intel.com>
To: Kishon Vijay Abraham I <kishon@ti.com>,
linux-kernel@vger.kernel.org, vkoul@kernel.org,
devicetree@vger.kernel.org
Cc: robh@kernel.org, andriy.shevchenko@intel.com,
cheol.yong.kim@intel.com, chuanhua.lei@linux.intel.com,
qi-ming.wu@intel.com, yixin.zhu@intel.com
Subject: Re: [RESEND PATCH v8 0/3] Add Intel ComboPhy driver
Date: Tue, 19 May 2020 11:56:41 +0800 [thread overview]
Message-ID: <3e7e3f45-1441-84bd-a218-63847363d9ff@linux.intel.com> (raw)
In-Reply-To: <1d58e6e6-4860-dbde-1b9e-e0804180cddb@ti.com>
On 5/18/2020 9:49 PM, Kishon Vijay Abraham I wrote:
> Dilip,
>
> On 5/15/2020 1:43 PM, Dilip Kota wrote:
>> This patch series adds Intel ComboPhy driver, respective yaml schemas
>>
>> Changes on v8:
>> As per PHY Maintainer's request add description in comments for doing
>> register access through register map framework.
>>
>> Changes on v7:
>> As per System control driver maintainer's inputs remove
>> fwnode_to_regmap() definition and use device_node_get_regmap()
> Can you fix this warning and resend the patch?
> drivers/phy/intel/phy-intel-combo.c:229:6: warning: ‘cb_mode’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
> ret = regmap_write(cbphy->hsiocfg, REG_COMBO_MODE(cbphy->bid), cb_mode);
> ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/phy/intel/phy-intel-combo.c:204:24: note: ‘cb_mode’ was declared here
> enum intel_combo_mode cb_mode;
> ^~~~~~~
I noticed this warning while preparing the patch.
It sounds like false warning because:
1.) "cb_mode" is initialized in the switch case based on the "mode =
cbphy->phy_mode;"
2.) cbphy->phy_mode is initialized during the probe in
"intel_cbphy_fwnode_parse()" with one of the 3 values.
PHY_PCIE_MODE, PHY_SATA_MODE, PHY_XPCS_MODE.
3.) There is no chance of "cbphy->phy_mode" having different value.
4.) And "cb_mode" will be initialized according to the "mode =
cbphy->phy_mode;"
5.) Hence, there is no chance of "cb_mode" getting accessed uninitialized.
Regards,
Dilip
> Thanks
> Kishon
>>
>> Changes on v6:
>> Rebase patches on the latest maintainer's branch
>> https://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git/?h=phy-for-5.7
>> Dilip Kota (3):
>> dt-bindings: phy: Add PHY_TYPE_XPCS definition
>> dt-bindings: phy: Add YAML schemas for Intel ComboPhy
>> phy: intel: Add driver support for ComboPhy
>>
>> .../devicetree/bindings/phy/intel,combo-phy.yaml | 101 ++++
>> drivers/phy/intel/Kconfig | 14 +
>> drivers/phy/intel/Makefile | 1 +
>> drivers/phy/intel/phy-intel-combo.c | 632 +++++++++++++++++++++
>> include/dt-bindings/phy/phy.h | 1 +
>> 5 files changed, 749 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/phy/intel,combo-phy.yaml
>> create mode 100644 drivers/phy/intel/phy-intel-combo.c
>>
next prev parent reply other threads:[~2020-05-19 3:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 8:13 [RESEND PATCH v8 0/3] Add Intel ComboPhy driver Dilip Kota
2020-05-15 8:13 ` [RESEND PATCH v8 1/3] dt-bindings: phy: Add PHY_TYPE_XPCS definition Dilip Kota
2020-05-15 8:13 ` [RESEND PATCH v8 2/3] dt-bindings: phy: Add YAML schemas for Intel ComboPhy Dilip Kota
2020-05-15 8:13 ` [RESEND PATCH v8 3/3] phy: intel: Add driver support for ComboPhy Dilip Kota
2020-05-18 12:41 ` [RESEND PATCH v8 0/3] Add Intel ComboPhy driver Vinod Koul
2020-05-18 13:49 ` Kishon Vijay Abraham I
2020-05-19 3:56 ` Dilip Kota [this message]
2020-05-19 5:17 ` Kishon Vijay Abraham I
2020-05-19 5:25 ` Dilip Kota
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=3e7e3f45-1441-84bd-a218-63847363d9ff@linux.intel.com \
--to=eswara.kota@linux.intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=cheol.yong.kim@intel.com \
--cc=chuanhua.lei@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qi-ming.wu@intel.com \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
--cc=yixin.zhu@intel.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;
as well as URLs for NNTP newsgroup(s).