ionic: remove some unnecessary oom messages
authorShannon Nelson <snelson@pensando.io>
Tue, 1 Dec 2020 00:25:45 +0000 (16:25 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Dec 2020 01:14:23 +0000 (17:14 -0800)
Remove memory allocation fail messages where the OOM stack
trace will make it obvious which allocation request failed.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_dev.c
drivers/net/ethernet/pensando/ionic/ionic_lif.c
drivers/net/ethernet/pensando/ionic/ionic_main.c

index 318db5f77fdb15d772752dc45ba509c087148149..fb2b5bf179d7938caf95606127dbc9fdf211f532 100644 (file)
@@ -142,7 +142,7 @@ int ionic_heartbeat_check(struct ionic *ionic)
 
                        work = kzalloc(sizeof(*work), GFP_ATOMIC);
                        if (!work) {
-                               dev_err(ionic->dev, "%s OOM\n", __func__);
+                               dev_err(ionic->dev, "LIF reset trigger dropped\n");
                        } else {
                                work->type = IONIC_DW_TYPE_LIF_RESET;
                                if (fw_status & IONIC_FW_STS_F_RUNNING &&
index 0afec2fa572dd6910746d9661693b693647397ee..0b7f2def423c37bc7f7f4cd55059414c83023f1e 100644 (file)
@@ -842,7 +842,7 @@ static bool ionic_notifyq_service(struct ionic_cq *cq,
        case IONIC_EVENT_RESET:
                work = kzalloc(sizeof(*work), GFP_ATOMIC);
                if (!work) {
-                       netdev_err(lif->netdev, "%s OOM\n", __func__);
+                       netdev_err(lif->netdev, "Reset event dropped\n");
                } else {
                        work->type = IONIC_DW_TYPE_LIF_RESET;
                        ionic_lif_deferred_enqueue(&lif->deferred, work);
@@ -1051,10 +1051,8 @@ static int ionic_lif_addr(struct ionic_lif *lif, const u8 *addr, bool add,
 
        if (!can_sleep) {
                work = kzalloc(sizeof(*work), GFP_ATOMIC);
-               if (!work) {
-                       netdev_err(lif->netdev, "%s OOM\n", __func__);
+               if (!work)
                        return -ENOMEM;
-               }
                work->type = add ? IONIC_DW_TYPE_RX_ADDR_ADD :
                                   IONIC_DW_TYPE_RX_ADDR_DEL;
                memcpy(work->addr, addr, ETH_ALEN);
@@ -1183,7 +1181,7 @@ static void ionic_set_rx_mode(struct net_device *netdev, bool can_sleep)
                if (!can_sleep) {
                        work = kzalloc(sizeof(*work), GFP_ATOMIC);
                        if (!work) {
-                               netdev_err(lif->netdev, "%s OOM\n", __func__);
+                               netdev_err(lif->netdev, "rxmode change dropped\n");
                                return;
                        }
                        work->type = IONIC_DW_TYPE_RX_MODE;
index d355676f6c160d685239d52565cf96075297eae2..fbc57de6683efe5888c14b8818d55e3bae0c5b8a 100644 (file)
@@ -511,10 +511,8 @@ int ionic_port_init(struct ionic *ionic)
                                                     idev->port_info_sz,
                                                     &idev->port_info_pa,
                                                     GFP_KERNEL);
-               if (!idev->port_info) {
-                       dev_err(ionic->dev, "Failed to allocate port info\n");
+               if (!idev->port_info)
                        return -ENOMEM;
-               }
        }
 
        sz = min(sizeof(ident->port.config), sizeof(idev->dev_cmd_regs->data));