Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp477552pxj; Wed, 2 Jun 2021 04:07:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhv41YYe0dO1tZCcHU1ZA8ThN27SLae0ti3BW0yWdj3nyC8gaRkihtin19BUin8oAWoKiM X-Received: by 2002:a92:dc10:: with SMTP id t16mr4298751iln.75.1622632023525; Wed, 02 Jun 2021 04:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622632023; cv=none; d=google.com; s=arc-20160816; b=h7Sn2RUNQFjSc6S6i1uUOekNXv4Gqv7sS5/0DGxA3opx1bcfeOAJxC+Bz4S15FYK3f BXNsjd6EMhk+Kpy7VlBISBMeTqlx7hoKvvqvC3Yng17vI+LTx7GqjBojRWEBVYPDCGfT ripaIVpTfNTJW0EpgUew4pF+L0YPul42mg56nyOxxrmbMTRDXBOYB3lK7PVgWRrqY/ja O9VWNzDGo+1jnp7NjBqmDqTB2Ihniwzs+hVyNAtO8Bt+7ZQypDwAb79y9P/nz/ft3MBz 7NgOPYWWtJIVcH12pGLi7yLJ1Tiec69IZxbjn54jq9HJEgS8VOabT3jURBJc3ye2VFMJ lgTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=T5N7/RMUkiVDbuiI/R6b6bA+Ow6/X5dWAdIOLqDOBNo=; b=ydp4X1TSGNhTRTBYruCf9h2Z6rmunrrRGVrr6fPlOQchlC3ew3bVDXmdzm87fFMkJY Jtx6IRF0bG/Hu+Rj3fcin5iubCFTNHdv5+FNY5Y+f9KPdiCOrNxVWiKYkx7MWcUqPVIA VEu2PQLGgfvMBj/73gRfChVZ+vmQN5/lqgWdmUbX76hiv/af0VOb4oj1iH5ishtGh2IY yNAeAZuynF1gzfbPDyvgpWLbKZWWU4ipjSmds0nGWOfO5txuXiJhVy7+uyh2IfD0FbVo a5od12oaO9K2/cSUzCZtfvG/vDVXRBg8haghRYeE1zTD6qMblDi6PaJYH7IinZGlj2UL OHdA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r133si12755205jac.80.2021.06.02.04.06.50; Wed, 02 Jun 2021 04:07:03 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232421AbhFBLGb (ORCPT + 99 others); Wed, 2 Jun 2021 07:06:31 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2961 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbhFBLGK (ORCPT ); Wed, 2 Jun 2021 07:06:10 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Fw5gR15Wcz677f; Wed, 2 Jun 2021 19:01:23 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Wed, 2 Jun 2021 19:04:21 +0800 Received: from localhost.localdomain (10.67.165.24) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 2 Jun 2021 19:04:20 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 4/6] net: hdlc_cisco: remove unnecessary out of memory message Date: Wed, 2 Jun 2021 19:01:14 +0800 Message-ID: <1622631676-34037-5-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622631676-34037-1-git-send-email-huangguangbin2@huawei.com> References: <1622631676-34037-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li This patch removes unnecessary out of memory message, to fix the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/hdlc_cisco.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index 3f6a51a..0d29a2c 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c @@ -92,10 +92,9 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type, skb = dev_alloc_skb(sizeof(struct hdlc_header) + sizeof(struct cisco_packet)); - if (!skb) { - netdev_warn(dev, "Memory squeeze on %s()\n", __func__); + if (!skb) return; - } + skb_reserve(skb, 4); cisco_hard_header(skb, dev, CISCO_KEEPALIVE, NULL, NULL, 0); data = (struct cisco_packet *)(skb->data + 4); -- 2.8.1