linux/drivers/net/ethernet/mellanox/mlxsw
Arnd Bergmann 7442c483b9 mlxsw: core: mlxsw: core: avoid -Wint-in-bool-context warning
A recently added function in mlxsw triggers a harmless compiler warning:

In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:17,
                 from drivers/net/ethernet/mellanox/mlxsw/core_env.c:7:
drivers/net/ethernet/mellanox/mlxsw/core_env.c: In function 'mlxsw_env_module_temp_thresholds_get':
drivers/net/ethernet/mellanox/mlxsw/reg.h:8015:45: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define MLXSW_REG_MTMP_TEMP_TO_MC(val) (val * 125)
                                        ~~~~~^~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_env.c:116:8: note: in expansion of macro 'MLXSW_REG_MTMP_TEMP_TO_MC'
   if (!MLXSW_REG_MTMP_TEMP_TO_MC(module_temp)) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~

The warning is normally disabled, but it would be nice to enable
it to find real bugs, and there are no other known instances at
the moment.

Replace the negation with a zero-comparison, which also matches
the comment above it.

Fixes: d93c19a1d9 ("mlxsw: core: Add API for QSFP module temperature thresholds reading")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-19 13:26:03 -07:00
..
cmd.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
core_acl_flex_actions.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
core_acl_flex_actions.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
core_acl_flex_keys.c mlxsw: spectrum: acl: Use struct_size() in kzalloc() 2019-02-25 14:18:02 -08:00
core_acl_flex_keys.h mlxsw: spectrum_acl: Add Spectrum-2 keys 2018-12-11 23:01:33 -08:00
core_env.c mlxsw: core: mlxsw: core: avoid -Wint-in-bool-context warning 2019-03-19 13:26:03 -07:00
core_env.h mlxsw: core: Move ethtool module callbacks to a common location 2019-03-03 22:23:00 -08:00
core_hwmon.c mlxsw: core: fix spelling mistake "temprature" -> "temperature" 2019-02-15 20:16:52 -08:00
core_thermal.c mlxsw: core: Prevent duplication during QSFP module initialization 2019-03-12 14:55:16 -07:00
core.c mlxsw: core: Move resource query API to common location 2019-03-03 22:23:00 -08:00
core.h mlxsw: core: Move resource query API to common location 2019-03-03 22:23:00 -08:00
emad.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
i2c.c mlxsw: i2c: Extend initialization by querying resources data 2019-03-03 22:23:00 -08:00
i2c.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
ib.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
item.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
Kconfig net: devlink: turn devlink into a built-in 2019-02-26 08:49:05 -08:00
Makefile mlxsw: core: Add API for QSFP module temperature thresholds reading 2019-02-13 22:33:02 -08:00
minimal.c mlxsw: minimal: Initialize base_mac 2019-03-12 14:55:16 -07:00
pci_hw.h mlxsw: pci: Increase PCI SW reset timeout 2019-01-18 15:12:16 -08:00
pci.c mlxsw: core: Move resource query API to common location 2019-03-03 22:23:00 -08:00
pci.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
port.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
reg.h mlxsw: reg: Add new port type-speed fields for PTYS register 2019-02-23 13:54:36 -08:00
resources.h mlxsw: spectrum_buffers: Reject overlarge headroom size requests 2019-02-21 15:57:46 -08:00
spectrum1_acl_tcam.c mlxsw: spectrum_acl: Pass hints priv all the way to ERP code 2019-02-08 15:02:50 -08:00
spectrum1_kvdl.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum1_mr_tcam.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum2_acl_tcam.c mlxsw: spectrum_acl: Pass hints priv all the way to ERP code 2019-02-08 15:02:50 -08:00
spectrum2_kvdl.c mlxsw: spectrum: Add a new type of KVD linear record 2018-10-11 10:08:22 -07:00
spectrum2_mr_tcam.c mlxsw: spectrum_router: Add Multicast routing support for Spectrum-2 2018-12-11 23:01:33 -08:00
spectrum_acl_atcam.c mlxsw: spectrum_acl: Pass hints priv all the way to ERP code 2019-02-08 15:02:50 -08:00
spectrum_acl_bloom_filter.c mlxsw: spectrum_acl: Introduce mutex to guard Bloom Filter updates 2019-02-24 20:25:29 -08:00
spectrum_acl_ctcam.c mlxsw: spectrum_acl: Remove unnecessary arg on action_replace call path 2019-01-28 10:43:15 -08:00
spectrum_acl_erp.c mlxsw: spectrum_acl: Remove RTNL lock assertions from ERP code 2019-02-24 20:25:29 -08:00
spectrum_acl_flex_actions.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_acl_flex_actions.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_acl_flex_keys.c mlxsw: spectrum_acl: Add Spectrum-2 keys 2018-12-11 23:01:33 -08:00
spectrum_acl_tcam.c mlxsw: spectrum_acl: Make mlxsw_sp_acl_tcam_vregion_rehash() return void 2019-03-01 21:44:11 -08:00
spectrum_acl_tcam.h mlxsw: spectrum_acl: Don't take rtnl lock during vregion_rehash_intrvl_set() 2019-02-24 20:25:29 -08:00
spectrum_acl.c mlxsw: spectrum: add "acl_region_rehash_interval" devlink param 2019-02-08 15:02:50 -08:00
spectrum_buffers.c mlxsw: spectrum_buffers: Reject overlarge headroom size requests 2019-02-21 15:57:46 -08:00
spectrum_cnt.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_cnt.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_dcb.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_dpipe.c mlxsw: spectrum_router: Support RIF without device 2019-01-20 11:12:57 -08:00
spectrum_dpipe.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_fid.c mellanox: Switch to bitmap_zalloc() 2019-03-04 10:19:33 -08:00
spectrum_flower.c mlxsw: spectrum_flower: Fix VLAN modify action support 2019-02-12 12:03:29 -05:00
spectrum_ipip.c mlxsw: spectrum_router: Update tunnel decap properties 2019-01-20 11:12:58 -08:00
spectrum_ipip.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_kvdl.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr_tcam.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr_tcam.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_nve_vxlan.c mlxsw: spectrum_nve: Enable VXLAN on Spectrum-2 2019-01-23 09:28:27 -08:00
spectrum_nve.c mlxsw: spectrum: Add extack messages to VXLAN FDB rejection 2019-01-17 15:18:47 -08:00
spectrum_nve.h mlxsw: spectrum_nve: Add support for VXLAN on Spectrum-2 2019-01-23 09:28:27 -08:00
spectrum_qdisc.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_router.c mlxsw: spectrum_router: Drop unnecessary WARN_ON_ONCE() 2019-02-12 12:03:29 -05:00
spectrum_router.h mlxsw: spectrum_router: Update tunnel decap properties 2019-01-20 11:12:58 -08:00
spectrum_span.c route: Add multipath_hash in flowi_common to make user-define hash 2019-02-27 12:50:17 -08:00
spectrum_span.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_switchdev.c net: Remove switchdev_ops 2019-02-27 12:39:56 -08:00
spectrum_switchdev.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum.c mlxsw: core: Move ethtool module callbacks to a common location 2019-03-03 22:23:00 -08:00
spectrum.h net: Remove switchdev_ops 2019-02-27 12:39:56 -08:00
switchib.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
switchx2.c mlxsw: Implement ndo_get_port_parent_id() 2019-02-06 14:16:11 -08:00
trap.h mlxsw: spectrum: Add trap for decapsulated ARP packets 2018-12-18 09:17:38 -08:00
txheader.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00