Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp553244imm; Fri, 27 Jul 2018 01:45:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfWf7kgf8XIHMn4Ct1PXSoJFwYZeYH5wQEIpIx1UhNGMSnwTXCNmnr14jjLD6DHKa9L3izt X-Received: by 2002:a62:5a01:: with SMTP id o1-v6mr5795138pfb.0.1532681137187; Fri, 27 Jul 2018 01:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532681137; cv=none; d=google.com; s=arc-20160816; b=tiUGRJtRuxyf61j3LG3itHedeDJgLINQ+4FmpqoVjHNtHAoCCQoQYGXNU2TmuJkI05 59/2BVt8gW719xu78iSS3dN36PU68clQz3uG/LYQWVFzUJB/8RDnmdLmaMP339I6U3am 0jQDh/s7MrFHpKrT3Ilk1h5dn2ANO64FY1v9ad5MBIWBwUJZ33h1u8Z4yxfTKndLIZfP max+KvbqHBfJ+4dIzM+fM2PcyIYRFIF3qZ+YEc4P9+o5YVD1ucNq8SV0aCqsyhNN83DJ rQWEfJzOanHeME8FcdZXSfb0hXKp6Hq6Dsm1AZnv+cMvsIm2EthT55TxzQ8CfPVTR0H9 J9+g== 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=ewDV6dedJ33kYqT8u9IK92Ungk2gWImAxEcOARmyGFI=; b=hZakcjKDjh22ciUOkMQHOPYUVAB3UlaABYhCLb33T3pmZlhNrnDkFJPHeh0tpnzXEn pK3JHLfZpDoJaOP5RL/xA9pM93TChWeVVhaawsacZGTG+DO7KRkUvsJk1pLUV5muzqCs 3WkAHbgKBfJzVs5Xz4WEh6q9Ll1m3kiAqlqAETZwBN7VfzQGRj12/FVOvyBgqNAB3mRh jzKWuqCukKRS8pEIiThV6P4pdN9GjjIOPZHG/W7XL6KJeks+zJOtBRquHL4qILXO/j4U xITGhHCdKTavgEqwq8dg4CtLVwghWPFXMHob9CGnjYkZtg600Xb1NnWpfPrsoh3MqE1p 6u5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="VWyj/zd6"; 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 o12-v6si3063616plg.154.2018.07.27.01.45.19; Fri, 27 Jul 2018 01:45:37 -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="VWyj/zd6"; 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 S1730564AbeG0KER (ORCPT + 99 others); Fri, 27 Jul 2018 06:04:17 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:43918 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729489AbeG0KEQ (ORCPT ); Fri, 27 Jul 2018 06:04:16 -0400 Received: by mail-pf1-f196.google.com with SMTP id j26-v6so1504622pfi.10; Fri, 27 Jul 2018 01:43:25 -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=ewDV6dedJ33kYqT8u9IK92Ungk2gWImAxEcOARmyGFI=; b=VWyj/zd6HN8aEdCC6RB8s/zVRlO/WU1JlxxLfasOVNNaz4JJmsv+nSLL8U0t7gRPJz e2IOIhh2o6RXMngSee013eTdiTerJ+4jBZ+vSDL3dkc5OMW8Z+mtYk9XjYrldboGsqz6 zx+pcD2l0PL0U82eycu9bKEuzj6quB3stSw/fxfNCbkFUFyuBQOjc1yBcA8IQLTMxj1F zbCIpOnRz1q3XiQTEDVl56Hyj923DQ6UAYdVPksHKs13EM9uazbtfWR52P7mIcrqvj0h VKA5+OXpTUg073tJtDvP76Ixu21MzCkkfBNqhE4VF0JAwZ/bRqTMYuj/OsVPPy0ieZhl AAdw== 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=ewDV6dedJ33kYqT8u9IK92Ungk2gWImAxEcOARmyGFI=; b=V3VE57Uxu0vLH6OC8FaWNQl6FxUtP6oXL9bJZw7QOOsyvgOYzfWQ46A7lh/vtqpzmG p7FQGbRXYh7h3y0EO9cx6Mj7kY+vqbfpyPGr5b4+dh6KbDsXsjieOo19hk6ETxn2fv9p z6JX/GjX1iM+IUgmLDZemX+bBWkb+ZA0jvLsClNqNbYF7Bzf86P46mjMbMYtqbNAYKof iB4xtFivUNBDeRKIIiIkgYa3z6VhyQSbYCn3SK9hwywZ3l/ykh76etxeTVNyEBUsaC3a VkMeINtNIOE43tlIoKC1oDTFoXOOgqOLTEFelNZ9JUPotTssDFXDE71t8ZtzV+KtXPlq oYdw== X-Gm-Message-State: AOUpUlEHRiodxllW8VtseihjlXDTS48git9zaF/TvnxI6cdS0JqKR+r7 867amAnGGkkD4REpntQRzhk= X-Received: by 2002:a62:df82:: with SMTP id d2-v6mr5692678pfl.189.1532681005047; Fri, 27 Jul 2018 01:43:25 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:8ca7:1cde:b1e6:2647]) by smtp.gmail.com with ESMTPSA id e126-v6sm8107269pfg.31.2018.07.27.01.43.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 01:43:24 -0700 (PDT) From: Jia-Ju Bai To: kvalo@qca.qualcomm.com Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] net: wireless: ath6kl: Replace GFP_ATOMIC with GFP_KERNEL in ath6kl_bmi_init() Date: Fri, 27 Jul 2018 16:43:18 +0800 Message-Id: <20180727084318.3345-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 ath6kl_bmi_init() 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/net/wireless/ath/ath6kl/bmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/bmi.c b/drivers/net/wireless/ath/ath6kl/bmi.c index 334dbd834b3a..bde5a10d470c 100644 --- a/drivers/net/wireless/ath/ath6kl/bmi.c +++ b/drivers/net/wireless/ath/ath6kl/bmi.c @@ -534,7 +534,7 @@ int ath6kl_bmi_init(struct ath6kl *ar) /* cmd + addr + len + data_size */ ar->bmi.max_cmd_size = ar->bmi.max_data_size + (sizeof(u32) * 3); - ar->bmi.cmd_buf = kzalloc(ar->bmi.max_cmd_size, GFP_ATOMIC); + ar->bmi.cmd_buf = kzalloc(ar->bmi.max_cmd_size, GFP_KERNEL); if (!ar->bmi.cmd_buf) return -ENOMEM; -- 2.17.0