Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1268316imm; Fri, 27 Jul 2018 14:13:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUNeUg+tqhO1RCMB8Rb9L+PzC926RoYRSAgs4Udzc5IA0Zj0p5JEgzH1L5A/ZwDvHf51Ex X-Received: by 2002:a17:902:6bc8:: with SMTP id m8-v6mr7566747plt.162.1532725989591; Fri, 27 Jul 2018 14:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532725989; cv=none; d=google.com; s=arc-20160816; b=BsdIOux9GmwN5knpiNIiEJHf/dpre9WvChZKqA5A9Vw+ElqIM11igI9iTBR3BHECBL pOWqbVwSZUz8OEKmbXfAK0itHVWFrHNfV0j++qkxBDzNwAasLHmscWA7vIMZS+N3Tx0W a2+rNDejP7wf/65Oy1mhbRBfPH7UUJBNr2E5MZsBa3j4ltOq4+5tkEDqeTp+4Cvqk27b ndeRaW77+GUgvP2TmopgVa4T+zcyOEzG8icoXl3pcKyzTYnlZ/1mJMISHY8LTucbxJqA whjEV77hDvCVFVH93/+1I4TSzvcVHJj06Cprc/gNGuvZnMvsqD/89hBuo/GMu5hSV33G Wouw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=r2iEgQsP611FZVpAMI/jMRFnjq/Led+g8GjC8a0DD+M=; b=bDlqmY8An1zooo01ITLKdYbU1yXyY/AeNwIdO7NdKud3EmllhqcE4coGYUD9Ut+7+U TGFsGgsPFduaWywnTUuaHfT+/Fs4ZZy3so3BCL9eDNRPDF9ITtcr1HfO+L4QNNhZ2n1X o6WKKu8WWq9DAnDbTJ9ZcG41oG1kPaJptgojDudYTD1Q0pgE7g2teVIM8HoZXeA6KC/O OM01Mu3Yy10tzRXLz59SJcJbKja3jB1CvwhQDDrUR3bf6jEdJ+5xc8EUJcHecFTec6By eIgzGHI/5H1COP2XxAi6VjAcGf+UPmOUf/nH1OWf9zJ2v7jQrDJs5EUhLpdwyfiK86uo Htsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7-v6si4672081pfh.3.2018.07.27.14.12.54; Fri, 27 Jul 2018 14:13:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389686AbeG0Wfr (ORCPT + 99 others); Fri, 27 Jul 2018 18:35:47 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:39130 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389368AbeG0Wfr (ORCPT ); Fri, 27 Jul 2018 18:35:47 -0400 Received: from localhost (unknown [172.56.44.110]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 1642F108A9043; Fri, 27 Jul 2018 14:12:05 -0700 (PDT) Date: Fri, 27 Jul 2018 14:11:48 -0700 (PDT) Message-Id: <20180727.141148.820276355416116908.davem@davemloft.net> To: baijiaju1990@gmail.com Cc: pcnet32@frontier.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: amd: pcnet32: Replace GFP_ATOMIC with GFP_KERNEL in pcnet32_alloc_ring() From: David Miller In-Reply-To: <20180727075758.2516-1-baijiaju1990@gmail.com> References: <20180727075758.2516-1-baijiaju1990@gmail.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 27 Jul 2018 14:12:07 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jia-Ju Bai Date: Fri, 27 Jul 2018 15:57:58 +0800 > pcnet32_alloc_ring() is never called in atomic context. > It calls kcalloc() with GFP_ATOMIC, which is not necessary. > GFP_ATOMIC can be replaced with GFP_KERNEL. > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai Applied.