Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp582027pxj; Thu, 17 Jun 2021 09:08:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynBYxm4l1b6ffI8vcGrzHHtsT199hIliIBmPYBIA/lHsz+7g6zC4uhSM3Ie3ZZtxALX8Zq X-Received: by 2002:a17:906:49ce:: with SMTP id w14mr6066683ejv.273.1623946127846; Thu, 17 Jun 2021 09:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623946127; cv=none; d=google.com; s=arc-20160816; b=gvDXPQWUCNPNPQImfYCh1Ln2K2tNM0m9T4OTc8mANfV9o/jYb/+l939Q4FeFppwg/t +nCWnO9I3YR923s6chQVdfPno91gRN99HgnS/ko3I/SvP+W1HFcHgF7tNESig2+B+vEq 6GGqHoiy5dzZeaOH1z5noblYZxa4+ogfeqcs9CkpAk7Ht/Ptp43N/pFJpAJaKKg2e5LZ 12Jv2g6AkrH7JIyAbNjIO3VAiFHPgfKjLB9V1eJhVEDP3ynSTThQ0fRpV8iwN4uaSHeY o+2SthvPCk7E8phCSZOgIkbnZ9k01EQz9RzhgcHLOU90p4/YaBjvMMOeuehISYY9tIV7 DFLA== 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=jjAYDeJGLeb+KyBuYrPW9v4cPyI4mCarla+64kjLb5Q=; b=h/4Trd/9GFvS1L0H9pAKVAIJqWb4G9FygsVL531dLTVhjL4m8QF85w23pUIXu2zw0K wWAZRieyszed3Bgf/lzFGMnOM/LblpKopkbxkSRtSKk72u4hkxiZQhM7sc99r5lO1kDn IWnKlbwAJyrM35UfYgbhFz6VKS2xZBHSkuk8Wq6ffYtSMdH9NwMEdn+cJOEXG+CKpMK8 jQg5zw3zSlEzdR+XdLtPYnuh+H/K7M/UfOsvnHvoG1ApBBrcv+e+Si/AwbZfmPiuA9Rk FHa5UxkVnYJQ6NJ5FhKp/9WJqPNHglBNoKIgGJaGaxLkgXNd5PO4nM0lD8XbmioCK2F9 pcwQ== 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 bl4si6921019ejb.689.2021.06.17.09.08.23; Thu, 17 Jun 2021 09:08:47 -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 S233023AbhFQOIy (ORCPT + 99 others); Thu, 17 Jun 2021 10:08:54 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:7361 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232947AbhFQOIo (ORCPT ); Thu, 17 Jun 2021 10:08:44 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4G5NzX2lrNz6yLC; Thu, 17 Jun 2021 22:02:32 +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; Thu, 17 Jun 2021 22:06:32 +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; Thu, 17 Jun 2021 22:06:32 +0800 From: Guangbin Huang To: , , , , CC: , , , Subject: [PATCH V2 net-next 5/6] net: hdlc_ppp: remove unnecessary out of memory message Date: Thu, 17 Jun 2021 22:03:18 +0800 Message-ID: <1623938599-25981-6-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1623938599-25981-1-git-send-email-huangguangbin2@huawei.com> References: <1623938599-25981-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_ppp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index fb5102c1afc6..aec9cc4d5b48 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c @@ -219,10 +219,9 @@ static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code, skb = dev_alloc_skb(sizeof(struct hdlc_header) + sizeof(struct cp_header) + magic_len + len); - if (!skb) { - netdev_warn(dev, "out of memory in ppp_tx_cp()\n"); + if (!skb) return; - } + skb_reserve(skb, sizeof(struct hdlc_header)); cp = skb_put(skb, sizeof(struct cp_header)); -- 2.8.1