On Mon, Jun 18 2018, kbuild test robot wrote:

> Hi NeilBrown,
>
> Thank you for the patch! Yet something to improve:


Thank you for your testing and problem report! Yet something to improve:-)

This bug is caused by the combination CONFIG_MISDN_HFCUSB=y and CONFIG_MISDN=m
and appears to have nothing to do with my patch.
I suspect drivers/isdn/hardware/mISDN/Kconfig needs

@@ -35,6 +35,7 @@ config MISDN_HFCMULTI_8xx
 config MISDN_HFCUSB
        tristate "Support for HFC-S USB based TAs"
        depends on USB
+       depends on MISDN
        help
          Enable support for USB ISDN TAs with Cologne Chip AG's
          HFC-S USB ISDN Controller

or similar.

Thanks,
NeilBrown

(config file excerpt for Karsten:
CONFIG_MISDN=m
CONFIG_MISDN_DSP=m
CONFIG_MISDN_L1OIP=m
CONFIG_MISDN_HFCPCI=m
# CONFIG_MISDN_HFCMULTI is not set
CONFIG_MISDN_HFCUSB=y
CONFIG_MISDN_AVMFRITZ=m
CONFIG_MISDN_SPEEDFAX=m
CONFIG_MISDN_INFINEON=m
CONFIG_MISDN_W6692=m
# CONFIG_MISDN_NETJET is not set
CONFIG_MISDN_IPAC=m
CONFIG_MISDN_ISAR=m
)

