netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Harsha Sharma <harshasharmaiitr@gmail.com>
Cc: pablo@netfilter.org, netfilter-devel@vger.kernel.org,
	outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] netfilter: nfnl_cthelper: Replace kzalloc with kcalloc
Date: Fri, 13 Oct 2017 01:42:15 +0200	[thread overview]
Message-ID: <20171012234215.GB25032@breakpoint.cc> (raw)
In-Reply-To: <20171012222218.1220-1-harshasharmaiitr@gmail.com>

Harsha Sharma <harshasharmaiitr@gmail.com> wrote:
> kcalloc is preferred to allocate an array instead of kzalloc.
> This patch fixes checkpatch isssue.
> 
> Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
> ---
>  net/netfilter/nfnetlink_cthelper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
> index 41628b393673..f1ce335b9158 100644
> --- a/net/netfilter/nfnetlink_cthelper.c
> +++ b/net/netfilter/nfnetlink_cthelper.c
> @@ -189,7 +189,7 @@ nfnl_cthelper_parse_expect_policy(struct nf_conntrack_helper *helper,
>  	if (class_max > NF_CT_MAX_EXPECT_CLASSES)
>  		return -EOVERFLOW;
>  
> -	expect_policy = kzalloc(sizeof(struct nf_conntrack_expect_policy) *
> +	expect_policy = kcalloc(sizeof(struct nf_conntrack_expect_policy) *
>  				class_max, GFP_KERNEL);

Please at least compile test patches.

      reply	other threads:[~2017-10-12 23:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 22:22 [PATCH] netfilter: nfnl_cthelper: Replace kzalloc with kcalloc Harsha Sharma
2017-10-12 23:42 ` Florian Westphal [this message]

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=20171012234215.GB25032@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=harshasharmaiitr@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=pablo@netfilter.org \
    /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;
as well as URLs for NNTP newsgroup(s).