lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGRGNgXVvX2zjp7HjNsYJP=tSc3XM7O5sSXf9=8JmPdd20QJtw@mail.gmail.com>
Date:	Mon, 30 May 2016 15:32:14 +1000
From:	Julian Calaby <julian.calaby@...il.com>
To:	Kirtika Ruchandani <kirtika.ruchandani@...il.com>
Cc:	Johannes Berg <johannes@...solutions.net>,
	linux-wireless <linux-wireless@...r.kernel.org>,
	Tina Ruchandani <ruchandani.tina@...il.com>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 10/10] nl80211: Prefer kcalloc over kzalloc

Hi All,

On Mon, May 30, 2016 at 12:54 PM, Kirtika Ruchandani
<kirtika.ruchandani@...il.com> wrote:
> This patch fixes the checkpatch.pl warning -
> "prefer kcalloc over kzalloc with multiply"
>
> Signed-off-by: Kirtika Ruchandani <kirtika.ruchandani@...il.com>

Looks right to me.

Reviewed-by: Julian Calaby <julian.calaby@...il.com>

Thanks,

Julian Calaby


> ---
>  net/wireless/nl80211.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 46757af..2964406 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -9482,7 +9482,7 @@ static int nl80211_parse_wowlan_nd(struct cfg80211_registered_device *rdev,
>         struct nlattr **tb;
>         int err;
>
> -       tb = kzalloc(NUM_NL80211_ATTR * sizeof(*tb), GFP_KERNEL);
> +       tb = kcalloc(NUM_NL80211_ATTR, sizeof(*tb), GFP_KERNEL);
>         if (!tb)
>                 return -ENOMEM;
>
> --
> 2.8.0.rc3.226.g39d4020
>



-- 
Julian Calaby

Email: julian.calaby@...il.com
Profile: http://www.google.com/profiles/julian.calaby/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