Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp306378imm; Thu, 26 Jul 2018 19:43:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcmHPdbv/Z2Xf/cMnMVDMthvFh6liJW9la6Z/J3ENbrZKxE2+QFit+KiAzKclo2TUPRIgz4 X-Received: by 2002:a62:df4e:: with SMTP id u75-v6mr4655276pfg.195.1532659435876; Thu, 26 Jul 2018 19:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532659435; cv=none; d=google.com; s=arc-20160816; b=APSSnGoS7mkKycNh7uEsGmlhBDodigOtzByqBq1F8hJHNztLYe+sS89ZeeL1NsUJCQ f0j3A+xeku7vRtZ4mj7zVERIo1Ty3yyh1vVAxVh0PmORKyxcVet8qNKeA8L+vpYbT8nr V162F4as74DWeweW9G6gdA+hLqanmGPuIvsf4DH/ZkN8gtE/1TaH/O7gdGUnFem+/1UK Fs8AKxf/o/cf8sALPI1FtG8GEWKQ5ex01d1/rC3ocxIOkHLsrxvy+1aY6YPlnjBPDOPu MPupEiKM1r5Vyc33hPl2SU53c9LbDilkdPz+ed5AwwLFdectxN2qkFRg1yoyigA/4F1f qVIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=lhLdPSEjtof4PARL+jbQIELKrc8oApgcCwcTjMgi6lY=; b=G+vL3o4HoWxegCYMPds2FMCqguJWmOZKQjLNk1QTDnDxigirc9Gi7vPbn7yF3Xrks4 4VIr5iBpkHIh1YuWCiGfdSG8WaLizi/RvM1NScXvVQkfb4lFEh2pBFD29TQ736yQ1p+U +47nwSUKWRsEAFmB7biUk0WAlF6VhLVxssurJCJD3hjdqfM3M/3clEKDXZNUvazMzdyr 9EGW8sQZXZCipazDvhUCiJxQrEUUfd9crQdpmpH5/I2YlRe2d5nnFVQEuMwmkV+O78OL 4DlEgy0mdz8FZrDAmOEBqGj6bd8wvqPxo5AyUBMcXAX3gBkklCf/Fsfx0DUURyVAq+3r XcqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gx4p44DH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14-v6si2633912pgj.413.2018.07.26.19.43.17; Thu, 26 Jul 2018 19:43: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gx4p44DH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725884AbeG0EAz (ORCPT + 99 others); Fri, 27 Jul 2018 00:00:55 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46211 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbeG0EAy (ORCPT ); Fri, 27 Jul 2018 00:00:54 -0400 Received: by mail-pf1-f194.google.com with SMTP id u24-v6so1207253pfn.13; Thu, 26 Jul 2018 19:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=lhLdPSEjtof4PARL+jbQIELKrc8oApgcCwcTjMgi6lY=; b=Gx4p44DHIITEfz0JssWbN9Ri2R4PqAW4PQPfpRs9qLzFwmCVsJ2mrRxk3ei7aYJJuS /PHmnBiuqywk5SRxSNsnz7CC7VWW1atACA6bC8nspjwC/Z8xJ1Eyb60bNy8IPx7gjli3 K3Vvnle7tNt+fZhnfHWagFr+HmDzeOI4BtS5fZ/JE7pXtTIZ6mYVNjNvzGFb3s5kB9is eGwIxFiSb3Ce7SU8dj4In9c7qiJDKX0YRJQUJ87Lwr5fsYU0wzWGMFdNKoc3DkpIWmcu zJPttklfSCE8RcuUVwL9s+QBhxgukS86vsIOoj5cA56UkqksPs3ddr+/tsfrO92dzQvX tDHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lhLdPSEjtof4PARL+jbQIELKrc8oApgcCwcTjMgi6lY=; b=o06lP1jv3vqa7wdsI9AtTTDsLeLxpm/Ei+XWdCuSXUjWAkINiticP1hcK4myaCTWvY O2l+BCyiCrbAkC9iWw6FkSvL5riKlc5xWe9a9p221GFQ38fnFj+DzRtV9acy2o28kQwm W8q/gUvFT83YnL9SuzMfdJKmqIYn5j2Ph98c9wiL2z01DwwAR2JD8tZBIKsvqNdBOZfw lxF8W/DNhfOsXeGopQz63yEWyMfLGc63lKf3T+wqzQrStz3hT/qSayLqBBt7aCgNcHCL TxXjmz+7tlLgAbS2TK5Qv0TM7HkMqHw4vuYjaN2huZefFnFiZITEvMhnHkxtrbpGXtGx 6Lcw== X-Gm-Message-State: AOUpUlFPl07+K/q8DawUvPsTBbwHrP9RBbRlow0kPKpXdYu63q3YgzV0 GffWz4N7dc5unfbwyTbvi3Yn2YrB X-Received: by 2002:a62:4695:: with SMTP id o21-v6mr4655827pfi.176.1532659277361; Thu, 26 Jul 2018 19:41:17 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:6c14:7712:e625:1be4]) by smtp.gmail.com with ESMTPSA id c88-v6sm4257552pfe.132.2018.07.26.19.41.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 19:41:16 -0700 (PDT) From: Jia-Ju Bai To: isdn@linux-pingi.de, keescook@chromium.org, jeyu@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] isdn: mISDN: netjet: Replace GFP_ATOMIC with GFP_KERNEL in nj_probe() Date: Fri, 27 Jul 2018 10:41:09 +0800 Message-Id: <20180727024109.1702-1-baijiaju1990@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org nj_probe() is never called in atomic context. It calls kzalloc() 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 --- drivers/isdn/hardware/mISDN/netjet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index 89d9ba8ed535..2b317cb63d06 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c @@ -1084,7 +1084,7 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return -ENODEV; } - card = kzalloc(sizeof(struct tiger_hw), GFP_ATOMIC); + card = kzalloc(sizeof(struct tiger_hw), GFP_KERNEL); if (!card) { pr_info("No kmem for Netjet\n"); return err; -- 2.17.0