>
> [auto build test ERROR on kbuild/for-next]
> [also build test ERROR on v4.18-rc1 next-20180618]
> [cannot apply to mmarek/for-next mmarek/rc-fixes]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
>
> url:    
> https://github.com/0day-ci/linux/commits/NeilBrown/kbuild-build-modules-from-code-in-multiple-directories/20180618-130250
> base:   
> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git 
> for-next
> config: x86_64-randconfig-in0-06170623 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
>
> All errors (new ones prefixed by >>):
>
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `release_hw':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1757: undefined reference to 
>>> `l1_event'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1759: undefined reference to 
>>> `mISDN_unregister_device'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1760: undefined reference to 
>>> `mISDN_freebchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.c:1761: undefined reference to 
> `mISDN_freebchannel'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1762: undefined reference to 
>>> `mISDN_freedchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `deactivate_bchannel':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1788: undefined reference to 
>>> `mISDN_clear_bchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `ph_state_te':
>    drivers/isdn/hardware/mISDN/hfcsusb.c:611: undefined reference to 
> `l1_event'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `channel_bctrl':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:808: undefined reference to 
>>> `mISDN_ctrl_bchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `tx_iso_complete':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1345: undefined reference to 
>>> `get_next_dframe'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1348: undefined reference to 
>>> `get_next_bframe'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `hfcsusb_rx_frame':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:850: undefined reference to 
>>> `bchannel_get_rxbuf'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:919: undefined reference to 
>>> `recv_Dchannel'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:921: undefined reference to 
>>> `recv_Bchannel'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:924: undefined reference to 
>>> `recv_Echannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.c:943: undefined reference to 
> `recv_Bchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `hfcusb_l2l1D':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:301: undefined reference to 
>>> `dchannel_senddata'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:305: undefined reference to 
>>> `queue_ch_frame'
>    drivers/isdn/hardware/mISDN/hfcsusb.c:360: undefined reference to 
> `l1_event'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `setup_instance':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1843: undefined reference to 
>>> `mISDN_initdchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.c:1852: undefined reference to 
> `mISDN_initdchannel'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1861: undefined reference to 
>>> `mISDN_initbchannel'
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:1887: undefined reference to 
>>> `mISDN_register_device'
>    drivers/isdn/hardware/mISDN/hfcsusb.c:1898: undefined reference to 
> `mISDN_freebchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.c:1899: undefined reference to 
> `mISDN_freebchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.c:1900: undefined reference to 
> `mISDN_freedchannel'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `hfcusb_l2l1B':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:224: undefined reference to 
>>> `bchannel_senddata'
>    drivers/isdn/hardware/mISDN/hfcsusb.o: In function `open_dchannel':
>>> drivers/isdn/hardware/mISDN/hfcsusb.c:454: undefined reference to 
>>> `create_l1'
>
> vim +1757 drivers/isdn/hardware/mISDN/hfcsusb.c
>
> 69f52adb Karsten Keil  2009-01-09  1739  
> 69f52adb Karsten Keil  2009-01-09  1740  static void
> 69f52adb Karsten Keil  2009-01-09  1741  release_hw(struct hfcsusb *hw)
> 69f52adb Karsten Keil  2009-01-09  1742  {
> 69f52adb Karsten Keil  2009-01-09  1743       if (debug & DBG_HFC_CALL_TRACE)
> 69f52adb Karsten Keil  2009-01-09  1744               printk(KERN_DEBUG "%s: 
> %s\n", hw->name, __func__);
> 69f52adb Karsten Keil  2009-01-09  1745  
> 69f52adb Karsten Keil  2009-01-09  1746       /*
> 69f52adb Karsten Keil  2009-01-09  1747        * stop all endpoints gracefully
> 69f52adb Karsten Keil  2009-01-09  1748        * TODO: mISDN_core should 
> generate CLOSE_CHANNEL
> 69f52adb Karsten Keil  2009-01-09  1749        *       signals after calling 
> mISDN_unregister_device()
> 69f52adb Karsten Keil  2009-01-09  1750        */
> 69f52adb Karsten Keil  2009-01-09  1751       hfcsusb_stop_endpoint(hw, 
> HFC_CHAN_D);
> 69f52adb Karsten Keil  2009-01-09  1752       hfcsusb_stop_endpoint(hw, 
> HFC_CHAN_B1);
> 69f52adb Karsten Keil  2009-01-09  1753       hfcsusb_stop_endpoint(hw, 
> HFC_CHAN_B2);
> 69f52adb Karsten Keil  2009-01-09  1754       if 
> (hw->fifos[HFCUSB_PCM_RX].pipe)
> 69f52adb Karsten Keil  2009-01-09  1755               
> hfcsusb_stop_endpoint(hw, HFC_CHAN_E);
> 69f52adb Karsten Keil  2009-01-09  1756       if (hw->protocol == 
> ISDN_P_TE_S0)
> 69f52adb Karsten Keil  2009-01-09 @1757               l1_event(hw->dch.l1, 
> CLOSE_CHANNEL);
> 69f52adb Karsten Keil  2009-01-09  1758  
> 69f52adb Karsten Keil  2009-01-09 @1759       
> mISDN_unregister_device(&hw->dch.dev);
> 69f52adb Karsten Keil  2009-01-09 @1760       mISDN_freebchannel(&hw->bch[1]);
> 69f52adb Karsten Keil  2009-01-09 @1761       mISDN_freebchannel(&hw->bch[0]);
> 69f52adb Karsten Keil  2009-01-09 @1762       mISDN_freedchannel(&hw->dch);
> 69f52adb Karsten Keil  2009-01-09  1763  
> 69f52adb Karsten Keil  2009-01-09  1764       if (hw->ctrl_urb) {
> 69f52adb Karsten Keil  2009-01-09  1765               
> usb_kill_urb(hw->ctrl_urb);
> 69f52adb Karsten Keil  2009-01-09  1766               
> usb_free_urb(hw->ctrl_urb);
> 69f52adb Karsten Keil  2009-01-09  1767               hw->ctrl_urb = NULL;
> 69f52adb Karsten Keil  2009-01-09  1768       }
> 69f52adb Karsten Keil  2009-01-09  1769  
> 69f52adb Karsten Keil  2009-01-09  1770       if (hw->intf)
> 69f52adb Karsten Keil  2009-01-09  1771               
> usb_set_intfdata(hw->intf, NULL);
> 69f52adb Karsten Keil  2009-01-09  1772       list_del(&hw->list);
> 69f52adb Karsten Keil  2009-01-09  1773       kfree(hw);
> 69f52adb Karsten Keil  2009-01-09  1774       hw = NULL;
> 69f52adb Karsten Keil  2009-01-09  1775  }
> 69f52adb Karsten Keil  2009-01-09  1776  
> 69f52adb Karsten Keil  2009-01-09  1777  static void
> 69f52adb Karsten Keil  2009-01-09  1778  deactivate_bchannel(struct bchannel 
> *bch)
> 69f52adb Karsten Keil  2009-01-09  1779  {
> 69f52adb Karsten Keil  2009-01-09  1780       struct hfcsusb *hw = bch->hw;
> 69f52adb Karsten Keil  2009-01-09  1781       u_long flags;
> 69f52adb Karsten Keil  2009-01-09  1782  
> 69f52adb Karsten Keil  2009-01-09  1783       if (bch->debug & DEBUG_HW)
> 69f52adb Karsten Keil  2009-01-09  1784               printk(KERN_DEBUG "%s: 
> %s: bch->nr(%i)\n",
> 69f52adb Karsten Keil  2009-01-09  1785                      hw->name, 
> __func__, bch->nr);
> 69f52adb Karsten Keil  2009-01-09  1786  
> 69f52adb Karsten Keil  2009-01-09  1787       spin_lock_irqsave(&hw->lock, 
> flags);
> fb286f04 Karsten Keil  2009-07-09 @1788       mISDN_clear_bchannel(bch);
> 69f52adb Karsten Keil  2009-01-09  1789       
> spin_unlock_irqrestore(&hw->lock, flags);
> 69f52adb Karsten Keil  2009-01-09  1790       hfcsusb_setup_bch(bch, 
> ISDN_P_NONE);
> 37952cfa Martin Bachem 2012-05-15  1791       hfcsusb_stop_endpoint(hw, 
> bch->nr - 1);
> 69f52adb Karsten Keil  2009-01-09  1792  }
> 69f52adb Karsten Keil  2009-01-09  1793  
> 69f52adb Karsten Keil  2009-01-09  1794  /*
> 69f52adb Karsten Keil  2009-01-09  1795   * Layer 1 B-channel hardware access
> 69f52adb Karsten Keil  2009-01-09  1796   */
> 69f52adb Karsten Keil  2009-01-09  1797  static int
> 69f52adb Karsten Keil  2009-01-09  1798  hfc_bctrl(struct mISDNchannel *ch, 
> u_int cmd, void *arg)
> 69f52adb Karsten Keil  2009-01-09  1799  {
> 69f52adb Karsten Keil  2009-01-09  1800       struct bchannel *bch = 
> container_of(ch, struct bchannel, ch);
> 69f52adb Karsten Keil  2009-01-09  1801       int             ret = -EINVAL;
> 69f52adb Karsten Keil  2009-01-09  1802  
> 69f52adb Karsten Keil  2009-01-09  1803       if (bch->debug & DEBUG_HW)
> 69f52adb Karsten Keil  2009-01-09  1804               printk(KERN_DEBUG "%s: 
> cmd:%x %p\n", __func__, cmd, arg);
> 69f52adb Karsten Keil  2009-01-09  1805  
> 69f52adb Karsten Keil  2009-01-09  1806       switch (cmd) {
> 69f52adb Karsten Keil  2009-01-09  1807       case HW_TESTRX_RAW:
> 69f52adb Karsten Keil  2009-01-09  1808       case HW_TESTRX_HDLC:
> 69f52adb Karsten Keil  2009-01-09  1809       case HW_TESTRX_OFF:
> 69f52adb Karsten Keil  2009-01-09  1810               ret = -EINVAL;
> 69f52adb Karsten Keil  2009-01-09  1811               break;
> 69f52adb Karsten Keil  2009-01-09  1812  
> 69f52adb Karsten Keil  2009-01-09  1813       case CLOSE_CHANNEL:
> 69f52adb Karsten Keil  2009-01-09  1814               
> test_and_clear_bit(FLG_OPEN, &bch->Flags);
> 69f52adb Karsten Keil  2009-01-09  1815               
> deactivate_bchannel(bch);
> 69f52adb Karsten Keil  2009-01-09  1816               ch->protocol = 
> ISDN_P_NONE;
> 69f52adb Karsten Keil  2009-01-09  1817               ch->peer = NULL;
> 69f52adb Karsten Keil  2009-01-09  1818               module_put(THIS_MODULE);
> 69f52adb Karsten Keil  2009-01-09  1819               ret = 0;
> 69f52adb Karsten Keil  2009-01-09  1820               break;
> 69f52adb Karsten Keil  2009-01-09  1821       case CONTROL_CHANNEL:
> 69f52adb Karsten Keil  2009-01-09  1822               ret = 
> channel_bctrl(bch, arg);
> 69f52adb Karsten Keil  2009-01-09  1823               break;
> 69f52adb Karsten Keil  2009-01-09  1824       default:
> 69f52adb Karsten Keil  2009-01-09  1825               printk(KERN_WARNING 
> "%s: unknown prim(%x)\n",
> 69f52adb Karsten Keil  2009-01-09  1826                      __func__, cmd);
> 69f52adb Karsten Keil  2009-01-09  1827       }
> 69f52adb Karsten Keil  2009-01-09  1828       return ret;
> 69f52adb Karsten Keil  2009-01-09  1829  }
> 69f52adb Karsten Keil  2009-01-09  1830  
> 69f52adb Karsten Keil  2009-01-09  1831  static int
> 69f52adb Karsten Keil  2009-01-09  1832  setup_instance(struct hfcsusb *hw, 
> struct device *parent)
> 69f52adb Karsten Keil  2009-01-09  1833  {
> 69f52adb Karsten Keil  2009-01-09  1834       u_long  flags;
> 69f52adb Karsten Keil  2009-01-09  1835       int     err, i;
> 69f52adb Karsten Keil  2009-01-09  1836  
> 69f52adb Karsten Keil  2009-01-09  1837       if (debug & DBG_HFC_CALL_TRACE)
> 69f52adb Karsten Keil  2009-01-09  1838               printk(KERN_DEBUG "%s: 
> %s\n", hw->name, __func__);
> 69f52adb Karsten Keil  2009-01-09  1839  
> 69f52adb Karsten Keil  2009-01-09  1840       spin_lock_init(&hw->ctrl_lock);
> 69f52adb Karsten Keil  2009-01-09  1841       spin_lock_init(&hw->lock);
> 69f52adb Karsten Keil  2009-01-09  1842  
> 69f52adb Karsten Keil  2009-01-09 @1843       mISDN_initdchannel(&hw->dch, 
> MAX_DFRAME_LEN_L1, ph_state);
> 69f52adb Karsten Keil  2009-01-09  1844       hw->dch.debug = debug & 0xFFFF;
> 69f52adb Karsten Keil  2009-01-09  1845       hw->dch.hw = hw;
> 69f52adb Karsten Keil  2009-01-09  1846       hw->dch.dev.Dprotocols = (1 << 
> ISDN_P_TE_S0) | (1 << ISDN_P_NT_S0);
> 69f52adb Karsten Keil  2009-01-09  1847       hw->dch.dev.D.send = 
> hfcusb_l2l1D;
> 69f52adb Karsten Keil  2009-01-09  1848       hw->dch.dev.D.ctrl = hfc_dctrl;
> 69f52adb Karsten Keil  2009-01-09  1849  
> 69f52adb Karsten Keil  2009-01-09  1850       /* enable E-Channel logging */
> 69f52adb Karsten Keil  2009-01-09  1851       if 
> (hw->fifos[HFCUSB_PCM_RX].pipe)
> 69f52adb Karsten Keil  2009-01-09 @1852               
> mISDN_initdchannel(&hw->ech, MAX_DFRAME_LEN_L1, NULL);
> 69f52adb Karsten Keil  2009-01-09  1853  
> 69f52adb Karsten Keil  2009-01-09  1854       hw->dch.dev.Bprotocols = (1 << 
> (ISDN_P_B_RAW & ISDN_P_B_MASK)) |
> 69f52adb Karsten Keil  2009-01-09  1855               (1 << (ISDN_P_B_HDLC & 
> ISDN_P_B_MASK));
> 69f52adb Karsten Keil  2009-01-09  1856       hw->dch.dev.nrbchan = 2;
> 69f52adb Karsten Keil  2009-01-09  1857       for (i = 0; i < 2; i++) {
> 69f52adb Karsten Keil  2009-01-09  1858               hw->bch[i].nr = i + 1;
> 69f52adb Karsten Keil  2009-01-09  1859               set_channelmap(i + 1, 
> hw->dch.dev.channelmap);
> 69f52adb Karsten Keil  2009-01-09  1860               hw->bch[i].debug = 
> debug;
> 034005a0 Karsten Keil  2012-05-15 @1861               
> mISDN_initbchannel(&hw->bch[i], MAX_DATA_MEM, poll >> 1);
> 69f52adb Karsten Keil  2009-01-09  1862               hw->bch[i].hw = hw;
> 69f52adb Karsten Keil  2009-01-09  1863               hw->bch[i].ch.send = 
> hfcusb_l2l1B;
> 69f52adb Karsten Keil  2009-01-09  1864               hw->bch[i].ch.ctrl = 
> hfc_bctrl;
> 69f52adb Karsten Keil  2009-01-09  1865               hw->bch[i].ch.nr = i + 
> 1;
> 69f52adb Karsten Keil  2009-01-09  1866               
> list_add(&hw->bch[i].ch.list, &hw->dch.dev.bchannels);
> 69f52adb Karsten Keil  2009-01-09  1867       }
> 69f52adb Karsten Keil  2009-01-09  1868  
> 69f52adb Karsten Keil  2009-01-09  1869       hw->fifos[HFCUSB_B1_TX].bch = 
> &hw->bch[0];
> 69f52adb Karsten Keil  2009-01-09  1870       hw->fifos[HFCUSB_B1_RX].bch = 
> &hw->bch[0];
> 69f52adb Karsten Keil  2009-01-09  1871       hw->fifos[HFCUSB_B2_TX].bch = 
> &hw->bch[1];
> 69f52adb Karsten Keil  2009-01-09  1872       hw->fifos[HFCUSB_B2_RX].bch = 
> &hw->bch[1];
> 69f52adb Karsten Keil  2009-01-09  1873       hw->fifos[HFCUSB_D_TX].dch = 
> &hw->dch;
> 69f52adb Karsten Keil  2009-01-09  1874       hw->fifos[HFCUSB_D_RX].dch = 
> &hw->dch;
> 69f52adb Karsten Keil  2009-01-09  1875       hw->fifos[HFCUSB_PCM_RX].ech = 
> &hw->ech;
> 69f52adb Karsten Keil  2009-01-09  1876       hw->fifos[HFCUSB_PCM_TX].ech = 
> &hw->ech;
> 69f52adb Karsten Keil  2009-01-09  1877  
> 69f52adb Karsten Keil  2009-01-09  1878       err = setup_hfcsusb(hw);
> 69f52adb Karsten Keil  2009-01-09  1879       if (err)
> 69f52adb Karsten Keil  2009-01-09  1880               goto out;
> 69f52adb Karsten Keil  2009-01-09  1881  
> 69f52adb Karsten Keil  2009-01-09  1882       snprintf(hw->name, 
> MISDN_MAX_IDLEN - 1, "%s.%d", DRIVER_NAME,
> 69f52adb Karsten Keil  2009-01-09  1883                hfcsusb_cnt + 1);
> 69f52adb Karsten Keil  2009-01-09  1884       printk(KERN_INFO "%s: 
> registered as '%s'\n",
> 69f52adb Karsten Keil  2009-01-09  1885              DRIVER_NAME, hw->name);
> 69f52adb Karsten Keil  2009-01-09  1886  
> 69f52adb Karsten Keil  2009-01-09 @1887       err = 
> mISDN_register_device(&hw->dch.dev, parent, hw->name);
> 69f52adb Karsten Keil  2009-01-09  1888       if (err)
> 69f52adb Karsten Keil  2009-01-09  1889               goto out;
> 69f52adb Karsten Keil  2009-01-09  1890  
> 69f52adb Karsten Keil  2009-01-09  1891       hfcsusb_cnt++;
> 69f52adb Karsten Keil  2009-01-09  1892       write_lock_irqsave(&HFClock, 
> flags);
> 69f52adb Karsten Keil  2009-01-09  1893       list_add_tail(&hw->list, 
> &HFClist);
> 69f52adb Karsten Keil  2009-01-09  1894       
> write_unlock_irqrestore(&HFClock, flags);
> 69f52adb Karsten Keil  2009-01-09  1895       return 0;
> 69f52adb Karsten Keil  2009-01-09  1896  
> 69f52adb Karsten Keil  2009-01-09  1897  out:
> 69f52adb Karsten Keil  2009-01-09  1898       mISDN_freebchannel(&hw->bch[1]);
> 69f52adb Karsten Keil  2009-01-09  1899       mISDN_freebchannel(&hw->bch[0]);
> 69f52adb Karsten Keil  2009-01-09  1900       mISDN_freedchannel(&hw->dch);
> 69f52adb Karsten Keil  2009-01-09  1901       kfree(hw);
> 69f52adb Karsten Keil  2009-01-09  1902       return err;
> 69f52adb Karsten Keil  2009-01-09  1903  }
> 69f52adb Karsten Keil  2009-01-09  1904  
>
> :::::: The code at line 1757 was first introduced by commit
> :::::: 69f52adb2d534afc41fcc658f155e01f0b322f9e mISDN: Add HFC USB driver
>
> :::::: TO: Karsten Keil <kk...@suse.de>
> :::::: CC: Karsten Keil <kk...@suse.de>
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: signature.asc
Description: PGP signature

Reply via email to