Message ID | 20220524113502.1094459-5-viktor.barna@celeno.com |
---|---|
State | New |
Headers | show |
Series | wireless: cl8k driver for Celeno IEEE 802.11ax devices | expand |
On Tue, 2022-05-24 at 14:33 +0300, viktor.barna@celeno.com wrote: > > +ccflags-y += -I$(src) -I$(srctree)/net/wireless -I$(srctree)/net/mac80211/ > +ccflags-y += -I$(src) -Werror Neither of these should be here. *Maybe* -I$(src), but that's probably not even needed. > + > +define cc_ver_cmp > +$(shell [ "$$($(CC) -dumpversion | cut -d. -f1)" -$(1) "$(2)" ] && echo "true" || echo "false") > +endef > + > +ifeq ($(call cc_ver_cmp,ge,8),true) > +ccflags-y += -Wno-error=stringop-truncation > +ccflags-y += -Wno-error=format-truncation > +endif > + > +# Stop these C90 warnings. We use C99. > +ccflags-y += -Wno-declaration-after-statement -g No no, all of that needs to go, don't make up your own stuff here. johannes
viktor.barna@celeno.com writes: > +cl-objs += \ > + wrs.o \ > + phy.o \ > + key.o \ > + sta.o \ > + hw.o \ > + chip.o \ > + fw.o \ > + utils.o \ > + channel.o \ > + rx.o \ > + tx.o \ > + main.o \ > + mac_addr.o \ > + ampdu.o \ > + dfs.o \ > + enhanced_tim.o \ > + e2p.o \ > + calib.o \ > + stats.o \ > + power.o \ > + motion_sense.o \ > + bf.o \ > + sounding.o \ > + debug.o \ > + temperature.o \ > + recovery.o \ > + rates.o \ > + radio.o \ > + config.o \ > + tcv.o \ > + traffic.o \ > + vns.o \ > + maintenance.o \ > + ela.o \ > + rfic.o \ > + vif.o \ > + dsp.o \ > + pci.o \ > + version.o \ > + regdom.o \ > + mac80211.o \ > + platform.o \ > + scan.o > + > +ifneq ($(CONFIG_CL8K),) > +cl8k-y += $(cl-objs) > +endif I don't understand why you need ifneq here. Please check how are other drivers (like iwlwifi) do it, Makefile can be really simple
diff --git a/drivers/net/wireless/celeno/cl8k/Makefile b/drivers/net/wireless/celeno/cl8k/Makefile new file mode 100644 index 000000000000..9ff98cda5261 --- /dev/null +++ b/drivers/net/wireless/celeno/cl8k/Makefile @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +obj-$(CONFIG_CL8K) += cl8k.o + +ccflags-y += -I$(src) -I$(srctree)/net/wireless -I$(srctree)/net/mac80211/ +ccflags-y += -I$(src) -Werror + +define cc_ver_cmp +$(shell [ "$$($(CC) -dumpversion | cut -d. -f1)" -$(1) "$(2)" ] && echo "true" || echo "false") +endef + +ifeq ($(call cc_ver_cmp,ge,8),true) +ccflags-y += -Wno-error=stringop-truncation +ccflags-y += -Wno-error=format-truncation +endif + +# Stop these C90 warnings. We use C99. +ccflags-y += -Wno-declaration-after-statement -g + +cl-objs += \ + wrs.o \ + phy.o \ + key.o \ + sta.o \ + hw.o \ + chip.o \ + fw.o \ + utils.o \ + channel.o \ + rx.o \ + tx.o \ + main.o \ + mac_addr.o \ + ampdu.o \ + dfs.o \ + enhanced_tim.o \ + e2p.o \ + calib.o \ + stats.o \ + power.o \ + motion_sense.o \ + bf.o \ + sounding.o \ + debug.o \ + temperature.o \ + recovery.o \ + rates.o \ + radio.o \ + config.o \ + tcv.o \ + traffic.o \ + vns.o \ + maintenance.o \ + ela.o \ + rfic.o \ + vif.o \ + dsp.o \ + pci.o \ + version.o \ + regdom.o \ + mac80211.o \ + platform.o \ + scan.o + +ifneq ($(CONFIG_CL8K),) +cl8k-y += $(cl-objs) +endif