i40evf: remove unnecessary log messages
authorMitch Williams <mitch.a.williams@intel.com>
Sat, 10 May 2014 04:49:04 +0000 (04:49 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 8 Jun 2014 09:01:29 +0000 (02:01 -0700)
We don't need to print log messages when we encounter an out-of-memory
condition, as the allocator will do this for us. Also, remove a Tx hang
message that duplicates the one emitted by the netdev layer, and a
duplicate message in the watchdog.

Change-ID: If2056e6135fe248f66ea939778f9895660f4d189
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf_main.c
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c

index feff317befb637db16b17174da29600bd8fbfc26..360a91188437c301366cad5feff96e6e0a6983b3 100644 (file)
@@ -172,7 +172,6 @@ static void i40evf_tx_timeout(struct net_device *netdev)
        struct i40evf_adapter *adapter = netdev_priv(netdev);
 
        adapter->tx_timeout_count++;
-       dev_info(&adapter->pdev->dev, "TX timeout detected.\n");
        if (!(adapter->flags & I40EVF_FLAG_RESET_PENDING)) {
                adapter->flags |= I40EVF_FLAG_RESET_NEEDED;
                schedule_work(&adapter->reset_task);
@@ -662,12 +661,9 @@ i40evf_vlan_filter *i40evf_add_vlan(struct i40evf_adapter *adapter, u16 vlan)
        f = i40evf_find_vlan(adapter, vlan);
        if (NULL == f) {
                f = kzalloc(sizeof(*f), GFP_ATOMIC);
-               if (NULL == f) {
-                       dev_info(&adapter->pdev->dev,
-                                "%s: no memory for new VLAN filter\n",
-                                __func__);
+               if (NULL == f)
                        return NULL;
-               }
+
                f->vlan = vlan;
 
                INIT_LIST_HEAD(&f->list);
@@ -771,8 +767,6 @@ i40evf_mac_filter *i40evf_add_filter(struct i40evf_adapter *adapter,
        if (NULL == f) {
                f = kzalloc(sizeof(*f), GFP_ATOMIC);
                if (NULL == f) {
-                       dev_info(&adapter->pdev->dev,
-                                "%s: no memory for new filter\n", __func__);
                        clear_bit(__I40EVF_IN_CRITICAL_TASK,
                                  &adapter->crit_section);
                        return NULL;
@@ -1332,8 +1326,7 @@ static void i40evf_watchdog_task(struct work_struct *work)
            (rd32(hw, I40E_VFGEN_RSTAT) & 0x3) != I40E_VFR_VFACTIVE) {
                adapter->state = __I40EVF_RESETTING;
                adapter->flags |= I40EVF_FLAG_RESET_PENDING;
-               dev_err(&adapter->pdev->dev, "Hardware reset detected.\n");
-               dev_info(&adapter->pdev->dev, "Scheduling reset task\n");
+               dev_err(&adapter->pdev->dev, "Hardware reset detected\n");
                schedule_work(&adapter->reset_task);
                adapter->aq_pending = 0;
                adapter->aq_required = 0;
@@ -1610,11 +1603,9 @@ static void i40evf_adminq_task(struct work_struct *work)
 
        event.msg_size = I40EVF_MAX_AQ_BUF_SIZE;
        event.msg_buf = kzalloc(event.msg_size, GFP_KERNEL);
-       if (!event.msg_buf) {
-               dev_info(&adapter->pdev->dev, "%s: no memory for ARQ clean\n",
-                                __func__);
+       if (!event.msg_buf)
                return;
-       }
+
        v_msg = (struct i40e_virtchnl_msg *)&event.desc;
        do {
                ret = i40evf_clean_arq_element(hw, &event, &pending);
index b3cd3cd644a1563cfd806d15a5d0a8b622d0dade..13faacdfabba2f90166de71f8a1c21aaba0f80b6 100644 (file)
@@ -219,11 +219,9 @@ void i40evf_configure_queues(struct i40evf_adapter *adapter)
        len = sizeof(struct i40e_virtchnl_vsi_queue_config_info) +
                       (sizeof(struct i40e_virtchnl_queue_pair_info) * pairs);
        vqci = kzalloc(len, GFP_ATOMIC);
-       if (!vqci) {
-               dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
-                       __func__);
+       if (!vqci)
                return;
-       }
+
        vqci->vsi_id = adapter->vsi_res->vsi_id;
        vqci->num_queue_pairs = pairs;
        vqpi = vqci->qpair;
@@ -332,11 +330,8 @@ void i40evf_map_queues(struct i40evf_adapter *adapter)
              (adapter->num_msix_vectors *
                sizeof(struct i40e_virtchnl_vector_map));
        vimi = kzalloc(len, GFP_ATOMIC);
-       if (!vimi) {
-               dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
-                       __func__);
+       if (!vimi)
                return;
-       }
 
        vimi->num_vectors = adapter->num_msix_vectors;
        /* Queue vectors first */
@@ -402,11 +397,9 @@ void i40evf_add_ether_addrs(struct i40evf_adapter *adapter)
        }
 
        veal = kzalloc(len, GFP_ATOMIC);
-       if (!veal) {
-               dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
-                       __func__);
+       if (!veal)
                return;
-       }
+
        veal->vsi_id = adapter->vsi_res->vsi_id;
        veal->num_elements = count;
        list_for_each_entry(f, &adapter->mac_filter_list, list) {
@@ -465,11 +458,9 @@ void i40evf_del_ether_addrs(struct i40evf_adapter *adapter)
                len = I40EVF_MAX_AQ_BUF_SIZE;
        }
        veal = kzalloc(len, GFP_ATOMIC);
-       if (!veal) {
-               dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
-                       __func__);
+       if (!veal)
                return;
-       }
+
        veal->vsi_id = adapter->vsi_res->vsi_id;
        veal->num_elements = count;
        list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) {
@@ -529,11 +520,9 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter)
                len = I40EVF_MAX_AQ_BUF_SIZE;
        }
        vvfl = kzalloc(len, GFP_ATOMIC);
-       if (!vvfl) {
-               dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
-                       __func__);
+       if (!vvfl)
                return;
-       }
+
        vvfl->vsi_id = adapter->vsi_res->vsi_id;
        vvfl->num_elements = count;
        list_for_each_entry(f, &adapter->vlan_filter_list, list) {
@@ -591,11 +580,9 @@ void i40evf_del_vlans(struct i40evf_adapter *adapter)
                len = I40EVF_MAX_AQ_BUF_SIZE;
        }
        vvfl = kzalloc(len, GFP_ATOMIC);
-       if (!vvfl) {
-               dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
-                       __func__);
+       if (!vvfl)
                return;
-       }
+
        vvfl->vsi_id = adapter->vsi_res->vsi_id;
        vvfl->num_elements = count;
        list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) {