* [peter-chen-usb:cdns3_kconfig_reorg 2/4] drivers/usb/cdns3/cdnsp-sky1.c:218:12: warning: 'cdnsp_sky1_resume' defined but not used
@ 2026-06-09 23:08 kernel test robot
2026-06-10 0:59 ` Peter Chen (CIX)
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-06-09 23:08 UTC (permalink / raw)
To: Peter Chen; +Cc: oe-kbuild-all, linux-usb
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git cdns3_kconfig_reorg
head: 5ef7c27aa805ae8486b5f20ef21483af7a120386
commit: 7095d19fba7625032eb775f9f425f33f4ede1517 [2/4] usb: cdns3: sky1: Add cdnsp-sky1 glue driver
config: arm64-randconfig-002-20260610 (https://download.01.org/0day-ci/archive/20260610/202606100700.mSjHu5V1-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260610/202606100700.mSjHu5V1-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606100700.mSjHu5V1-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/usb/cdns3/cdnsp-sky1.c:218:12: warning: 'cdnsp_sky1_resume' defined but not used [-Wunused-function]
218 | static int cdnsp_sky1_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~
>> drivers/usb/cdns3/cdnsp-sky1.c:213:12: warning: 'cdnsp_sky1_suspend' defined but not used [-Wunused-function]
213 | static int cdnsp_sky1_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~
--
>> Warning: drivers/usb/cdns3/cdnsp-sky1.c:84 expecting prototype for sky1_set_mode_by_id(). Prototype was for cdnsp_sky1_set_mode_by_id() instead
vim +/cdnsp_sky1_resume +218 drivers/usb/cdns3/cdnsp-sky1.c
77
78 /**
79 * sky1_set_mode_by_id - program one USB controller mode strap
80 * @syscon: regmap for S5 syscon (from DT property cix,syscon-usb)
81 * @id: controller slot ID (U3_TYPEC_DRD_ID .. U2_HOST3_ID)
82 * @mode: MODE_STRAP_OTG, MODE_STRAP_HOST, or MODE_STRAP_DEVICE
83 */
> 84 static int cdnsp_sky1_set_mode_by_id(struct regmap *syscon, int id, int mode)
85 {
86 if (id < 0 || id >= SKY1_USB_S5_NUM)
87 return -EINVAL;
88
89 return regmap_update_bits(syscon,
90 strap_signals[id].offset,
91 GENMASK(strap_signals[id].bit + 1,
92 strap_signals[id].bit),
93 (unsigned int)mode << strap_signals[id].bit);
94 }
95
96 static int cdnsp_sky1_set_all_controllers_otg(struct regmap *syscon)
97 {
98 int id, ret;
99
100 for (id = 0; id < SKY1_USB_S5_NUM; id++) {
101 ret = cdnsp_sky1_set_mode_by_id(syscon, id, MODE_STRAP_OTG);
102 if (ret)
103 return ret;
104 }
105
106 return 0;
107 }
108
109 static const struct clk_bulk_data cdnsp_sky1_cdns_core_clks[] = {
110 { .id = "sof" },
111 { .id = "aclk" },
112 { .id = "lpm" },
113 { .id = "pclk" },
114 };
115
116 static int cdnsp_sky1_probe(struct platform_device *pdev)
117 {
118 struct device *dev = &pdev->dev;
119 struct cdnsp_sky1 *priv;
120 struct cdns *cdns;
121 struct cdns3_probe_data probe_data;
122 struct resource *res;
123 int ret;
124
125 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
126 if (!priv)
127 return -ENOMEM;
128
129 priv->dev = dev;
130 priv->num_clks = ARRAY_SIZE(cdnsp_sky1_cdns_core_clks);
131 priv->clks = devm_kmemdup(dev, cdnsp_sky1_cdns_core_clks,
132 sizeof(cdnsp_sky1_cdns_core_clks), GFP_KERNEL);
133 if (!priv->clks)
134 return -ENOMEM;
135
136 ret = devm_clk_bulk_get(dev, priv->num_clks, priv->clks);
137 if (ret)
138 return dev_err_probe(dev, ret, "failed to get clocks\n");
139
140 ret = clk_bulk_prepare_enable(priv->num_clks, priv->clks);
141 if (ret)
142 return dev_err_probe(dev, ret, "failed to enable clocks\n");
143
144 priv->usb_syscon = syscon_regmap_lookup_by_phandle(dev->of_node,
145 "cix,syscon-usb");
146 if (IS_ERR(priv->usb_syscon)) {
147 ret = PTR_ERR(priv->usb_syscon);
148 dev_err_probe(dev, ret, "failed to get cix,syscon-usb regmap\n");
149 goto err_clk;
150 }
151
152 ret = cdnsp_sky1_set_all_controllers_otg(priv->usb_syscon);
153 if (ret) {
154 dev_err_probe(dev, ret,
155 "failed to set USB controllers to OTG strap\n");
156 goto err_clk;
157 }
158
159 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "glue");
160 if (!res)
161 goto err_clk;
162
163 priv->glue_base = devm_ioremap_resource(dev, res);
164 if (IS_ERR(priv->glue_base)) {
165 ret = PTR_ERR(priv->glue_base);
166 goto err_clk;
167 }
168
169 /* Set ARCACHE and AWCACHE */
170 writel(SKY1_USB_AXI_WR_CACHE_VALUE, priv->glue_base + AXI_SETTING_OFFSET);
171
172 cdns = &priv->cdns;
173 cdns->dev = dev;
174
175 probe_data.cdns = cdns;
176 probe_data.pdev = pdev;
177
178 ret = cdns3_core_probe(&probe_data);
179 if (ret)
180 goto err_clk;
181
182 return 0;
183
184 err_clk:
185 clk_bulk_disable_unprepare(priv->num_clks, priv->clks);
186
187 return ret;
188 }
189
190 static void cdnsp_sky1_remove(struct platform_device *pdev)
191 {
192 struct cdns *cdns = platform_get_drvdata(pdev);
193 struct cdnsp_sky1 *priv;
194
195 if (!cdns)
196 return;
197
198 cdns3_core_remove(cdns);
199 priv = container_of(cdns, struct cdnsp_sky1, cdns);
200 clk_bulk_disable_unprepare(priv->num_clks, priv->clks);
201 }
202
203 static int cdnsp_sky1_runtime_suspend(struct device *dev)
204 {
205 return cdns3_runtime_suspend(dev_get_drvdata(dev));
206 }
207
208 static int cdnsp_sky1_runtime_resume(struct device *dev)
209 {
210 return cdns3_runtime_resume(dev_get_drvdata(dev));
211 }
212
> 213 static int cdnsp_sky1_suspend(struct device *dev)
214 {
215 return cdns3_pm_suspend(dev_get_drvdata(dev));
216 }
217
> 218 static int cdnsp_sky1_resume(struct device *dev)
219 {
220 return cdns3_pm_resume(dev_get_drvdata(dev));
221 }
222
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [peter-chen-usb:cdns3_kconfig_reorg 2/4] drivers/usb/cdns3/cdnsp-sky1.c:218:12: warning: 'cdnsp_sky1_resume' defined but not used
2026-06-09 23:08 [peter-chen-usb:cdns3_kconfig_reorg 2/4] drivers/usb/cdns3/cdnsp-sky1.c:218:12: warning: 'cdnsp_sky1_resume' defined but not used kernel test robot
@ 2026-06-10 0:59 ` Peter Chen (CIX)
0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen (CIX) @ 2026-06-10 0:59 UTC (permalink / raw)
To: kernel test robot; +Cc: Peter Chen, oe-kbuild-all, linux-usb
On 26-06-10 07:08:53, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git cdns3_kconfig_reorg
> head: 5ef7c27aa805ae8486b5f20ef21483af7a120386
> commit: 7095d19fba7625032eb775f9f425f33f4ede1517 [2/4] usb: cdns3: sky1: Add cdnsp-sky1 glue driver
> config: arm64-randconfig-002-20260610 (https://download.01.org/0day-ci/archive/20260610/202606100700.mSjHu5V1-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 9.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260610/202606100700.mSjHu5V1-lkp@intel.com/reproduce)
>
> 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>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202606100700.mSjHu5V1-lkp@intel.com/
Fixed, thanks for reporting it.
Peter
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/usb/cdns3/cdnsp-sky1.c:218:12: warning: 'cdnsp_sky1_resume' defined but not used [-Wunused-function]
> 218 | static int cdnsp_sky1_resume(struct device *dev)
> | ^~~~~~~~~~~~~~~~~
> >> drivers/usb/cdns3/cdnsp-sky1.c:213:12: warning: 'cdnsp_sky1_suspend' defined but not used [-Wunused-function]
> 213 | static int cdnsp_sky1_suspend(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~
> --
> >> Warning: drivers/usb/cdns3/cdnsp-sky1.c:84 expecting prototype for sky1_set_mode_by_id(). Prototype was for cdnsp_sky1_set_mode_by_id() instead
>
>
> vim +/cdnsp_sky1_resume +218 drivers/usb/cdns3/cdnsp-sky1.c
>
> 77
> 78 /**
> 79 * sky1_set_mode_by_id - program one USB controller mode strap
> 80 * @syscon: regmap for S5 syscon (from DT property cix,syscon-usb)
> 81 * @id: controller slot ID (U3_TYPEC_DRD_ID .. U2_HOST3_ID)
> 82 * @mode: MODE_STRAP_OTG, MODE_STRAP_HOST, or MODE_STRAP_DEVICE
> 83 */
> > 84 static int cdnsp_sky1_set_mode_by_id(struct regmap *syscon, int id, int mode)
> 85 {
> 86 if (id < 0 || id >= SKY1_USB_S5_NUM)
> 87 return -EINVAL;
> 88
> 89 return regmap_update_bits(syscon,
> 90 strap_signals[id].offset,
> 91 GENMASK(strap_signals[id].bit + 1,
> 92 strap_signals[id].bit),
> 93 (unsigned int)mode << strap_signals[id].bit);
> 94 }
> 95
> 96 static int cdnsp_sky1_set_all_controllers_otg(struct regmap *syscon)
> 97 {
> 98 int id, ret;
> 99
> 100 for (id = 0; id < SKY1_USB_S5_NUM; id++) {
> 101 ret = cdnsp_sky1_set_mode_by_id(syscon, id, MODE_STRAP_OTG);
> 102 if (ret)
> 103 return ret;
> 104 }
> 105
> 106 return 0;
> 107 }
> 108
> 109 static const struct clk_bulk_data cdnsp_sky1_cdns_core_clks[] = {
> 110 { .id = "sof" },
> 111 { .id = "aclk" },
> 112 { .id = "lpm" },
> 113 { .id = "pclk" },
> 114 };
> 115
> 116 static int cdnsp_sky1_probe(struct platform_device *pdev)
> 117 {
> 118 struct device *dev = &pdev->dev;
> 119 struct cdnsp_sky1 *priv;
> 120 struct cdns *cdns;
> 121 struct cdns3_probe_data probe_data;
> 122 struct resource *res;
> 123 int ret;
> 124
> 125 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> 126 if (!priv)
> 127 return -ENOMEM;
> 128
> 129 priv->dev = dev;
> 130 priv->num_clks = ARRAY_SIZE(cdnsp_sky1_cdns_core_clks);
> 131 priv->clks = devm_kmemdup(dev, cdnsp_sky1_cdns_core_clks,
> 132 sizeof(cdnsp_sky1_cdns_core_clks), GFP_KERNEL);
> 133 if (!priv->clks)
> 134 return -ENOMEM;
> 135
> 136 ret = devm_clk_bulk_get(dev, priv->num_clks, priv->clks);
> 137 if (ret)
> 138 return dev_err_probe(dev, ret, "failed to get clocks\n");
> 139
> 140 ret = clk_bulk_prepare_enable(priv->num_clks, priv->clks);
> 141 if (ret)
> 142 return dev_err_probe(dev, ret, "failed to enable clocks\n");
> 143
> 144 priv->usb_syscon = syscon_regmap_lookup_by_phandle(dev->of_node,
> 145 "cix,syscon-usb");
> 146 if (IS_ERR(priv->usb_syscon)) {
> 147 ret = PTR_ERR(priv->usb_syscon);
> 148 dev_err_probe(dev, ret, "failed to get cix,syscon-usb regmap\n");
> 149 goto err_clk;
> 150 }
> 151
> 152 ret = cdnsp_sky1_set_all_controllers_otg(priv->usb_syscon);
> 153 if (ret) {
> 154 dev_err_probe(dev, ret,
> 155 "failed to set USB controllers to OTG strap\n");
> 156 goto err_clk;
> 157 }
> 158
> 159 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "glue");
> 160 if (!res)
> 161 goto err_clk;
> 162
> 163 priv->glue_base = devm_ioremap_resource(dev, res);
> 164 if (IS_ERR(priv->glue_base)) {
> 165 ret = PTR_ERR(priv->glue_base);
> 166 goto err_clk;
> 167 }
> 168
> 169 /* Set ARCACHE and AWCACHE */
> 170 writel(SKY1_USB_AXI_WR_CACHE_VALUE, priv->glue_base + AXI_SETTING_OFFSET);
> 171
> 172 cdns = &priv->cdns;
> 173 cdns->dev = dev;
> 174
> 175 probe_data.cdns = cdns;
> 176 probe_data.pdev = pdev;
> 177
> 178 ret = cdns3_core_probe(&probe_data);
> 179 if (ret)
> 180 goto err_clk;
> 181
> 182 return 0;
> 183
> 184 err_clk:
> 185 clk_bulk_disable_unprepare(priv->num_clks, priv->clks);
> 186
> 187 return ret;
> 188 }
> 189
> 190 static void cdnsp_sky1_remove(struct platform_device *pdev)
> 191 {
> 192 struct cdns *cdns = platform_get_drvdata(pdev);
> 193 struct cdnsp_sky1 *priv;
> 194
> 195 if (!cdns)
> 196 return;
> 197
> 198 cdns3_core_remove(cdns);
> 199 priv = container_of(cdns, struct cdnsp_sky1, cdns);
> 200 clk_bulk_disable_unprepare(priv->num_clks, priv->clks);
> 201 }
> 202
> 203 static int cdnsp_sky1_runtime_suspend(struct device *dev)
> 204 {
> 205 return cdns3_runtime_suspend(dev_get_drvdata(dev));
> 206 }
> 207
> 208 static int cdnsp_sky1_runtime_resume(struct device *dev)
> 209 {
> 210 return cdns3_runtime_resume(dev_get_drvdata(dev));
> 211 }
> 212
> > 213 static int cdnsp_sky1_suspend(struct device *dev)
> 214 {
> 215 return cdns3_pm_suspend(dev_get_drvdata(dev));
> 216 }
> 217
> > 218 static int cdnsp_sky1_resume(struct device *dev)
> 219 {
> 220 return cdns3_pm_resume(dev_get_drvdata(dev));
> 221 }
> 222
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
--
Best regards,
Peter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-10 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 23:08 [peter-chen-usb:cdns3_kconfig_reorg 2/4] drivers/usb/cdns3/cdnsp-sky1.c:218:12: warning: 'cdnsp_sky1_resume' defined but not used kernel test robot
2026-06-10 0:59 ` Peter Chen (CIX)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox