From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Jan Kiszka <jan.kiszka@siemens.com>,
Minda Chen <minda.chen@starfivetech.com>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] phy: starfive: jh7110-usb: Fix link configuration to controller
Date: Sun, 11 Aug 2024 16:36:49 +0300 [thread overview]
Message-ID: <053d3e9f-ba32-406c-a799-91ea577a0cb9@stanley.mountain> (raw)
In-Reply-To: <cd7b125c8c797f9d63440944df7121f9db0a49ad.1722457123.git.jan.kiszka@siemens.com>
Hi Jan,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jan-Kiszka/dt-bindings-phy-jh7110-usb-phy-Add-sys-syscon-property/20240802-101748
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/cd7b125c8c797f9d63440944df7121f9db0a49ad.1722457123.git.jan.kiszka%40siemens.com
patch subject: [PATCH 3/3] phy: starfive: jh7110-usb: Fix link configuration to controller
config: microblaze-randconfig-r072-20240810 (https://download.01.org/0day-ci/archive/20240811/202408110917.hE9xidPH-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 14.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202408110917.hE9xidPH-lkp@intel.com/
smatch warnings:
drivers/phy/starfive/phy-jh7110-usb.c:148 jh7110_usb_phy_probe() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +148 drivers/phy/starfive/phy-jh7110-usb.c
16d3a71c20cf2e Minda Chen 2023-06-29 109 static int jh7110_usb_phy_probe(struct platform_device *pdev)
16d3a71c20cf2e Minda Chen 2023-06-29 110 {
16d3a71c20cf2e Minda Chen 2023-06-29 111 struct jh7110_usb2_phy *phy;
16d3a71c20cf2e Minda Chen 2023-06-29 112 struct device *dev = &pdev->dev;
16d3a71c20cf2e Minda Chen 2023-06-29 113 struct phy_provider *phy_provider;
0ed73d833230fd Jan Kiszka 2024-07-31 114 u32 args[1];
16d3a71c20cf2e Minda Chen 2023-06-29 115
16d3a71c20cf2e Minda Chen 2023-06-29 116 phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
16d3a71c20cf2e Minda Chen 2023-06-29 117 if (!phy)
16d3a71c20cf2e Minda Chen 2023-06-29 118 return -ENOMEM;
16d3a71c20cf2e Minda Chen 2023-06-29 119
16d3a71c20cf2e Minda Chen 2023-06-29 120 phy->usb_125m_clk = devm_clk_get(dev, "125m");
16d3a71c20cf2e Minda Chen 2023-06-29 121 if (IS_ERR(phy->usb_125m_clk))
16d3a71c20cf2e Minda Chen 2023-06-29 122 return dev_err_probe(dev, PTR_ERR(phy->usb_125m_clk),
16d3a71c20cf2e Minda Chen 2023-06-29 123 "Failed to get 125m clock\n");
16d3a71c20cf2e Minda Chen 2023-06-29 124
16d3a71c20cf2e Minda Chen 2023-06-29 125 phy->app_125m = devm_clk_get(dev, "app_125m");
16d3a71c20cf2e Minda Chen 2023-06-29 126 if (IS_ERR(phy->app_125m))
16d3a71c20cf2e Minda Chen 2023-06-29 127 return dev_err_probe(dev, PTR_ERR(phy->app_125m),
16d3a71c20cf2e Minda Chen 2023-06-29 128 "Failed to get app 125m clock\n");
16d3a71c20cf2e Minda Chen 2023-06-29 129
16d3a71c20cf2e Minda Chen 2023-06-29 130 phy->regs = devm_platform_ioremap_resource(pdev, 0);
16d3a71c20cf2e Minda Chen 2023-06-29 131 if (IS_ERR(phy->regs))
16d3a71c20cf2e Minda Chen 2023-06-29 132 return dev_err_probe(dev, PTR_ERR(phy->regs),
16d3a71c20cf2e Minda Chen 2023-06-29 133 "Failed to map phy base\n");
16d3a71c20cf2e Minda Chen 2023-06-29 134
16d3a71c20cf2e Minda Chen 2023-06-29 135 phy->phy = devm_phy_create(dev, NULL, &jh7110_usb2_phy_ops);
16d3a71c20cf2e Minda Chen 2023-06-29 136 if (IS_ERR(phy->phy))
16d3a71c20cf2e Minda Chen 2023-06-29 137 return dev_err_probe(dev, PTR_ERR(phy->phy),
16d3a71c20cf2e Minda Chen 2023-06-29 138 "Failed to create phy\n");
16d3a71c20cf2e Minda Chen 2023-06-29 139
16d3a71c20cf2e Minda Chen 2023-06-29 140 phy_set_drvdata(phy->phy, phy);
16d3a71c20cf2e Minda Chen 2023-06-29 141 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
16d3a71c20cf2e Minda Chen 2023-06-29 142
0ed73d833230fd Jan Kiszka 2024-07-31 143 phy->sys_syscon =
0ed73d833230fd Jan Kiszka 2024-07-31 144 syscon_regmap_lookup_by_phandle_args(pdev->dev.of_node,
0ed73d833230fd Jan Kiszka 2024-07-31 145 "starfive,sys-syscon",
0ed73d833230fd Jan Kiszka 2024-07-31 146 1, args);
0ed73d833230fd Jan Kiszka 2024-07-31 147 if (IS_ERR(phy->sys_syscon))
0ed73d833230fd Jan Kiszka 2024-07-31 @148 return dev_err_probe(dev, PTR_ERR(phy->phy),
Passing the wrong variable. It should be phy->sys_syscon instead of phy->phy.
0ed73d833230fd Jan Kiszka 2024-07-31 149 "Failed to get sys-syscon\n");
0ed73d833230fd Jan Kiszka 2024-07-31 150 phy->sys_phy_connect = args[0];
0ed73d833230fd Jan Kiszka 2024-07-31 151
16d3a71c20cf2e Minda Chen 2023-06-29 152 return PTR_ERR_OR_ZERO(phy_provider);
16d3a71c20cf2e Minda Chen 2023-06-29 153 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-08-11 13:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 20:18 [PATCH 0/3] riscv: jh7110: Fix configuration for on-chip USB 2.0 support Jan Kiszka
2024-07-31 20:18 ` [PATCH 1/3] dt-bindings: phy: jh7110-usb-phy: Add sys-syscon property Jan Kiszka
2024-08-06 17:07 ` Rob Herring (Arm)
2024-07-31 20:18 ` [PATCH 2/3] riscv: dts: starfive: jh7110: Add sys-syscon property to usbphy0 Jan Kiszka
2024-07-31 20:18 ` [PATCH 3/3] phy: starfive: jh7110-usb: Fix link configuration to controller Jan Kiszka
2024-08-02 10:45 ` Minda Chen
2024-08-11 13:36 ` Dan Carpenter [this message]
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=053d3e9f-ba32-406c-a799-91ea577a0cb9@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jan.kiszka@siemens.com \
--cc=kishon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lkp@intel.com \
--cc=minda.chen@starfivetech.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=vkoul@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 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).