Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp304155imm; Thu, 26 Jul 2018 19:40:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcX5nUP3MA+FVmSU5ltc5M+1TDk5ULL9GNItqt74JPKW7RT0aV8R+OBQsNfuJkeN0UTlF8y X-Received: by 2002:a65:630e:: with SMTP id g14-v6mr4294434pgv.153.1532659220136; Thu, 26 Jul 2018 19:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532659220; cv=none; d=google.com; s=arc-20160816; b=Mn7Ez39XWOjoEct7Z7OqfxLbINFJyKJFiUh2moFXENdNW+p7QTtHeGUG35ZSSCX9oV PIOd/Au7IbJLYif6/hkPsGW0pfApAyyhw/edKYZk45pYSxrlA/5PZeH6azETwiVVWyaN GdnfA72YxGmDJBBZJlMiMQfK93uG0g4HY/0RcqjD+xcohKuNAxHbVp0nImRyE0Fodm06 Hh5xSjXYDJ7Zz84rB24bBO4xRlXPvrhzPYIFAHADAjIC66UyhUofSsR3BNnSK7EuiPwl R2wuvCev9BDuiXEdjxVfBVzBqgTUbt6ZoojHqOTLh9HplVB9UulEvvtazVy8TgXWPk+Y F1Zw== 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=U/8EoisJiNq1/K+lxiMq3yA2CfsmBsV97hxFEcc1F9s=; b=OyCjz9wjRoI2ujrXTKzqlxx536MrCI9Jiz1vp7FJbS40h3nGDusWyWYpB5G2/nNskw HM/VWOG/D6LzMPml45tmKF3tSluSOkK4m8+YL3ZygYJDQZOkLUeDUCJvsrHUBfk5Yh0f 6NrWpEq3zHUQkxJ6ymIhXQTY58UTq+YbeegH6QLqOxVmhtLg8yZQ0cjtv79bS/vfYo38 c7Hkm0hRGrSZzUKkcuDGfPnINdhO3IHfok1Orwh3RlKvGxiLvpAYqaKuOL45ZNwgntMW 3J0BKAfmobfjZ7l28QS/ivlBELvnSa9epAPWI5ar8LZycNIOjvL8JNm9dS2DiDC0WuY4 Iwjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P+7ieaIV; 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 t8-v6si2384828plo.77.2018.07.26.19.40.04; Thu, 26 Jul 2018 19:40:20 -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=P+7ieaIV; 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 S1732180AbeG0D6w (ORCPT + 99 others); Thu, 26 Jul 2018 23:58:52 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:37236 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731994AbeG0D6w (ORCPT ); Thu, 26 Jul 2018 23:58:52 -0400 Received: by mail-pl0-f68.google.com with SMTP id 31-v6so1657026plc.4; Thu, 26 Jul 2018 19:39:15 -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=U/8EoisJiNq1/K+lxiMq3yA2CfsmBsV97hxFEcc1F9s=; b=P+7ieaIVd07WkS0XWvfiPYWgrwl8ijwgtXnNRNoKSvEgU5Xptc8CATUz5oHuU8qUXu /2farl/x0EAo4PV7DIbU1RoLFxdi+l2u2pU2ZAX6FlrxJAWMHO2rdwt3tf8j06j1WBQ5 mkBXzMlce2HYYKriPAb3sEr9HbrnChLwNYA3zXU63teQhGLejf1EN9mkLJJyD92ndSIa ReLGIqoNL7TntQsq1pM4Z0wvDS5Mq6GFA9WMD4IZHpTgZLZAXR7v4CvQKAAL49L44Vqb 4nUHH+X7MgPUHvaiMFJGnCowKOy8YRoEdKV/lcI/Ryalc7qSdBIm6IrW89DnjPgEvjny Wb9w== 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=U/8EoisJiNq1/K+lxiMq3yA2CfsmBsV97hxFEcc1F9s=; b=c3oFV7mrElmuVMYrp8SGTO3RiMUom0HNlmRctjORNqyKeAZTpBlAcmuQWvNTSA8dMN IhVyXzFdgJ+agfF1TeHYhXqyhRr9sQQr0Dlpwb0tRQ0DhXDjLkAd2A3evuOV34lZ6YLb /VC9QdJhuNlia8tFH1ptrO230Spf8o5Buno8OVRGwLwbCZqrkbN4Lck/CYbwNPSz44x3 3SOqKXap9vIoRR5gXdKwNKFYQluffGMSD0EdW7hCMtofPTnyYkphw/dQgIRXFAEBDdLN UWr0yHSGA2IvqhTu6gEplfiZNleUhgeWgtUAMAIROoTipt77XPbkezCD7oI5IDx0H9cw JHAg== X-Gm-Message-State: AOUpUlGyopHmfH+00fB0zH6WAONLgAmAlep+oHPqmOKILct1ORqQG3Mk 2g65WPfLqNoA9rkdw+C6DCE= X-Received: by 2002:a17:902:6e16:: with SMTP id u22-v6mr4128507plk.13.1532659155564; Thu, 26 Jul 2018 19:39:15 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:6c14:7712:e625:1be4]) by smtp.gmail.com with ESMTPSA id g11-v6sm9575217pgi.90.2018.07.26.19.39.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 19:39:14 -0700 (PDT) From: Jia-Ju Bai To: isdn@linux-pingi.de, keescook@chromium.org, davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] isdn: mISDN: hfcpci: Replace GFP_ATOMIC with GFP_KERNEL in hfc_probe() Date: Fri, 27 Jul 2018 10:39:06 +0800 Message-Id: <20180727023906.1590-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 hfc_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/hfcpci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 34c93874af23..5a2e2455761f 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -2219,7 +2219,7 @@ hfc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) struct hfc_pci *card; struct _hfc_map *m = (struct _hfc_map *)ent->driver_data; - card = kzalloc(sizeof(struct hfc_pci), GFP_ATOMIC); + card = kzalloc(sizeof(struct hfc_pci), GFP_KERNEL); if (!card) { printk(KERN_ERR "No kmem for HFC card\n"); return err; -- 2.17.0