linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Nathan Chancellor <natechancellor@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.14 016/121] enic: fix build warning without CONFIG_CPUMASK_OFFSTACK
Date: Thu,  4 Apr 2019 10:46:44 +0200	[thread overview]
Message-ID: <20190404084546.246591774@linuxfoundation.org> (raw)
In-Reply-To: <20190404084545.245659903@linuxfoundation.org>

4.14-stable review patch.  If anyone has any objections, please let me know.

------------------

[ Upstream commit 43d281662fdb46750d49417559b71069f435298d ]

The enic driver relies on the CONFIG_CPUMASK_OFFSTACK feature to
dynamically allocate a struct member, but this is normally intended for
local variables.

Building with clang, I get a warning for a few locations that check the
address of the cpumask_var_t:

drivers/net/ethernet/cisco/enic/enic_main.c:122:22: error: address of array 'enic->msix[i].affinity_mask' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

As far as I can tell, the code is still correct, as the truth value of
the pointer is what we need in this configuration. To get rid of
the warning, use cpumask_available() instead of checking the
pointer directly.

Fixes: 322cf7e3a4e8 ("enic: assign affinity hint to interrupts")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/cisco/enic/enic_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index ced348e15a63..19f374b180fc 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -119,7 +119,7 @@ static void enic_init_affinity_hint(struct enic *enic)
 
 	for (i = 0; i < enic->intr_count; i++) {
 		if (enic_is_err_intr(enic, i) || enic_is_notify_intr(enic, i) ||
-		    (enic->msix[i].affinity_mask &&
+		    (cpumask_available(enic->msix[i].affinity_mask) &&
 		     !cpumask_empty(enic->msix[i].affinity_mask)))
 			continue;
 		if (zalloc_cpumask_var(&enic->msix[i].affinity_mask,
@@ -148,7 +148,7 @@ static void enic_set_affinity_hint(struct enic *enic)
 	for (i = 0; i < enic->intr_count; i++) {
 		if (enic_is_err_intr(enic, i)		||
 		    enic_is_notify_intr(enic, i)	||
-		    !enic->msix[i].affinity_mask	||
+		    !cpumask_available(enic->msix[i].affinity_mask) ||
 		    cpumask_empty(enic->msix[i].affinity_mask))
 			continue;
 		err = irq_set_affinity_hint(enic->msix_entry[i].vector,
@@ -161,7 +161,7 @@ static void enic_set_affinity_hint(struct enic *enic)
 	for (i = 0; i < enic->wq_count; i++) {
 		int wq_intr = enic_msix_wq_intr(enic, i);
 
-		if (enic->msix[wq_intr].affinity_mask &&
+		if (cpumask_available(enic->msix[wq_intr].affinity_mask) &&
 		    !cpumask_empty(enic->msix[wq_intr].affinity_mask))
 			netif_set_xps_queue(enic->netdev,
 					    enic->msix[wq_intr].affinity_mask,
-- 
2.19.1




  parent reply	other threads:[~2019-04-04  8:54 UTC|newest]

Thread overview: 127+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04  8:46 [PATCH 4.14 000/121] 4.14.111-stable review Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 001/121] arm64: debug: Dont propagate UNKNOWN FAR into si_code for debug signals Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 002/121] ext4: cleanup bh release code in ext4_ind_remove_space() Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 003/121] lib/int_sqrt: optimize initial value compute Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 004/121] tty/serial: atmel: Add is_half_duplex helper Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 005/121] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 006/121] mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 007/121] CIFS: fix POSIX lock leak and invalid ptr deref Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 008/121] h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 009/121] f2fs: fix to avoid deadlock in f2fs_read_inline_dir() Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 010/121] tracing: kdb: Fix ftdump to not sleep Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 011/121] net/mlx5: Avoid panic when setting vport rate Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 012/121] net/mlx5: Avoid panic when setting vport mac, getting vport config Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 013/121] gpio: gpio-omap: fix level interrupt idling Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 014/121] include/linux/relay.h: fix percpu annotation in struct rchan Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 015/121] sysctl: handle overflow for file-max Greg Kroah-Hartman
2019-04-04  8:46 ` Greg Kroah-Hartman [this message]
2019-04-04  8:46 ` [PATCH 4.14 017/121] scsi: hisi_sas: Set PHY linkrate when disconnected Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 018/121] iio: adc: fix warning in Qualcomm PM8xxx HK/XOADC driver Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 019/121] perf c2c: Fix c2c report for empty numa node Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 020/121] mm/cma.c: cma_declare_contiguous: correct err handling Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 021/121] mm/page_ext.c: fix an imbalance with kmemleak Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 022/121] mm, mempolicy: fix uninit memory access Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 023/121] mm/vmalloc.c: fix kernel BUG at mm/vmalloc.c:512! Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 024/121] mm/slab.c: kmemleak no scan alien caches Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 025/121] ocfs2: fix a panic problem caused by o2cb_ctl Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 026/121] f2fs: do not use mutex lock in atomic context Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 027/121] fs/file.c: initialize init_files.resize_wait Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 028/121] page_poison: play nicely with KASAN Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 029/121] cifs: use correct format characters Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 030/121] dm thin: add sanity checks to thin-pool and external snapshot creation Greg Kroah-Hartman
2019-04-04  8:46 ` [PATCH 4.14 031/121] cifs: Fix NULL pointer dereference of devname Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 032/121] fs: Make splice() and tee() take into account O_NONBLOCK flag on pipes Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 033/121] jbd2: fix invalid descriptor block checksum Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 034/121] fs: fix guard_bio_eod to check for real EOD errors Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 035/121] tools lib traceevent: Fix buffer overflow in arg_eval Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 036/121] PCI/PME: Fix hotplug/sysfs remove deadlock in pcie_pme_remove() Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 037/121] wil6210: check null pointer in _wil_cfg80211_merge_extra_ies Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 038/121] crypto: crypto4xx - add missing of_node_put after of_device_is_available Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 039/121] crypto: cavium/zip - fix collision with generic cra_driver_name Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 040/121] usb: chipidea: Grab the (legacy) USB PHY by phandle first Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 041/121] scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 042/121] powerpc/xmon: Fix opcode being uninitialized in print_insn_powerpc Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 043/121] coresight: etm4x: Add support to enable ETMv4.2 Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 044/121] serial: 8250_pxa: honor the port number from devicetree Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 045/121] ARM: 8840/1: use a raw_spinlock_t in unwind Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 046/121] iommu/io-pgtable-arm-v7s: Only kmemleak_ignore L2 tables Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 047/121] powerpc/hugetlb: Handle mmap_min_addr correctly in get_unmapped_area callback Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 048/121] mmc: omap: fix the maximum timeout setting Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 049/121] e1000e: Fix -Wformat-truncation warnings Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 050/121] mlxsw: spectrum: Avoid " Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 051/121] IB/mlx4: Increase the timeout for CM cache Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 052/121] clk: fractional-divider: check parent rate only if flag is set Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 053/121] cpufreq: acpi-cpufreq: Report if CPU doesnt support boost technologies Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 054/121] efi: cper: Fix possible out-of-bounds access Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 055/121] scsi: megaraid_sas: return error when create DMA pool failed Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 056/121] scsi: fcoe: make use of fip_mode enum complete Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 057/121] perf test: Fix failure of evsel-tp-sched test on s390 Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 058/121] SoC: imx-sgtl5000: add missing put_device() Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 059/121] media: sh_veu: Correct return type for mem2mem buffer helpers Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 060/121] media: s5p-jpeg: " Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 061/121] media: s5p-g2d: " Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 062/121] media: mx2_emmaprp: " Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 063/121] media: mtk-jpeg: " Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 064/121] vfs: fix preadv64v2 and pwritev64v2 compat syscalls with offset == -1 Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 065/121] HID: intel-ish-hid: avoid binding wrong ishtp_cl_device Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 066/121] jbd2: fix race when writing superblock Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 067/121] leds: lp55xx: fix null deref on firmware load failure Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 068/121] iwlwifi: pcie: fix emergency path Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 069/121] ACPI / video: Refactor and fix dmi_is_desktop() Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 070/121] kprobes: Prohibit probing on bsearch() Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 071/121] netfilter: conntrack: fix cloned unconfirmed skb->_nfct race in __nf_conntrack_confirm Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 072/121] ARM: 8833/1: Ensure that NEON code always compiles with Clang Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 073/121] ALSA: PCM: check if ops are defined before suspending PCM Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 074/121] usb: f_fs: Avoid crash due to out-of-scope stack ptr access Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 075/121] sched/topology: Fix percpu data types in struct sd_data & struct s_data Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 076/121] bcache: fix input overflow to cache set sysfs file io_error_halflife Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 077/121] bcache: fix input overflow to sequential_cutoff Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 078/121] bcache: improve sysfs_strtoul_clamp() Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 079/121] genirq: Avoid summation loops for /proc/stat Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 080/121] iw_cxgb4: fix srqidx leak during connection abort Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 081/121] fbdev: fbmem: fix memory access if logo is bigger than the screen Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 082/121] cdrom: Fix race condition in cdrom_sysctl_register Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 083/121] e1000e: fix cyclic resets at link up with active tx Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 084/121] platform/x86: intel_pmc_core: Fix PCH IP sts reading Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 085/121] ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 086/121] sched/debug: Initialize sd_sysctl_cpus if !CONFIG_CPUMASK_OFFSTACK Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 087/121] efi/memattr: Dont bail on zero VA if it equals the regions PA Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 088/121] ARM: dts: lpc32xx: Remove leading 0x and 0s from bindings notation Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 089/121] efi/arm/arm64: Allow SetVirtualAddressMap() to be omitted Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 090/121] soc: qcom: gsbi: Fix error handling in gsbi_probe() Greg Kroah-Hartman
2019-04-04  8:47 ` [PATCH 4.14 091/121] mt7601u: bump supported EEPROM version Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 092/121] ARM: 8830/1: NOMMU: Toggle only bits in EXC_RETURN we are really care of Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 093/121] ARM: avoid Cortex-A9 livelock on tight dmb loops Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 094/121] bpf: fix missing prototype warnings Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 095/121] cgroup/pids: turn cgroup_subsys->free() into cgroup_subsys->release() to fix the accounting Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 096/121] backlight: pwm_bl: Use gpiod_get_value_cansleep() to get initial state Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 097/121] tty: increase the default flip buffer limit to 2*640K Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 098/121] powerpc/pseries: Perform full re-add of CPU for topology update post-migration Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 099/121] usb: dwc3: gadget: Fix OTG events when gadget driver isnt loaded Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 100/121] media: mt9m111: set initial frame size other than 0x0 Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 101/121] hwrng: virtio - Avoid repeated init of completion Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 102/121] soc/tegra: fuse: Fix illegal free of IO base address Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 103/121] HID: intel-ish: ipc: handle PIMR before ish_wakeup also clear PISR busy_clear bit Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 104/121] hpet: Fix missing = character in the __setup() code of hpet_mmap_enable Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 105/121] cpu/hotplug: Mute hotplug lockdep during init Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 106/121] dmaengine: imx-dma: fix warning comparison of distinct pointer types Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 107/121] dmaengine: qcom_hidma: assign channel cookie correctly Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 108/121] dmaengine: qcom_hidma: initialize tx flags in hidma_prep_dma_* Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 109/121] netfilter: physdev: relax br_netfilter dependency Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 110/121] media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 111/121] regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 112/121] drm: Auto-set allow_fb_modifiers when given modifiers at plane init Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 113/121] drm/nouveau: Stop using drm_crtc_force_disable Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 114/121] x86/build: Specify elf_i386 linker emulation explicitly for i386 objects Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 115/121] selinux: do not override context on context mounts Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 116/121] wlcore: Fix memory leak in case wl12xx_fetch_firmware failure Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 117/121] x86/build: Mark per-CPU symbols as absolute explicitly for LLD Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 118/121] clk: rockchip: fix frac settings of GPLL clock for rk3328 Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 119/121] dmaengine: tegra: avoid overflow of byte tracking Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 120/121] drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers Greg Kroah-Hartman
2019-04-04  8:48 ` [PATCH 4.14 121/121] ACPI / video: Extend chassis-type detection with a "Lunch Box" check Greg Kroah-Hartman
2019-04-04 15:03 ` [PATCH 4.14 000/121] 4.14.111-stable review kernelci.org bot
2019-04-05  3:16 ` Naresh Kamboju
2019-04-05 15:18 ` shuah
2019-04-05 15:39 ` Jon Hunter
2019-04-05 18:30 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190404084546.246591774@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).