Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2216679ybz; Thu, 23 Apr 2020 13:48:29 -0700 (PDT) X-Google-Smtp-Source: APiQypJSyl/J3XMZyy6cq7q5KRe1GltiPpCfHeV1fUFjs4R/xytgWisgY6FYchCXa8EREMqD99zG X-Received: by 2002:a17:906:9450:: with SMTP id z16mr4179117ejx.166.1587674909208; Thu, 23 Apr 2020 13:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587674909; cv=none; d=google.com; s=arc-20160816; b=kib4CjFKRIOvGPxBTVhNNpznkWECK0JDFqY4L8Nweg7E2SG04zjH7CnVH3V3AFz8S0 h3F0LOGS0dNtTZN1YIuLs/iS0Knx2w+8QZPEcMlTUs6SOLKtZEgLx26XPVcQEjgNhtfa j8YGDigMCyhxt67YUyNOr8xhsA0OSGfPzvqoRfoPJegIAXhx/Ub8mQzrZz94FspHPsaD FchONsQHYEC1tZcd4sCiWEiKk2njhNBstEccU4049ycjfDaHIxg+++MuVDlsDlBKeiKB ANb7bJa4kxt/n0IRIUIGkNlxD3rHooQ8SqYMzXa8d8WeA4AkVR8HlCD9a25F+NLre31N rE1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=fp+ULM5TbtPMfwULBoKayYH7fMwxEQcqdYXRbQ6A4NI=; b=vr4/Al2oW90Ztd++ommOnq/XZ3EOCTgdQor4fj+O0OAVFRh7RkpcX7xMb1Y0Ojd+6V Y7dR4mv+eH5AUJRQ9MKgBRzUs1PpR+ZIxatz4vfFG4ZnrkSxHaKK2SOtWauZ1IRLWR63 esQP5qanByHL7ogCbVun3OfExyQtt/NwMDvg1qzm/nHBuS6krvePD7ACagLS9DYGDhrl 1yVaL6u2jFCJU8eGs59nU5pgRR4MkOC5zIaGsHC+0lT5xqCsz5PNWrehI42GAfo3i62c 0PnH33rOpnI4VljbiRzhkFHqhlzocVs4FWLsmRIhhg8xG2JZbCSaCg5522T84L2ouTiW 4xnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e15si1562877ejj.374.2020.04.23.13.48.05; Thu, 23 Apr 2020 13:48:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726456AbgDWUr2 (ORCPT + 99 others); Thu, 23 Apr 2020 16:47:28 -0400 Received: from smtp04.smtpout.orange.fr ([80.12.242.126]:28565 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbgDWUr2 (ORCPT ); Thu, 23 Apr 2020 16:47:28 -0400 Received: from [192.168.42.210] ([93.22.149.4]) by mwinf5d27 with ME id WLnQ2200T05vvQD03LnRRT; Thu, 23 Apr 2020 22:47:26 +0200 X-ME-Helo: [192.168.42.210] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 23 Apr 2020 22:47:26 +0200 X-ME-IP: 93.22.149.4 Subject: Re: [PATCH] ipw2x00: Remove a memory allocation failure log message To: Sergei Shtylyov , stas.yakovlev@gmail.com, kvalo@codeaurora.org, davem@davemloft.net Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <20200423075825.18206-1-christophe.jaillet@wanadoo.fr> <5868418d-88b0-3694-2942-5988ab15bdcb@cogentembedded.com> From: Christophe JAILLET Message-ID: <3c80ef48-57a8-b414-6cf1-6c255a46f6be@wanadoo.fr> Date: Thu, 23 Apr 2020 22:47:25 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <5868418d-88b0-3694-2942-5988ab15bdcb@cogentembedded.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Le 23/04/2020 à 11:46, Sergei Shtylyov a écrit : > Hello! > > On 23.04.2020 10:58, Christophe JAILLET wrote: > >> Axe a memory allocation failure log message. This message is useless and >> incorrect (vmalloc is not used here for the memory allocation) >> >> This has been like that since the very beginning of this driver in >> commit 43f66a6ce8da ("Add ipw2200 wireless driver.") >> >> Signed-off-by: Christophe JAILLET >> --- >>   drivers/net/wireless/intel/ipw2x00/ipw2200.c | 5 ++--- >>   1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c >> b/drivers/net/wireless/intel/ipw2x00/ipw2200.c >> index 60b5e08dd6df..30c4f041f565 100644 >> --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c >> +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c >> @@ -3770,10 +3770,9 @@ static int ipw_queue_tx_init(struct ipw_priv >> *priv, >>       struct pci_dev *dev = priv->pci_dev; >>         q->txb = kmalloc_array(count, sizeof(q->txb[0]), GFP_KERNEL); >> -    if (!q->txb) { >> -        IPW_ERROR("vmalloc for auxiliary BD structures failed\n"); >> +    if (!q->txb) >>           return -ENOMEM; >> -    } >> + > >    No need for this extra empty line. That's right, sorry about that. Can it be fixed when/if the patch is applied, or should I send a V2? If a V2 is required, should kcalloc be used, as pointed out by Joe Perches? (personally, If the code works fine as-is, I don't think it is required, but it can't hurt) CJ > >>         q->bd = >>           pci_alloc_consistent(dev, sizeof(q->bd[0]) * count, >> &q->q.dma_addr); > > MBR, Sergei > >