Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1268970imm; Fri, 27 Jul 2018 14:13:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdl7E9HbwLjPIxfMK+KhoeBZsJDC3Wyob5oQ4cRR2xUrpMVcPaNYPwB9lXBlfdZUK7aCGOP X-Received: by 2002:a62:464f:: with SMTP id t76-v6mr8219689pfa.118.1532726035399; Fri, 27 Jul 2018 14:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532726035; cv=none; d=google.com; s=arc-20160816; b=HXusNLUejMrEy3PwwPvZRZ7HW5emBMzHkk1QxdNvTouLF2Prq018hjIVnJRwRoN3ve S/qxl+3sgcEevVez2fjcTzTHVXWkwdJI8InEmA32ftlSuglILex3MQi3rgqeKNQjdxtt MFBFeQYI5AZ/5mXBoYJDmW+E43voLI5UxSb83IWDH99Kor3S5KvQq7QqgEzJ3O9M9mX2 DFIry0g6HqfW9cQ76g42Rq9qgPDvn8pKd1bgd6L+ps2t7cWCS3G5YxVxEs9CYATEzG2q 0Hmc9i9HhJ2GhJ8hNzj6ui+lAJNzyT7zebobi5fiPJ6lkig/tlEd2mXrrx/QU9CeO6F8 JHTw== 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=hoZR/Vk2RmF3qEOd7pIuGZkAgpOgA91TO+e5x4A/cQg=; b=vMtv2F6zM4bRQ93s2SDfs/EehZlJBmPfwTa8cIvcF4zI7o0GnyLY7ZuR8na7IyVure +UNe1Jv9KNvPDWNeizUVsEWeESvUytCxyMxu41I1T/pdCd3zLIEPNtKj+SLkKXqa1QnD NyWCXQgdej5YiH8W5Rid8Er7dRCjAYUDu8fMN7Cyn+1QUfVph7ubq9aWzIFzkfz0yJ5t 2P/jJFgyfyelQMma8ZSZf4efnWKyo3koX/cwh1jgUAz+zF3gmD/owRBGeq/oWt/Fpgz+ VhLr2HG2BcuPAmCwShQMWBNImkFuNzw1jvjGSt3j4Wz+KwjhugTLwINcq8h5BoG3XCcM HW1w== 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 k184-v6si4260340pge.209.2018.07.27.14.13.41; Fri, 27 Jul 2018 14:13:55 -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 S2389777AbeG0WgS (ORCPT + 99 others); Fri, 27 Jul 2018 18:36:18 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:39168 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389542AbeG0WgS (ORCPT ); Fri, 27 Jul 2018 18:36:18 -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 5322E108A9043; Fri, 27 Jul 2018 14:12:36 -0700 (PDT) Date: Fri, 27 Jul 2018 14:12:34 -0700 (PDT) Message-Id: <20180727.141234.138644678075190662.davem@davemloft.net> To: baijiaju1990@gmail.com Cc: yanjun.zhu@oracle.com, keescook@chromium.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: nvidia: forcedeth: Replace GFP_ATOMIC with GFP_KERNEL in nv_probe() From: David Miller In-Reply-To: <20180727082931.7340-1-baijiaju1990@gmail.com> References: <20180727082931.7340-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:38 -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 16:29:31 +0800 > nv_probe() is never called in atomic context. > It calls dma_alloc_coherent() 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.