net/ena/base: add missing unlikely
authorMichal Krawczyk <mk@semihalf.com>
Thu, 17 Sep 2020 05:30:28 +0000 (07:30 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 17:19:09 +0000 (19:19 +0200)
To align the error checking code with other parts of the ena_com,
the conditional check is being tested for the error was wrapped inside
unlikely().

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/ena/base/ena_com.c

index f2668f7..3686ae0 100644 (file)
@@ -2973,7 +2973,7 @@ int ena_com_config_dev_mode(struct ena_com_dev *ena_dev,
        ena_dev->tx_max_header_size = llq_info->desc_list_entry_size -
                (llq_info->descs_num_before_header * sizeof(struct ena_eth_io_tx_desc));
 
-       if (ena_dev->tx_max_header_size == 0) {
+       if (unlikely(ena_dev->tx_max_header_size == 0)) {
                ena_trc_err("the size of the LLQ entry is smaller than needed\n");
                return -EINVAL;
        }