From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stanislaw Gruszka Subject: Re: [PATCH] mt76: fix building without CONFIG_MT76x0U Date: Wed, 26 Sep 2018 16:06:29 +0200 Message-ID: <20180926140627.GA9265@redhat.com> References: <20180926125356.2026635-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Kalle Valo , Felix Fietkau , Lorenzo Bianconi , "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Arnd Bergmann Return-path: Content-Disposition: inline In-Reply-To: <20180926125356.2026635-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Wed, Sep 26, 2018 at 02:51:59PM +0200, Arnd Bergmann wrote: > The recent rework of the mt76 driver caused build failures in > configurations that leave the mt76x0u support disabled: > > ERROR: "mt76u_mcu_deinit" [drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.ko] undefined! > ERROR: "mt76x02u_set_txinfo" [drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.ko] undefined! > ERROR: "mt76u_queues_deinit" [drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.ko] undefined! > ERROR: "mt76u_stop_stat_wk" [drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.ko] undefined! > > The mt76x0_push_txwi()/mt76x0_tx_prepare_skb()/mt76x0_cleanup() functions > that cause some of these are only called from the usb portion, and can > be hidden in an #ifdef in this case. > > mt76u_stop_stat_wk() is called mt76x0_mac_stop(), which is in turn > shared between multiple callers. Calling it only when the USB driver > is enabled avoids the link error but it is not clear to me whether this > can be called from a context where it would not do the right thing. I think there not yet posted Lorenzo patches that fix this build problem. Regards Stanislaw