]> git.baikalelectronics.ru Git - kernel.git/commit
hamradio: baycom_epp: fix build for UML
authorRandy Dunlap <rdunlap@infradead.org>
Fri, 15 Oct 2021 02:18:04 +0000 (19:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Oct 2021 11:57:42 +0000 (12:57 +0100)
commit9af34ed6ed6a6367d14831f15e1bb4b07bed95e3
tree1599b6705afbe5810448d4982738fb59f16d9da6
parentc93793684636187dd8ecc2400a76942950203fae
hamradio: baycom_epp: fix build for UML

On i386, the baycom_epp driver wants to inspect X86 CPU features (TSC)
and then act on that data, but that info is not available when running
on UML, so prevent that test and do the default action.

Prevents this build error on UML + i386:

../drivers/net/hamradio/baycom_epp.c: In function ‘epp_bh’:
../drivers/net/hamradio/baycom_epp.c:630:6: error: implicit declaration of function ‘boot_cpu_has’; did you mean ‘get_cpu_mask’? [-Werror=implicit-function-declaration]
  if (boot_cpu_has(X86_FEATURE_TSC))   \
      ^
../drivers/net/hamradio/baycom_epp.c:658:2: note: in expansion of macro ‘GETTICK’
  GETTICK(time1);

Fixes: 732559b790cd ("um: add PCI over virtio emulation driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-um@lists.infradead.org
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Thomas Sailer <t.sailer@alumni.ethz.ch>
Cc: linux-hams@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hamradio/baycom_epp.c