[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107201452.k6CYQLwN-lkp@intel.com>
Date: Tue, 20 Jul 2021 14:08:00 +0800
From: kernel test robot <lkp@...el.com>
To: Daniel Palmer <daniel@...f.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [linux-chenxing:mstar_v5_14_rebase 128/352]
drivers/phy/phy-msc313-usb.c:199:2: warning: ignoring return value of
'regulator_enable' declared with attribute 'warn_unused_result'
tree: git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase
head: 651efd0e52f225e60faa8b30f9768021e2104d3c
commit: 0bf5e94a6db2b88cfa3e5ac8ed9c2c237f6c03c9 [128/352] phy: msc313: usb: add vbus support
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/linux-chenxing/linux/commit/0bf5e94a6db2b88cfa3e5ac8ed9c2c237f6c03c9
git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags linux-chenxing mstar_v5_14_rebase
git checkout 0bf5e94a6db2b88cfa3e5ac8ed9c2c237f6c03c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/phy/phy-msc313-usb.c: In function 'msc313_usb_phy_probe':
drivers/phy/phy-msc313-usb.c:159:3: warning: ignoring return value of 'devm_request_irq' declared with attribute 'warn_unused_result' [-Wunused-result]
159 | devm_request_irq(&pdev->dev, irq, msc313_usb_phy_irq, IRQF_SHARED,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160 | dev_name(&pdev->dev), msc313_usb_phy);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/phy/phy-msc313-usb.c:199:2: warning: ignoring return value of 'regulator_enable' declared with attribute 'warn_unused_result' [-Wunused-result]
199 | regulator_enable(msc313_usb_phy->vbus);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/phy/phy-msc313-usb.c:15:
At top level:
include/linux/usb/mstar_utmi.h:80:25: warning: 'mstar_utmi_pwrctrl_pwrdwn_field' defined but not used [-Wunused-variable]
80 | static struct reg_field mstar_utmi_pwrctrl_pwrdwn_field = REG_FIELD(REG_PWRCTRL, PWRCTRL_REG_PDN, PWRCTRL_REG_PDN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +199 drivers/phy/phy-msc313-usb.c
104
105 static int msc313_usb_phy_probe(struct platform_device *pdev)
106 {
107 struct device *dev = &pdev->dev;
108 struct phy_provider *phy_provider;
109 struct msc313_usb_phy *msc313_usb_phy;
110 int i, irq;
111 bool swap;
112
113 msc313_usb_phy = devm_kzalloc(dev, sizeof(*msc313_usb_phy), GFP_KERNEL);
114 if (!msc313_usb_phy)
115 return -ENOMEM;
116
117 msc313_usb_phy->dev = dev;
118
119 msc313_usb_phy->utmi = syscon_regmap_lookup_by_phandle(dev->of_node, "mstar,utmi");
120 if(IS_ERR(msc313_usb_phy->utmi)){
121 return PTR_ERR(msc313_usb_phy->utmi);
122 }
123
124 msc313_usb_phy->usbc = syscon_regmap_lookup_by_phandle(dev->of_node, "mstar,usbc");
125 if (IS_ERR(msc313_usb_phy->usbc))
126 return PTR_ERR(msc313_usb_phy->usbc);
127
128 irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
129 if (!irq){
130 dev_warn(&pdev->dev, "no interrupt provided");
131 }
132
133 // hack for m5, these seem to be the reset values for i3
134 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_RSTCTRL,
135 0x228);
136 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_PLL_TEST1,
137 0x2088);
138 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_PLL_TEST0,
139 0x8051);
140 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_CONFIG,
141 0x2084);
142
143 //FIXME for some reason this doesn't update the registers.
144 // some voodoo that is enabled for the msc313 in the vendor sdk
145 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG0,
146 0x0);
147 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG1,
148 0xffff);
149 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG2,
150 BIT(8) | 0xff);
151
152 // clear any existing interrupts and then enable
153 // the interrupt
154 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_INTEN,
155 MSTAR_USBC_INT_MASK);
156 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_INTSTS,
157 MSTAR_USBC_INT_MASK);
158 if(irq){
159 devm_request_irq(&pdev->dev, irq, msc313_usb_phy_irq, IRQF_SHARED,
160 dev_name(&pdev->dev), msc313_usb_phy);
161 }
162
163 // power up hacks
164 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x0c2f);
165 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x040f);
166 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x7f05);
167
168 msc313_usb_phy_switch_port(msc313_usb_phy);
169
170 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x0426);
171 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x6bc3);
172 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x69c3);
173 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x0001);
174
175 regmap_write(msc313_usb_phy->utmi, REG_EYESETTING1, 0x0210);
176 regmap_write(msc313_usb_phy->utmi, REG_EYESETTING2, 0x8100);
177
178
179 msc313_usb_phy_do_calibration(msc313_usb_phy);
180
181 swap = of_property_read_bool(dev->of_node, "mstar,utmi-dxswap");
182
183 if(swap)
184 dev_info(dev, "enabling data line swap");
185 regmap_update_bits(msc313_usb_phy->utmi, MSTAR_UTMI_REG_CLKINV,
186 MSTAR_UTMI_REG_CLKINV_DPDNSWP, swap ? MSTAR_UTMI_REG_CLKINV_DPDNSWP : 0);
187
188 //regmap_update_bits(msc313_usb_phy->regmap, REG_PWRCTRL, PWRCTRL_UPLL_PDN, 0);
189
190 for(i = 0; i < NUM_PORTS; i++){
191 msc313_usb_phy->ports[i] = devm_phy_create(dev, NULL, &msc313_usb_phy_ops);
192 if (IS_ERR(msc313_usb_phy->ports[i])) {
193 return PTR_ERR(msc313_usb_phy->ports[i]);
194 }
195 phy_set_drvdata(msc313_usb_phy->ports[i], msc313_usb_phy);
196 }
197
198 msc313_usb_phy->vbus = devm_regulator_get(dev, "vbus");
> 199 regulator_enable(msc313_usb_phy->vbus);
200
201 dev_set_drvdata(dev, msc313_usb_phy);
202
203 phy_provider = devm_of_phy_provider_register(&pdev->dev,
204 msc313_usb_phy_xlate);
205 return PTR_ERR_OR_ZERO(phy_provider);
206 }
207
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (78737 bytes)
Powered by blists - more mailing lists