> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> kernel test robot
> Sent: Thursday, May 18, 2023 6:34 AM
> To: Ertman, David M <[email protected]>; intel-wired-
> [email protected]
> Cc: [email protected]; [email protected]
> Subject: Re: [Intel-wired-lan] [PATCH iwl-next v6 02/10] ice: Add driver
> support for firmware changes for LAG
> 
> Hi Dave,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on tnguy-next-queue/dev-queue]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Dave-Ertman/ice-
> Correctly-initialize-queue-context-values/20230518-070823
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git
> dev-queue
> patch link:    https://lore.kernel.org/r/20230517230028.321350-3-
> david.m.ertman%40intel.com
> patch subject: [Intel-wired-lan] [PATCH iwl-next v6 02/10] ice: Add driver
> support for firmware changes for LAG
> config: i386-randconfig-a013
> compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project
> f28c006a5895fc0e329fe15fead81e37457cb1d1)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-
> tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/intel-lab-
> lkp/linux/commit/f417c72c01f3210959baa45e51dd59cc7be16688
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review Dave-Ertman/ice-Correctly-initialize-
> queue-context-values/20230518-070823
>         git checkout f417c72c01f3210959baa45e51dd59cc7be16688
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
> W=1 O=build_dir ARCH=i386 olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
> W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/intel/ice/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <[email protected]>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202305181101.gCbJ4JDT-
> [email protected]/
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/net/ethernet/intel/ice/ice_common.c:2255:31: warning: use of
> logical '&&' with constant operand [-Wconstant-logical-operand]
>                    caps->sriov_lag = !!(number && ICE_AQC_BIT_SRIOV_LAG);
>                                                ^  ~~~~~~~~~~~~~~~~~~~~~
>    drivers/net/ethernet/intel/ice/ice_common.c:2255:31: note: use '&' for a
> bitwise operation
>                    caps->sriov_lag = !!(number && ICE_AQC_BIT_SRIOV_LAG);
>                                                ^~
>                                                &
>    drivers/net/ethernet/intel/ice/ice_common.c:2255:31: note: remove
> constant to silence this warning
>                    caps->sriov_lag = !!(number && ICE_AQC_BIT_SRIOV_LAG);
>                                               ~^~~~~~~~~~~~~~~~~~~~~~~~
>    1 warning generated.
> 
> 
> vim +2255 drivers/net/ethernet/intel/ice/ice_common.c
> 
>   2132
>   2133        /**
>   2134         * ice_parse_common_caps - parse common device/function
> capabilities
>   2135         * @hw: pointer to the HW struct
>   2136         * @caps: pointer to common capabilities structure
>   2137         * @elem: the capability element to parse
>   2138         * @prefix: message prefix for tracing capabilities
>   2139         *
>   2140         * Given a capability element, extract relevant details into 
> the common
>   2141         * capability structure.
>   2142         *
>   2143         * Returns: true if the capability matches one of the common 
> capability
> ids,
>   2144         * false otherwise.
>   2145         */
>   2146        static bool
>   2147        ice_parse_common_caps(struct ice_hw *hw, struct
> ice_hw_common_caps *caps,
>   2148                              struct ice_aqc_list_caps_elem *elem, 
> const char
> *prefix)
>   2149        {
>   2150                u32 logical_id = le32_to_cpu(elem->logical_id);
>   2151                u32 phys_id = le32_to_cpu(elem->phys_id);
>   2152                u32 number = le32_to_cpu(elem->number);
>   2153                u16 cap = le16_to_cpu(elem->cap);
>   2154                bool found = true;
>   2155
>   2156                switch (cap) {
>   2157                case ICE_AQC_CAPS_VALID_FUNCTIONS:
>   2158                        caps->valid_functions = number;
>   2159                        ice_debug(hw, ICE_DBG_INIT, "%s: valid_functions
> (bitmap) = %d\n", prefix,
>   2160                                  caps->valid_functions);
>   2161                        break;
>   2162                case ICE_AQC_CAPS_SRIOV:
>   2163                        caps->sr_iov_1_1 = (number == 1);
>   2164                        ice_debug(hw, ICE_DBG_INIT, "%s: sr_iov_1_1 =
> %d\n", prefix,
>   2165                                  caps->sr_iov_1_1);
>   2166                        break;
>   2167                case ICE_AQC_CAPS_DCB:
>   2168                        caps->dcb = (number == 1);
>   2169                        caps->active_tc_bitmap = logical_id;
>   2170                        caps->maxtc = phys_id;
>   2171                        ice_debug(hw, ICE_DBG_INIT, "%s: dcb = %d\n",
> prefix, caps->dcb);
>   2172                        ice_debug(hw, ICE_DBG_INIT, "%s: 
> active_tc_bitmap =
> %d\n", prefix,
>   2173                                  caps->active_tc_bitmap);
>   2174                        ice_debug(hw, ICE_DBG_INIT, "%s: maxtc = %d\n",
> prefix, caps->maxtc);
>   2175                        break;
>   2176                case ICE_AQC_CAPS_RSS:
>   2177                        caps->rss_table_size = number;
>   2178                        caps->rss_table_entry_width = logical_id;
>   2179                        ice_debug(hw, ICE_DBG_INIT, "%s: rss_table_size 
> =
> %d\n", prefix,
>   2180                                  caps->rss_table_size);
>   2181                        ice_debug(hw, ICE_DBG_INIT, "%s:
> rss_table_entry_width = %d\n", prefix,
>   2182                                  caps->rss_table_entry_width);
>   2183                        break;
>   2184                case ICE_AQC_CAPS_RXQS:
>   2185                        caps->num_rxq = number;
>   2186                        caps->rxq_first_id = phys_id;
>   2187                        ice_debug(hw, ICE_DBG_INIT, "%s: num_rxq = 
> %d\n",
> prefix,
>   2188                                  caps->num_rxq);
>   2189                        ice_debug(hw, ICE_DBG_INIT, "%s: rxq_first_id =
> %d\n", prefix,
>   2190                                  caps->rxq_first_id);
>   2191                        break;
>   2192                case ICE_AQC_CAPS_TXQS:
>   2193                        caps->num_txq = number;
>   2194                        caps->txq_first_id = phys_id;
>   2195                        ice_debug(hw, ICE_DBG_INIT, "%s: num_txq = 
> %d\n",
> prefix,
>   2196                                  caps->num_txq);
>   2197                        ice_debug(hw, ICE_DBG_INIT, "%s: txq_first_id =
> %d\n", prefix,
>   2198                                  caps->txq_first_id);
>   2199                        break;
>   2200                case ICE_AQC_CAPS_MSIX:
>   2201                        caps->num_msix_vectors = number;
>   2202                        caps->msix_vector_first_id = phys_id;
>   2203                        ice_debug(hw, ICE_DBG_INIT, "%s: 
> num_msix_vectors
> = %d\n", prefix,
>   2204                                  caps->num_msix_vectors);
>   2205                        ice_debug(hw, ICE_DBG_INIT, "%s:
> msix_vector_first_id = %d\n", prefix,
>   2206                                  caps->msix_vector_first_id);
>   2207                        break;
>   2208                case ICE_AQC_CAPS_PENDING_NVM_VER:
>   2209                        caps->nvm_update_pending_nvm = true;
>   2210                        ice_debug(hw, ICE_DBG_INIT, "%s:
> update_pending_nvm\n", prefix);
>   2211                        break;
>   2212                case ICE_AQC_CAPS_PENDING_OROM_VER:
>   2213                        caps->nvm_update_pending_orom = true;
>   2214                        ice_debug(hw, ICE_DBG_INIT, "%s:
> update_pending_orom\n", prefix);
>   2215                        break;
>   2216                case ICE_AQC_CAPS_PENDING_NET_VER:
>   2217                        caps->nvm_update_pending_netlist = true;
>   2218                        ice_debug(hw, ICE_DBG_INIT, "%s:
> update_pending_netlist\n", prefix);
>   2219                        break;
>   2220                case ICE_AQC_CAPS_NVM_MGMT:
>   2221                        caps->nvm_unified_update =
>   2222                                (number &
> ICE_NVM_MGMT_UNIFIED_UPD_SUPPORT) ?
>   2223                                true : false;
>   2224                        ice_debug(hw, ICE_DBG_INIT, "%s:
> nvm_unified_update = %d\n", prefix,
>   2225                                  caps->nvm_unified_update);
>   2226                        break;
>   2227                case ICE_AQC_CAPS_RDMA:
>   2228                        caps->rdma = (number == 1);
>   2229                        ice_debug(hw, ICE_DBG_INIT, "%s: rdma = %d\n",
> prefix, caps->rdma);
>   2230                        break;
>   2231                case ICE_AQC_CAPS_MAX_MTU:
>   2232                        caps->max_mtu = number;
>   2233                        ice_debug(hw, ICE_DBG_INIT, "%s: max_mtu = 
> %d\n",
>   2234                                  prefix, caps->max_mtu);
>   2235                        break;
>   2236                case ICE_AQC_CAPS_PCIE_RESET_AVOIDANCE:
>   2237                        caps->pcie_reset_avoidance = (number > 0);
>   2238                        ice_debug(hw, ICE_DBG_INIT,
>   2239                                  "%s: pcie_reset_avoidance = %d\n", 
> prefix,
>   2240                                  caps->pcie_reset_avoidance);
>   2241                        break;
>   2242                case ICE_AQC_CAPS_POST_UPDATE_RESET_RESTRICT:
>   2243                        caps->reset_restrict_support = (number == 1);
>   2244                        ice_debug(hw, ICE_DBG_INIT,
>   2245                                  "%s: reset_restrict_support = %d\n", 
> prefix,
>   2246                                  caps->reset_restrict_support);
>   2247                        break;
>   2248                case ICE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE:
>   2249                        caps->tx_sched_topo_comp_mode_en = (number ==
> 1);
>   2250                        break;
>   2251                case ICE_AQC_CAPS_FW_LAG_SUPPORT:
>   2252                        caps->roce_lag = !!(number &&
> ICE_AQC_BIT_ROCEV2_LAG);
>   2253                        ice_debug(hw, ICE_DBG_INIT, "%s: roce_lag = 
> %d\n",
>   2254                                  prefix, caps->roce_lag);
> > 2255                        caps->sriov_lag = !!(number &&
> ICE_AQC_BIT_SRIOV_LAG);
>   2256                        ice_debug(hw, ICE_DBG_INIT, "%s: sriov_lag = 
> %d\n",
>   2257                                  prefix, caps->sriov_lag);
>   2258                        break;
>   2259                default:
>   2260                        /* Not one of the recognized common 
> capabilities */
>   2261                        found = false;
>   2262                }
>   2263
>   2264                return found;
>   2265        }
>   2266
> 
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki


Tested-by: Rafal Romanowski <[email protected]>


Reply via email to