lkml.org 
[lkml]   [2021]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[linux-chenxing:mstar_v5_14_rebase 127/352] drivers/phy/phy-msc313-usb.c:157:3: warning: ignoring return value of 'devm_request_irq' declared with attribute 'warn_unused_result'
tree:   git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase
head: 651efd0e52f225e60faa8b30f9768021e2104d3c
commit: 9ee3ebbbe6937e1aa664962e61484a9dc6ed2523 [127/352] ARM:mstar: usb phy
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/9ee3ebbbe6937e1aa664962e61484a9dc6ed2523
git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags linux-chenxing mstar_v5_14_rebase
git checkout 9ee3ebbbe6937e1aa664962e61484a9dc6ed2523
# 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@intel.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:157:3: warning: ignoring return value of 'devm_request_irq' declared with attribute 'warn_unused_result' [-Wunused-result]
157 | devm_request_irq(&pdev->dev, irq, msc313_usb_phy_irq, IRQF_SHARED,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158 | dev_name(&pdev->dev), msc313_usb_phy);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 +157 drivers/phy/phy-msc313-usb.c

102
103 static int msc313_usb_phy_probe(struct platform_device *pdev)
104 {
105 struct device *dev = &pdev->dev;
106 struct phy_provider *phy_provider;
107 struct msc313_usb_phy *msc313_usb_phy;
108 int i, irq;
109 bool swap;
110
111 msc313_usb_phy = devm_kzalloc(dev, sizeof(*msc313_usb_phy), GFP_KERNEL);
112 if (!msc313_usb_phy)
113 return -ENOMEM;
114
115 msc313_usb_phy->dev = dev;
116
117 msc313_usb_phy->utmi = syscon_regmap_lookup_by_phandle(dev->of_node, "mstar,utmi");
118 if(IS_ERR(msc313_usb_phy->utmi)){
119 return PTR_ERR(msc313_usb_phy->utmi);
120 }
121
122 msc313_usb_phy->usbc = syscon_regmap_lookup_by_phandle(dev->of_node, "mstar,usbc");
123 if (IS_ERR(msc313_usb_phy->usbc))
124 return PTR_ERR(msc313_usb_phy->usbc);
125
126 irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
127 if (!irq){
128 dev_warn(&pdev->dev, "no interrupt provided");
129 }
130
131 // hack for m5, these seem to be the reset values for i3
132 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_RSTCTRL,
133 0x228);
134 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_PLL_TEST1,
135 0x2088);
136 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_PLL_TEST0,
137 0x8051);
138 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_CONFIG,
139 0x2084);
140
141 //FIXME for some reason this doesn't update the registers.
142 // some voodoo that is enabled for the msc313 in the vendor sdk
143 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG0,
144 0x0);
145 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG1,
146 0xffff);
147 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG2,
148 BIT(8) | 0xff);
149
150 // clear any existing interrupts and then enable
151 // the interrupt
152 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_INTEN,
153 MSTAR_USBC_INT_MASK);
154 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_INTSTS,
155 MSTAR_USBC_INT_MASK);
156 if(irq){
> 157 devm_request_irq(&pdev->dev, irq, msc313_usb_phy_irq, IRQF_SHARED,
158 dev_name(&pdev->dev), msc313_usb_phy);
159 }
160
161 // power up hacks
162 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x0c2f);
163 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x040f);
164 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x7f05);
165
166 msc313_usb_phy_switch_port(msc313_usb_phy);
167
168 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x0426);
169 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x6bc3);
170 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x69c3);
171 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x0001);
172
173 regmap_write(msc313_usb_phy->utmi, REG_EYESETTING1, 0x0210);
174 regmap_write(msc313_usb_phy->utmi, REG_EYESETTING2, 0x8100);
175
176
177 msc313_usb_phy_do_calibration(msc313_usb_phy);
178
179 swap = of_property_read_bool(dev->of_node, "mstar,utmi-dxswap");
180
181 if(swap)
182 dev_info(dev, "enabling data line swap");
183 regmap_update_bits(msc313_usb_phy->utmi, MSTAR_UTMI_REG_CLKINV,
184 MSTAR_UTMI_REG_CLKINV_DPDNSWP, swap ? MSTAR_UTMI_REG_CLKINV_DPDNSWP : 0);
185
186 //regmap_update_bits(msc313_usb_phy->regmap, REG_PWRCTRL, PWRCTRL_UPLL_PDN, 0);
187
188 for(i = 0; i < NUM_PORTS; i++){
189 msc313_usb_phy->ports[i] = devm_phy_create(dev, NULL, &msc313_usb_phy_ops);
190 if (IS_ERR(msc313_usb_phy->ports[i])) {
191 return PTR_ERR(msc313_usb_phy->ports[i]);
192 }
193 phy_set_drvdata(msc313_usb_phy->ports[i], msc313_usb_phy);
194 }
195
196 dev_set_drvdata(dev, msc313_usb_phy);
197
198 phy_provider = devm_of_phy_provider_register(&pdev->dev,
199 msc313_usb_phy_xlate);
200 return PTR_ERR_OR_ZERO(phy_provider);
201 }
202

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-07-20 08:13    [W:0.060 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site