mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Kang Minchul <tegongkang@gmail.com>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>
Cc: Pavel Skripkin <paskripkin@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: Prefer kcalloc over kzalloc
Date: Sat, 17 Dec 2022 10:35:56 +0100	[thread overview]
Message-ID: <81feafc6-d070-e551-6f85-73073238b511@gmail.com> (raw)
In-Reply-To: <20221216223942.334221-1-tegongkang@gmail.com>

On 12/16/22 23:39, Kang Minchul wrote:
> Fixed following checkpatch.pl warning:
>   * WARNING: Prefer kcalloc over kzalloc with multiply
> 
> Instead of specifying (number of bytes) * (size) as arugment
> in kzalloc, prefer kcalloc.
> 
> Signed-off-by: Kang Minchul <tegongkang@gmail.com>
> ---
>   drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
> index 34494f08c0cd..36ce1e3f9c81 100644
> --- a/drivers/staging/r8188eu/core/rtw_xmit.c
> +++ b/drivers/staging/r8188eu/core/rtw_xmit.c
> @@ -1564,7 +1564,7 @@ int rtw_alloc_hwxmits(struct adapter *padapter)
>   
>   	pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
>   
> -	pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
> +	pxmitpriv->hwxmits = kcalloc(pxmitpriv->hwxmit_entry, sizeof(struct hw_xmit), GFP_KERNEL);
>   	if (!pxmitpriv->hwxmits)
>   		return -ENOMEM;
>   

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

  reply	other threads:[~2022-12-17  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 22:39 Kang Minchul
2022-12-17  9:35 ` Philipp Hortmann [this message]
2022-12-18 15:50 ` Martin Kaiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81feafc6-d070-e551-6f85-73073238b511@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=tegongkang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®