All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/4] ath10k: use sizeof(*var) in kmalloc
Date: Mon, 12 Aug 2013 17:26:37 +0300	[thread overview]
Message-ID: <87li47t276.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1375949650-9699-3-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Thu, 8 Aug 2013 10:14:08 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> This fixes checkpatch warning from the latest
> 3.11-rc kernel tree.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
> ---
>  drivers/net/wireless/ath/ath10k/pci.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
> index d95439b..1814af1 100644
> --- a/drivers/net/wireless/ath/ath10k/pci.c
> +++ b/drivers/net/wireless/ath/ath10k/pci.c
> @@ -803,8 +803,7 @@ static int ath10k_pci_start_ce(struct ath10k *ar)
>  			continue;
>  
>  		for (i = 0; i < completions; i++) {
> -			compl = kmalloc(sizeof(struct ath10k_pci_compl),
> -					GFP_KERNEL);
> +			compl = kmalloc(sizeof(*compl), GFP_KERNEL);
>  			if (!compl) {
>  				ath10k_warn("No memory for completion state\n");
>  				ath10k_pci_stop_ce(ar);

Just out of curiosity, what's the warning? kmalloc() should be called
with sizeof(*foo) style?

-- 
Kalle Valo

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH 2/4] ath10k: use sizeof(*var) in kmalloc
Date: Mon, 12 Aug 2013 17:26:37 +0300	[thread overview]
Message-ID: <87li47t276.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1375949650-9699-3-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Thu, 8 Aug 2013 10:14:08 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> This fixes checkpatch warning from the latest
> 3.11-rc kernel tree.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
> ---
>  drivers/net/wireless/ath/ath10k/pci.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
> index d95439b..1814af1 100644
> --- a/drivers/net/wireless/ath/ath10k/pci.c
> +++ b/drivers/net/wireless/ath/ath10k/pci.c
> @@ -803,8 +803,7 @@ static int ath10k_pci_start_ce(struct ath10k *ar)
>  			continue;
>  
>  		for (i = 0; i < completions; i++) {
> -			compl = kmalloc(sizeof(struct ath10k_pci_compl),
> -					GFP_KERNEL);
> +			compl = kmalloc(sizeof(*compl), GFP_KERNEL);
>  			if (!compl) {
>  				ath10k_warn("No memory for completion state\n");
>  				ath10k_pci_stop_ce(ar);

Just out of curiosity, what's the warning? kmalloc() should be called
with sizeof(*foo) style?

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2013-08-12 14:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08  8:14 [PATCH 0/4] ath10k: cleanups Michal Kazior
2013-08-08  8:14 ` Michal Kazior
2013-08-08  8:14 ` [PATCH 1/4] ath10k: clean up monitor start code Michal Kazior
2013-08-08  8:14   ` Michal Kazior
2013-08-08  8:14 ` [PATCH 2/4] ath10k: use sizeof(*var) in kmalloc Michal Kazior
2013-08-08  8:14   ` Michal Kazior
2013-08-12 14:26   ` Kalle Valo [this message]
2013-08-12 14:26     ` Kalle Valo
2013-08-13  5:12     ` Michal Kazior
2013-08-13  5:12       ` Michal Kazior
2013-08-08  8:14 ` [PATCH 3/4] ath10k: clean up PCI completion states Michal Kazior
2013-08-08  8:14   ` Michal Kazior
2013-08-08  8:14 ` [PATCH 4/4] ath10k: print errcode when CE ring setup fails Michal Kazior
2013-08-08  8:14   ` Michal Kazior
2013-08-12 14:30 ` [PATCH 0/4] ath10k: cleanups Kalle Valo
2013-08-12 14:30   ` Kalle Valo
2013-08-12 14:47   ` Kalle Valo
2013-08-12 14:47     ` Kalle Valo
2013-08-13  5:54 ` [PATCH v2 " Michal Kazior
2013-08-13  5:54   ` Michal Kazior
2013-08-13  5:54   ` [PATCH v2 1/4] ath10k: clean up monitor start code Michal Kazior
2013-08-13  5:54     ` Michal Kazior
2013-08-13  5:54   ` [PATCH v2 2/4] ath10k: use sizeof(*var) in kmalloc Michal Kazior
2013-08-13  5:54     ` Michal Kazior
2013-08-13  5:54   ` [PATCH v2 3/4] ath10k: clean up PCI completion states Michal Kazior
2013-08-13  5:54     ` Michal Kazior
2013-08-13  5:54   ` [PATCH v2 4/4] ath10k: print errcode when CE ring setup fails Michal Kazior
2013-08-13  5:54     ` Michal Kazior
2013-08-14 15:00   ` [PATCH v2 0/4] ath10k: cleanups Kalle Valo
2013-08-14 15:00     ` Kalle Valo

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=87li47t276.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.