[arm-tegra:for-5.10/soc 6/6] drivers/soc/tegra/pmc.c:3378:27: warning: unused variable 'tegra234_reset_sources'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git for-5.10/soc
head: c83a88ee760240356bc6789de5b8f6495a774612
commit: c83a88ee760240356bc6789de5b8f6495a774612 [6/6] soc/tegra: pmc: Add Tegra234 support
config: arm-randconfig-r013-20200917 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1321160a26e7e489baf9b10d6de90a342f898960)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout c83a88ee760240356bc6789de5b8f6495a774612
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/soc/tegra/pmc.c:3378:27: warning: unused variable 'tegra234_reset_sources' [-Wunused-const-variable]
static const char * const tegra234_reset_sources[] = {
^
>> drivers/soc/tegra/pmc.c:3402:35: warning: unused variable 'tegra234_pmc_soc' [-Wunused-const-variable]
static const struct tegra_pmc_soc tegra234_pmc_soc = {
^
2 warnings generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git/c...
git remote add arm-tegra https://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git
git fetch --no-tags arm-tegra for-5.10/soc
git checkout c83a88ee760240356bc6789de5b8f6495a774612
vim +/tegra234_reset_sources +3378 drivers/soc/tegra/pmc.c
3377
> 3378 static const char * const tegra234_reset_sources[] = {
3379 "SYS_RESET_N",
3380 "AOWDT",
3381 "BCCPLEXWDT",
3382 "BPMPWDT",
3383 "SCEWDT",
3384 "SPEWDT",
3385 "APEWDT",
3386 "LCCPLEXWDT",
3387 "SENSOR",
3388 "AOTAG",
3389 "VFSENSOR",
3390 "MAINSWRST",
3391 "SC7",
3392 "HSM",
3393 "CSITE",
3394 "RCEWDT",
3395 "PVA0WDT",
3396 "PVA1WDT",
3397 "L1A_ASYNC",
3398 "BPMPBOOT",
3399 "FUSECRC",
3400 };
3401
> 3402 static const struct tegra_pmc_soc tegra234_pmc_soc = {
3403 .num_powergates = 0,
3404 .powergates = NULL,
3405 .num_cpu_powergates = 0,
3406 .cpu_powergates = NULL,
3407 .has_tsense_reset = false,
3408 .has_gpu_clamps = false,
3409 .needs_mbist_war = false,
3410 .has_impl_33v_pwr = true,
3411 .maybe_tz_only = false,
3412 .num_io_pads = 0,
3413 .io_pads = NULL,
3414 .num_pin_descs = 0,
3415 .pin_descs = NULL,
3416 .regs = &tegra234_pmc_regs,
3417 .init = NULL,
3418 .setup_irq_polarity = tegra186_pmc_setup_irq_polarity,
3419 .irq_set_wake = tegra186_pmc_irq_set_wake,
3420 .irq_set_type = tegra186_pmc_irq_set_type,
3421 .reset_sources = tegra194_reset_sources,
3422 .num_reset_sources = ARRAY_SIZE(tegra194_reset_sources),
3423 .reset_levels = tegra186_reset_levels,
3424 .num_reset_levels = ARRAY_SIZE(tegra186_reset_levels),
3425 .num_wake_events = 0,
3426 .wake_events = NULL,
3427 .pmc_clks_data = NULL,
3428 .num_pmc_clks = 0,
3429 .has_blink_output = false,
3430 };
3431
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-next:master 3015/8629] drivers/net/mdio/mdio-bcm-unimac.c:181: undefined reference to `mdiobus_read'
by kernel test robot
Hi Andrew,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 860461e4fcaa76200d2d1a53523e0ff7be92e6e8
commit: a9770eac511ad82390b9f4a3c1728e078c387ac7 [3015/8629] net: mdio: Move MDIO drivers into a new subdirectory
config: h8300-randconfig-r011-20200917 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.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
git checkout a9770eac511ad82390b9f4a3c1728e078c387ac7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
h8300-linux-ld: drivers/net/phy/mdio_devres.o: in function `devm_mdiobus_free':
drivers/net/phy/mdio_devres.c:16: undefined reference to `mdiobus_free'
h8300-linux-ld: drivers/net/phy/mdio_devres.o: in function `devm_mdiobus_unregister':
drivers/net/phy/mdio_devres.c:53: undefined reference to `mdiobus_unregister'
h8300-linux-ld: drivers/net/phy/mdio_devres.o: in function `devm_of_mdiobus_register':
drivers/net/phy/mdio_devres.c:120: undefined reference to `of_mdiobus_register'
h8300-linux-ld: drivers/net/phy/mdio_devres.o: in function `devm_mdiobus_alloc_size':
drivers/net/phy/mdio_devres.c:38: undefined reference to `mdiobus_alloc_size'
h8300-linux-ld: drivers/net/phy/mdio_devres.o: in function `__devm_mdiobus_register':
drivers/net/phy/mdio_devres.c:87: undefined reference to `__mdiobus_register'
h8300-linux-ld: drivers/net/mdio/mdio-bcm-unimac.o: in function `unimac_mdio_reset':
>> drivers/net/mdio/mdio-bcm-unimac.c:181: undefined reference to `mdiobus_read'
h8300-linux-ld: drivers/net/mdio/mdio-bcm-unimac.o: in function `unimac_mdio_remove':
>> drivers/net/mdio/mdio-bcm-unimac.c:305: undefined reference to `mdiobus_unregister'
>> h8300-linux-ld: drivers/net/mdio/mdio-bcm-unimac.c:306: undefined reference to `mdiobus_free'
h8300-linux-ld: drivers/net/mdio/mdio-bcm-unimac.o: in function `mdiobus_alloc':
include/linux/phy.h:320: undefined reference to `mdiobus_alloc_size'
h8300-linux-ld: drivers/net/mdio/mdio-bcm-unimac.o: in function `unimac_mdio_probe':
>> drivers/net/mdio/mdio-bcm-unimac.c:282: undefined reference to `of_mdiobus_register'
h8300-linux-ld: drivers/net/mdio/mdio-bcm-unimac.c:295: undefined reference to `mdiobus_free'
h8300-linux-ld: drivers/net/mdio/mdio-bitbang.o: in function `mdiobus_alloc':
include/linux/phy.h:320: undefined reference to `mdiobus_alloc_size'
h8300-linux-ld: drivers/net/mdio/mdio-bitbang.o: in function `free_mdio_bitbang':
>> drivers/net/mdio/mdio-bitbang.c:228: undefined reference to `mdiobus_free'
h8300-linux-ld: drivers/net/mdio/mdio-mvusb.o: in function `mvusb_mdio_disconnect':
>> drivers/net/mdio/mdio-mvusb.c:104: undefined reference to `mdiobus_unregister'
h8300-linux-ld: drivers/net/mdio/mdio-mvusb.o: in function `mvusb_mdio_probe':
>> drivers/net/mdio/mdio-mvusb.c:96: undefined reference to `of_mdiobus_register'
h8300-linux-ld: drivers/net/pcs/pcs-xpcs.o: in function `xpcs_read':
drivers/net/pcs/pcs-xpcs.c:151: undefined reference to `mdiobus_read'
h8300-linux-ld: drivers/net/pcs/pcs-xpcs.o: in function `xpcs_write':
drivers/net/pcs/pcs-xpcs.c:158: undefined reference to `mdiobus_write'
h8300-linux-ld: drivers/net/pcs/pcs-xpcs.c:158: undefined reference to `mdiobus_write'
h8300-linux-ld: drivers/net/pcs/pcs-xpcs.c:158: undefined reference to `mdiobus_write'
h8300-linux-ld: drivers/net/pcs/pcs-xpcs.c:158: undefined reference to `mdiobus_write'
h8300-linux-ld: drivers/net/pcs/pcs-xpcs.c:158: undefined reference to `mdiobus_write'
h8300-linux-ld: drivers/net/pcs/pcs-xpcs.o:drivers/net/pcs/pcs-xpcs.c:158: more undefined references to `mdiobus_write' follow
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout a9770eac511ad82390b9f4a3c1728e078c387ac7
vim +181 drivers/net/mdio/mdio-bcm-unimac.c
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 143
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 144 /* Workaround for integrated BCM7xxx Gigabit PHYs which have a problem with
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 145 * their internal MDIO management controller making them fail to successfully
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 146 * be read from or written to for the first transaction. We insert a dummy
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 147 * BMSR read here to make sure that phy_get_device() and get_phy_id() can
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 148 * correctly read the PHY MII_PHYSID1/2 registers and successfully register a
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 149 * PHY device for this peripheral.
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 150 *
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 151 * Once the PHY driver is registered, we can workaround subsequent reads from
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 152 * there (e.g: during system-wide power management).
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 153 *
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 154 * bus->reset is invoked before mdiobus_scan during mdiobus_register and is
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 155 * therefore the right location to stick that workaround. Since we do not want
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 156 * to read from non-existing PHYs, we either use bus->phy_mask or do a manual
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 157 * Device Tree scan to limit the search area.
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 158 */
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 159 static int unimac_mdio_reset(struct mii_bus *bus)
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 160 {
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 161 struct device_node *np = bus->dev.of_node;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 162 struct device_node *child;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 163 u32 read_mask = 0;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 164 int addr;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 165
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 166 if (!np) {
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 167 read_mask = ~bus->phy_mask;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 168 } else {
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 169 for_each_available_child_of_node(np, child) {
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 170 addr = of_mdio_parse_addr(&bus->dev, child);
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 171 if (addr < 0)
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 172 continue;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 173
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 174 read_mask |= 1 << addr;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 175 }
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 176 }
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 177
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 178 for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
e23597f7524ba11 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 179 if (read_mask & 1 << addr) {
e23597f7524ba11 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 180 dev_dbg(&bus->dev, "Workaround for PHY @ %d\n", addr);
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 @181 mdiobus_read(bus, addr, MII_BMSR);
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 182 }
e23597f7524ba11 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 183 }
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 184
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 185 return 0;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 186 }
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 187
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 188 static void unimac_mdio_clk_set(struct unimac_mdio_priv *priv)
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 189 {
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 190 unsigned long rate;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 191 u32 reg, div;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 192
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 193 /* Keep the hardware default values */
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 194 if (!priv->clk_freq)
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 195 return;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 196
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 197 if (!priv->clk)
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 198 rate = 250000000;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 199 else
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 200 rate = clk_get_rate(priv->clk);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 201
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 202 div = (rate / (2 * priv->clk_freq)) - 1;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 203 if (div & ~MDIO_CLK_DIV_MASK) {
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 204 pr_warn("Incorrect MDIO clock frequency, ignoring\n");
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 205 return;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 206 }
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 207
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 208 /* The MDIO clock is the reference clock (typicaly 250Mhz) divided by
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 209 * 2 x (MDIO_CLK_DIV + 1)
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 210 */
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 211 reg = unimac_mdio_readl(priv, MDIO_CFG);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 212 reg &= ~(MDIO_CLK_DIV_MASK << MDIO_CLK_DIV_SHIFT);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 213 reg |= div << MDIO_CLK_DIV_SHIFT;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 214 unimac_mdio_writel(priv, reg, MDIO_CFG);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 215 }
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 216
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 217 static int unimac_mdio_probe(struct platform_device *pdev)
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 218 {
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 219 struct unimac_mdio_pdata *pdata = pdev->dev.platform_data;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 220 struct unimac_mdio_priv *priv;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 221 struct device_node *np;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 222 struct mii_bus *bus;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 223 struct resource *r;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 224 int ret;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 225
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 226 np = pdev->dev.of_node;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 227
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 228 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 229 if (!priv)
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 230 return -ENOMEM;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 231
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 232 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
297a6961ffb8ff4 drivers/net/phy/mdio-bcm-unimac.c Wei Yongjun 2018-01-11 233 if (!r)
297a6961ffb8ff4 drivers/net/phy/mdio-bcm-unimac.c Wei Yongjun 2018-01-11 234 return -EINVAL;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 235
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 236 /* Just ioremap, as this MDIO block is usually integrated into an
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 237 * Ethernet MAC controller register range
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 238 */
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 239 priv->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 240 if (!priv->base) {
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 241 dev_err(&pdev->dev, "failed to remap register\n");
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 242 return -ENOMEM;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 243 }
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 244
c312c7818b86b66 drivers/net/phy/mdio-bcm-unimac.c Andre Przywara 2020-03-24 245 priv->clk = devm_clk_get_optional(&pdev->dev, NULL);
c312c7818b86b66 drivers/net/phy/mdio-bcm-unimac.c Andre Przywara 2020-03-24 246 if (IS_ERR(priv->clk))
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 247 return PTR_ERR(priv->clk);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 248
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 249 ret = clk_prepare_enable(priv->clk);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 250 if (ret)
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 251 return ret;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 252
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 253 if (of_property_read_u32(np, "clock-frequency", &priv->clk_freq))
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 254 priv->clk_freq = 0;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 255
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 256 unimac_mdio_clk_set(priv);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 257
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 258 priv->mii_bus = mdiobus_alloc();
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 259 if (!priv->mii_bus) {
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 260 ret = -ENOMEM;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 261 goto out_clk_disable;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 262 }
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 263
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 264 bus = priv->mii_bus;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 265 bus->priv = priv;
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 266 if (pdata) {
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 267 bus->name = pdata->bus_name;
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 268 priv->wait_func = pdata->wait_func;
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 269 priv->wait_func_data = pdata->wait_func_data;
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 270 bus->phy_mask = ~pdata->phy_mask;
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 271 } else {
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 272 bus->name = "unimac MII bus";
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 273 priv->wait_func_data = priv;
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 274 priv->wait_func = unimac_mdio_poll;
f248aff86d1fd6e drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 275 }
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 276 bus->parent = &pdev->dev;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 277 bus->read = unimac_mdio_read;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 278 bus->write = unimac_mdio_write;
d8e704e461c2179 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2015-06-26 279 bus->reset = unimac_mdio_reset;
d782f7c935123ad drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2017-07-31 280 snprintf(bus->id, MII_BUS_ID_SIZE, "%s-%d", pdev->name, pdev->id);
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 281
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 @282 ret = of_mdiobus_register(bus, np);
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 283 if (ret) {
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 284 dev_err(&pdev->dev, "MDIO bus registration failed\n");
e7f4dc3536a4009 drivers/net/phy/mdio-bcm-unimac.c Andrew Lunn 2016-01-06 285 goto out_mdio_free;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 286 }
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 287
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 288 platform_set_drvdata(pdev, priv);
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 289
647aed232a7cda6 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2019-03-20 290 dev_info(&pdev->dev, "Broadcom UniMAC MDIO bus\n");
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 291
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 292 return 0;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 293
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 294 out_mdio_free:
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 295 mdiobus_free(bus);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 296 out_clk_disable:
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 297 clk_disable_unprepare(priv->clk);
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 298 return ret;
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 299 }
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 300
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 301 static int unimac_mdio_remove(struct platform_device *pdev)
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 302 {
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 303 struct unimac_mdio_priv *priv = platform_get_drvdata(pdev);
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 304
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 @305 mdiobus_unregister(priv->mii_bus);
2ba1b163c9d5d71 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2014-08-27 @306 mdiobus_free(priv->mii_bus);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 307 clk_disable_unprepare(priv->clk);
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 308
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 309 return 0;
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 310 }
b78ac6ecd1b6b46 drivers/net/phy/mdio-bcm-unimac.c Florian Fainelli 2018-09-20 311
:::::: The code at line 181 was first introduced by commit
:::::: d8e704e461c217918cf236f49276e469580afbef net: phy: mdio-bcm-unimac: workaround initial read failures for integrated PHYs
:::::: TO: Florian Fainelli <f.fainelli(a)gmail.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v5 4/5] ASoC: qcom: Add support for lpass hdmi driver
by kernel test robot
Hi Srinivasa,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on next-20200917]
[cannot apply to v5.9-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Srinivasa-Rao-Mandadapu/Qualcomm...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: riscv-randconfig-r031-20200917 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1321160a26e7e489baf9b10d6de90a342f898960)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:564:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inw(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:55:76: note: expanded from macro 'inw'
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:58:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:1017:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> sound/soc/qcom/lpass-ipq806x.c:160:23: error: incompatible function pointer types initializing 'int (*)(struct lpass_data *, int, unsigned int)' with an expression of type 'int (struct lpass_data *, int)' [-Werror,-Wincompatible-function-pointer-types]
.alloc_dma_channel = ipq806x_lpass_alloc_dma_channel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/lpass-ipq806x.c:161:22: error: incompatible function pointer types initializing 'int (*)(struct lpass_data *, int, unsigned int)' with an expression of type 'int (struct lpass_data *, int)' [-Werror,-Wincompatible-function-pointer-types]
.free_dma_channel = ipq806x_lpass_free_dma_channel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 warnings and 2 errors generated.
--
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:564:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inw(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:55:76: note: expanded from macro 'inw'
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:58:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:1017:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> sound/soc/qcom/lpass-apq8016.c:290:23: error: incompatible function pointer types initializing 'int (*)(struct lpass_data *, int, unsigned int)' with an expression of type 'int (struct lpass_data *, int)' [-Werror,-Wincompatible-function-pointer-types]
.alloc_dma_channel = apq8016_lpass_alloc_dma_channel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/lpass-apq8016.c:291:22: error: incompatible function pointer types initializing 'int (*)(struct lpass_data *, int, unsigned int)' with an expression of type 'int (struct lpass_data *, int)' [-Werror,-Wincompatible-function-pointer-types]
.free_dma_channel = apq8016_lpass_free_dma_channel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 warnings and 2 errors generated.
# https://github.com/0day-ci/linux/commit/36d10d78e631aecf445a62288278056d4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Srinivasa-Rao-Mandadapu/Qualcomm-s-lpass-hdmi-ASoC-driver-to-support-audio-over-dp-port/20200917-214328
git checkout 36d10d78e631aecf445a62288278056d499bbee2
vim +160 sound/soc/qcom/lpass-ipq806x.c
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 111
eccad574ef2d74e Lars-Peter Clausen 2015-07-27 112 static struct lpass_variant ipq806x_data = {
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 113 .i2sctrl_reg_base = 0x0010,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 114 .i2sctrl_reg_stride = 0x04,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 115 .i2s_ports = 5,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 116 .irq_reg_base = 0x3000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 117 .irq_reg_stride = 0x1000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 118 .irq_ports = 3,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 119 .rdma_reg_base = 0x6000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 120 .rdma_reg_stride = 0x1000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 121 .rdma_channels = 4,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 122 .wrdma_reg_base = 0xB000,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 123 .wrdma_reg_stride = 0x1000,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 124 .wrdma_channel_start = 5,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 125 .wrdma_channels = 4,
b5022a36d28f6a9 Rohit kumar 2020-08-14 126 .loopback = REG_FIELD_ID(0x0010, 15, 15, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 127 .spken = REG_FIELD_ID(0x0010, 14, 14, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 128 .spkmode = REG_FIELD_ID(0x0010, 10, 13, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 129 .spkmono = REG_FIELD_ID(0x0010, 9, 9, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 130 .micen = REG_FIELD_ID(0x0010, 8, 8, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 131 .micmode = REG_FIELD_ID(0x0010, 4, 7, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 132 .micmono = REG_FIELD_ID(0x0010, 3, 3, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 133 .wssrc = REG_FIELD_ID(0x0010, 2, 2, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 134 .bitwidth = REG_FIELD_ID(0x0010, 0, 0, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 135
b5022a36d28f6a9 Rohit kumar 2020-08-14 136 .rdma_dyncclk = REG_FIELD_ID(0x6000, 12, 12, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 137 .rdma_bursten = REG_FIELD_ID(0x6000, 11, 11, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 138 .rdma_wpscnt = REG_FIELD_ID(0x6000, 8, 10, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 139 .rdma_intf = REG_FIELD_ID(0x6000, 4, 7, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 140 .rdma_fifowm = REG_FIELD_ID(0x6000, 1, 3, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 141 .rdma_enable = REG_FIELD_ID(0x6000, 0, 0, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 142
b5022a36d28f6a9 Rohit kumar 2020-08-14 143 .wrdma_dyncclk = REG_FIELD_ID(0xB000, 12, 12, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 144 .wrdma_bursten = REG_FIELD_ID(0xB000, 11, 11, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 145 .wrdma_wpscnt = REG_FIELD_ID(0xB000, 8, 10, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 146 .wrdma_intf = REG_FIELD_ID(0xB000, 4, 7, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 147 .wrdma_fifowm = REG_FIELD_ID(0xB000, 1, 3, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 148 .wrdma_enable = REG_FIELD_ID(0xB000, 0, 0, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 149
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 150 .dai_driver = &ipq806x_lpass_cpu_dai_driver,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 151 .num_dai = 1,
97c52eb969718f0 Linus Walleij 2017-04-05 152 .dai_osr_clk_names = (const char *[]) {
97c52eb969718f0 Linus Walleij 2017-04-05 153 "mi2s-osr-clk",
97c52eb969718f0 Linus Walleij 2017-04-05 154 },
97c52eb969718f0 Linus Walleij 2017-04-05 155 .dai_bit_clk_names = (const char *[]) {
97c52eb969718f0 Linus Walleij 2017-04-05 156 "mi2s-bit-clk",
97c52eb969718f0 Linus Walleij 2017-04-05 157 },
a503567d70eca91 Rohit kumar 2020-08-14 158 .init = ipq806x_lpass_init,
a503567d70eca91 Rohit kumar 2020-08-14 159 .exit = ipq806x_lpass_exit,
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 @160 .alloc_dma_channel = ipq806x_lpass_alloc_dma_channel,
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 161 .free_dma_channel = ipq806x_lpass_free_dma_channel,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 162 };
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 163
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v5] nl80211/cfg80211: support 6 GHz scanning
by kernel test robot
Hi Johannes,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mac80211-next/master]
[also build test WARNING on mac80211/master v5.9-rc5 next-20200917]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Johannes-Berg/nl80211-cfg80211-s...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: sparc64-randconfig-s032-20200917 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/wireless/scan.c:750:65: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct cfg80211_bss_ies const *ies @@ got struct cfg80211_bss_ies const [noderef] __rcu *ies @@
>> net/wireless/scan.c:750:65: sparse: expected struct cfg80211_bss_ies const *ies
>> net/wireless/scan.c:750:65: sparse: got struct cfg80211_bss_ies const [noderef] __rcu *ies
# https://github.com/0day-ci/linux/commit/719d2dd7e36af813d8445a92a29e43b89...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Johannes-Berg/nl80211-cfg80211-support-6-GHz-scanning/20200917-222339
git checkout 719d2dd7e36af813d8445a92a29e43b899ab4c51
vim +750 net/wireless/scan.c
720
721 static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
722 {
723 u8 i;
724 struct cfg80211_colocated_ap *ap;
725 int n_channels, count = 0, err;
726 struct cfg80211_scan_request *request, *rdev_req = rdev->scan_req;
727 LIST_HEAD(coloc_ap_list);
728 bool need_scan_psc;
729 const struct ieee80211_sband_iftype_data *iftd;
730
731 rdev_req->scan_6ghz = true;
732
733 if (!rdev->wiphy.bands[NL80211_BAND_6GHZ])
734 return -EOPNOTSUPP;
735
736 iftd = ieee80211_get_sband_iftype_data(rdev->wiphy.bands[NL80211_BAND_6GHZ],
737 rdev_req->wdev->iftype);
738 if (!iftd || !iftd->he_cap.has_he)
739 return -EOPNOTSUPP;
740
741 n_channels = rdev->wiphy.bands[NL80211_BAND_6GHZ]->n_channels;
742
743 if (rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ) {
744 struct cfg80211_internal_bss *intbss;
745
746 spin_lock_bh(&rdev->bss_lock);
747 list_for_each_entry(intbss, &rdev->bss_list, list) {
748 struct cfg80211_bss *res = &intbss->pub;
749
> 750 count += cfg80211_parse_colocated_ap(res->ies,
751 &coloc_ap_list);
752 }
753 spin_unlock_bh(&rdev->bss_lock);
754 }
755
756 request = kzalloc(struct_size(request, channels, n_channels) +
757 sizeof(*request->scan_6ghz_params) * count,
758 GFP_KERNEL);
759 if (!request) {
760 cfg80211_free_coloc_ap_list(&coloc_ap_list);
761 return -ENOMEM;
762 }
763
764 *request = *rdev_req;
765 request->n_channels = 0;
766 request->scan_6ghz_params =
767 (void *)&request->channels[n_channels];
768
769 /*
770 * PSC channels should not be scanned if all the reported co-located APs
771 * are indicating that all APs in the same ESS are co-located
772 */
773 if (count) {
774 need_scan_psc = false;
775
776 list_for_each_entry(ap, &coloc_ap_list, list) {
777 if (!ap->colocated_ess) {
778 need_scan_psc = true;
779 break;
780 }
781 }
782 } else {
783 need_scan_psc = true;
784 }
785
786 /*
787 * add to the scan request the channels that need to be scanned
788 * regardless of the collocated APs (PSC channels or all channels
789 * in case that NL80211_SCAN_FLAG_COLOCATED_6GHZ is not set)
790 */
791 for (i = 0; i < rdev_req->n_channels; i++) {
792 if (rdev_req->channels[i]->band == NL80211_BAND_6GHZ &&
793 ((need_scan_psc &&
794 cfg80211_channel_is_psc(rdev_req->channels[i])) ||
795 !(rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ))) {
796 cfg80211_scan_req_add_chan(request,
797 rdev_req->channels[i],
798 false);
799 }
800 }
801
802 if (!(rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ))
803 goto skip;
804
805 list_for_each_entry(ap, &coloc_ap_list, list) {
806 bool found = false;
807 struct cfg80211_scan_6ghz_params *scan_6ghz_params =
808 &request->scan_6ghz_params[request->n_6ghz_params];
809 struct ieee80211_channel *chan =
810 ieee80211_get_channel(&rdev->wiphy, ap->center_freq);
811
812 if (!chan || chan->flags & IEEE80211_CHAN_DISABLED)
813 continue;
814
815 for (i = 0; i < rdev_req->n_channels; i++) {
816 if (rdev_req->channels[i] == chan)
817 found = true;
818 }
819
820 if (!found)
821 continue;
822
823 if (request->n_ssids > 0 &&
824 !cfg80211_find_ssid_match(ap, request))
825 continue;
826
827 cfg80211_scan_req_add_chan(request, chan, true);
828 memcpy(scan_6ghz_params->bssid, ap->bssid, ETH_ALEN);
829 scan_6ghz_params->short_ssid = ap->short_ssid;
830 scan_6ghz_params->short_ssid_valid = ap->short_ssid_valid;
831 scan_6ghz_params->unsolicited_probe = ap->unsolicited_probe;
832
833 /*
834 * If a PSC channel is added to the scan and 'need_scan_psc' is
835 * set to false, then all the APs that the scan logic is
836 * interested with on the channel are collocated and thus there
837 * is no need to perform the initial PSC channel listen.
838 */
839 if (cfg80211_channel_is_psc(chan) && !need_scan_psc)
840 scan_6ghz_params->psc_no_listen = true;
841
842 request->n_6ghz_params++;
843 }
844
845 skip:
846 cfg80211_free_coloc_ap_list(&coloc_ap_list);
847
848 if (request->n_channels) {
849 struct cfg80211_scan_request *old = rdev->int_scan_req;
850
851 rdev->int_scan_req = request;
852
853 /*
854 * If this scan follows a previous scan, save the scan start
855 * info from the first part of the scan
856 */
857 if (old)
858 rdev->int_scan_req->info = old->info;
859
860 err = rdev_scan(rdev, request);
861 if (err) {
862 rdev->int_scan_req = old;
863 kfree(request);
864 } else {
865 kfree(old);
866 }
867
868 return err;
869 }
870
871 kfree(request);
872 return -EINVAL;
873 }
874
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v2] sched/deadline: Fix sched_dl_global_validate()
by kernel test robot
Hi Peng,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/sched/core]
[also build test ERROR on tip/master linux/master linus/master v5.9-rc5 next-20200917]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Peng-Liu/sched-deadline-Fix-sche...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 848785df48835eefebe0c4eb5da7690690b0a8b7
config: x86_64-randconfig-s021-20200917 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:22,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from kernel/sched/sched.h:5,
from kernel/sched/deadline.c:18:
kernel/sched/deadline.c: In function 'sched_dl_do_global':
>> kernel/sched/deadline.c:2595:20: error: 'possible_mask' undeclared (first use in this function); did you mean 'cpu_possible_mask'?
2595 | for_each_cpu(cpu, possible_mask) {
| ^~~~~~~~~~~~~
include/linux/cpumask.h:203:44: note: in definition of macro 'for_each_cpu'
203 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
| ^~~~
kernel/sched/deadline.c:2595:20: note: each undeclared identifier is reported only once for each function it appears in
2595 | for_each_cpu(cpu, possible_mask) {
| ^~~~~~~~~~~~~
include/linux/cpumask.h:203:44: note: in definition of macro 'for_each_cpu'
203 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
| ^~~~
# https://github.com/0day-ci/linux/commit/34a03e474224b29097a1b94a766d6a8eb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Peng-Liu/sched-deadline-Fix-sched_dl_global_validate/20200918-004123
git checkout 34a03e474224b29097a1b94a766d6a8eb3f7c4e6
vim +2595 kernel/sched/deadline.c
2584
2585 def_dl_bandwidth.dl_period = global_rt_period();
2586 def_dl_bandwidth.dl_runtime = global_rt_runtime();
2587
2588 if (global_rt_runtime() != RUNTIME_INF)
2589 new_bw = to_ratio(global_rt_period(), global_rt_runtime());
2590
2591 #ifdef CONFIG_SMP
2592 possible_mask = &dl_local_possible_mask;
2593 cpumask_copy(possible_mask, cpu_possible_mask);
2594 #endif /* CONFIG_SMP */
> 2595 for_each_cpu(cpu, possible_mask) {
2596 rcu_read_lock_sched();
2597 dl_b = dl_bw_of(cpu);
2598
2599 raw_spin_lock_irqsave(&dl_b->lock, flags);
2600 dl_b->bw = new_bw;
2601 raw_spin_unlock_irqrestore(&dl_b->lock, flags);
2602 #ifdef CONFIG_SMP
2603 cpumask_andnot(possible_mask, possible_mask,
2604 cpu_rq(cpu)->rd->span);
2605 #endif /* CONFIG_SMP */
2606 rcu_read_unlock_sched();
2607 init_dl_rq_bw_ratio(&cpu_rq(cpu)->dl);
2608 }
2609 }
2610
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years