linux-stable/drivers/net/ethernet
Jacob Keller 1eb43fc754 ice: Use order_base_2 to calculate higher power of 2
Currently, we use a combination of ilog2 and is_power_of_2() to
calculate the next power of 2 for the qcount. This appears to be causing
a warning on some combinations of GCC and the Linux kernel:

MODPOST 1 modules
WARNING: "____ilog2_NaN" [ice.ko] undefined!

This appears to because because GCC realizes that qcount could be zero
in some circumstances and thus attempts to link against the
intentionally undefined ___ilog2_NaN function.

The order_base_2 function is intentionally defined to return 0 when
passed 0 as an argument, and thus will be safe to use here.

This not only fixes the warning but makes the resulting code slightly
cleaner, and is really what we should have used originally.

Also update the comment to make it more clear that we are rounding up,
not just incrementing the ilog2 of qcount unconditionally.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-08-23 09:56:28 -07:00
..
3com net: prevent ISA drivers from building on PPC32 2018-07-22 11:12:29 -07:00
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-08-15 15:04:25 -07:00
adaptec net: adaptec: Replace mdelay() with msleep() in starfire_init_one() 2018-07-26 21:24:23 -07:00
aeroflex
agere
alacritech
allwinner
alteon alteon: acenic: mark expected switch fall-through 2018-08-07 17:54:19 -07:00
altera
amazon Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-08-02 10:55:32 -07:00
amd Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-08-15 16:01:47 -07:00
apm ACPI: Convert ACPI reference args to generic fwnode reference args 2018-07-23 12:44:52 +02:00
apple net: ethernet: Use existing define with polynomial 2018-07-27 19:16:37 +08:00
aquantia Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-08-09 11:52:36 -07:00
arc
atheros Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-07-24 19:21:58 -07:00
aurora
broadcom net_sched: remove list_head from tc_action 2018-08-21 12:45:44 -07:00
brocade
cadence net: macb: Mark expected switch fall-through 2018-08-07 17:54:19 -07:00
calxeda Merge 4.18-rc5 into char-misc-next 2018-07-16 09:04:54 +02:00
cavium liquidio: remove set but not used variable 'is25G' 2018-08-13 09:21:05 -07:00
chelsio net_sched: remove list_head from tc_action 2018-08-21 12:45:44 -07:00
cirrus net: prevent ISA drivers from building on PPC32 2018-07-22 11:12:29 -07:00
cisco net: cisco: enic: Replace GFP_ATOMIC with GFP_KERNEL 2018-08-04 13:08:06 -07:00
cortina net: gemini: Indicate that we can handle jumboframes 2018-07-12 17:39:15 -07:00
davicom
dec net: tulip: de4x5: mark expected switch fall-throughs 2018-08-07 17:54:19 -07:00
dlink
emulex be2net: Use Kconfig flag to support for enabling/disabling adapters 2018-08-09 14:08:59 -07:00
ezchip
faraday
freescale Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-08-15 16:01:47 -07:00
fujitsu
hisilicon net: hns3: modify variable type in hns3_nic_reuse_page 2018-08-22 21:55:01 -07:00
hp
huawei net-next: hinic: fix a problem in free_tx_poll() 2018-08-08 09:46:08 -07:00
i825xx
ibm ibmvnic: Update firmware error reporting with cause string 2018-08-07 12:46:27 -07:00
intel ice: Use order_base_2 to calculate higher power of 2 2018-08-23 09:56:28 -07:00
marvell net: mvneta: fix mvneta_config_rss on armada 3700 2018-08-10 14:40:11 -07:00
mediatek net-next: mediatek: cleanup unnecessary get chip id and its user 2018-07-29 13:15:57 -07:00
mellanox net_sched: remove list_head from tc_action 2018-08-21 12:45:44 -07:00
micrel Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-08-15 16:01:47 -07:00
microchip net: lan743x_ptp: convert to ktime_get_clocktai_ts64 2018-08-19 10:56:40 -07:00
moxa
mscc net: mscc: simplify retrieving the tag type from the frame header 2018-07-16 13:43:31 -07:00
myricom
natsemi
neterion vxge: remove set but not used variable 'req_out', 'status' and 'ret' 2018-08-11 12:05:19 -07:00
netronome net_sched: remove list_head from tc_action 2018-08-21 12:45:44 -07:00
ni net: nixge: Don't store skb in app4 field of descriptor 2018-08-13 08:49:37 -07:00
nuvoton
nvidia net: nvidia: forcedeth: Replace GFP_ATOMIC with GFP_KERNEL in nv_probe() 2018-07-27 13:45:14 -07:00
nxp
oki-semi
packetengines
pasemi
qlogic net_sched: remove list_head from tc_action 2018-08-21 12:45:44 -07:00
qualcomm Merge ra.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux 2018-07-20 21:17:12 -07:00
rdc
realtek r8169: don't use MSI-X on RTL8106e 2018-08-19 11:01:09 -07:00
renesas net: ethernet: renesas: use SPDX identifier for Renesas drivers 2018-08-22 21:37:27 -07:00
rocker
samsung net: ethernet: sxgbe: mark expected switch fall-throughs 2018-08-07 17:54:20 -07:00
seeq
sfc net: sfc: falcon: mark expected switch fall-through 2018-08-07 17:54:21 -07:00
sgi
silan
sis
smsc
socionext net: socionext: Increase descriptors to 256 2018-08-11 12:11:36 -07:00
stmicro net_sched: remove list_head from tc_action 2018-08-21 12:45:44 -07:00
sun
synopsys net: ethernet: Use existing define with polynomial 2018-07-27 19:16:37 +08:00
tehuti
ti Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-08-11 17:52:00 -07:00
toshiba
tundra
via
wiznet
xilinx Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-07-24 19:21:58 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: jme: Replace mdelay() with msleep() and usleep_range() in jme_wait_link() 2018-07-27 13:45:14 -07:00
jme.h
Kconfig net: change Exar/Neterion menu items to be alphabetical 2018-08-01 09:49:02 -07:00
korina.c
lantiq_etop.c
Makefile net: change Exar/Neterion menu items to be alphabetical 2018-08-01 09:49:02 -07:00
netx-eth.c