Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1079707ybh; Thu, 16 Jul 2020 02:32:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgEeeCJLlBfwGjRrVut1DAe+VQJxPWbImbGG7W0aGYLRzTsktylLwQzDkaPvfrPe/4YYUY X-Received: by 2002:a17:906:3fc7:: with SMTP id k7mr3037171ejj.332.1594891936204; Thu, 16 Jul 2020 02:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594891936; cv=none; d=google.com; s=arc-20160816; b=JkrIo3t5LIt0/LTpvwkNG9K1kt9DmYb8B7U3xHmeq10WQJ0c8t68C9L2VDsxc4Kvmo f7hpLMqWriQ4ySO/88yxx5m5cb7/gouBmJ9bL00pUfvXdDAe4NXaPa4R9pHVk8ivhL6U da3cfMAHJteujM4SyEMee6GixXj9/Ef1wgBgbdt/ioNKZiF+GYqZbTNC0hzYX9FVPXAW sAJxl+LmUNaw/ZklaUhPnbVb7Dk9116F0RVd0H8RyrQ3jrIK+KyhF0hei5ZHiFdd9DPj zl5+P2Av/uRz6GqbVnks3xrXD5HdLsu7K6aZeetFDhPwN0CDYdZ+c59/oee7I5d4+0BF 0PRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=v9iFSMQ8ZM9s6jtM13KFNoeKTdClo00X6ap6HA7XpXc=; b=NVK3n0cwALxOceCHbdyMMvsZfgDCqU7COuajKJdXC60gvHMOpiZDrXFTkJi9Ffju5d ykEcaNZI+37hSTvrqETmvyPZUfrsDO4f1owuTVVs+OtcN1/Zu6yecv4Lgv1/zYEfgiWo xJesO2BTJn5kQYufSPxK0Frh8Pm2mAbNXSQObsv0cB42vKLniVgVhQv1JHmmVKP9M2uK rPDbFASIJbXNsXUI5U4prXKsY//Xh5tMLS/O1zH1+NvL+pF1SgRyMCPwXZP6EAVAhjtC 2R6n6LVt2lJQINcyWoUV2aW0RKTC1BLp6n4XEg2tNHleE9Enf7fRLUip0CnMLE5WkAPR bUrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si3010012ejd.449.2020.07.16.02.31.53; Thu, 16 Jul 2020 02:32:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727030AbgGPJbT (ORCPT + 99 others); Thu, 16 Jul 2020 05:31:19 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51958 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726769AbgGPJbS (ORCPT ); Thu, 16 Jul 2020 05:31:18 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8601BF5814DDACD0A27C; Thu, 16 Jul 2020 17:31:15 +0800 (CST) Received: from huawei.com (10.174.28.241) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Thu, 16 Jul 2020 17:31:09 +0800 From: Bixuan Cui To: , , CC: , , , , Subject: [PATCH] net: neterion: vxge: reduce stack usage in VXGE_COMPLETE_VPATH_TX Date: Thu, 16 Jul 2020 17:32:47 +0000 Message-ID: <20200716173247.78912-1-cuibixuan@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.28.241] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the warning: [-Werror=-Wframe-larger-than=] drivers/net/ethernet/neterion/vxge/vxge-main.c: In function'VXGE_COMPLETE_VPATH_TX.isra.37': drivers/net/ethernet/neterion/vxge/vxge-main.c:119:1: warning: the frame size of 1056 bytes is larger than 1024 bytes Signed-off-by: Bixuan Cui --- drivers/net/ethernet/neterion/vxge/vxge-main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c index b0faa737b817..97ddfc9debd4 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c @@ -100,8 +100,14 @@ static inline void VXGE_COMPLETE_VPATH_TX(struct vxge_fifo *fifo) struct sk_buff **temp; #define NR_SKB_COMPLETED 128 struct sk_buff *completed[NR_SKB_COMPLETED]; + struct sk_buff **completed; int more; + completed = kcalloc(NR_SKB_COMPLETED, sizeof(*completed), + GFP_KERNEL); + if (!completed) + return; + do { more = 0; skb_ptr = completed; @@ -116,6 +122,8 @@ static inline void VXGE_COMPLETE_VPATH_TX(struct vxge_fifo *fifo) for (temp = completed; temp != skb_ptr; temp++) dev_consume_skb_irq(*temp); } while (more); + + free(completed); } static inline void VXGE_COMPLETE_ALL_TX(struct vxgedev *vdev) -- 2.17.1