public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: mgherzan@gmail.com
Cc: linux-wireless@vger.kernel.org, Luciano Coelho <coelho@ti.com>
Subject: re: wl12xx: fix DMA-API-related warnings
Date: Mon, 16 Apr 2012 13:48:58 +0300	[thread overview]
Message-ID: <20120416104858.GA24159@elgon.mountain> (raw)

Hello Mircea Gherzan,

The patch 690142e98826: "wl12xx: fix DMA-API-related warnings" from
Mar 17, 2012, leads to the following Smatch warning:
drivers/net/wireless/ti/wlcore/cmd.c:126 wl1271_cmd_wait_for_event_or_timeout()
	 error: no modifiers for allocation.

 static void wl1271_boot_fw_version(struct wl1271 *wl)
 {
-       struct wl1271_static_data static_data;
+       struct wl1271_static_data *static_data;
 
-       wl1271_read(wl, wl->cmd_box_addr, &static_data, sizeof(static_data),
+       static_data = kmalloc(sizeof(*static_data), GFP_DMA);
                                                    ^^^^^^^
You can't use GFP_DMA by itself like that, it needs to ORed with
GFP_KERNEL or GFP_ATOMIC or something like that:

	static_data = kmalloc(sizeof(*static_data), GFP_KERNEL | GFP_DMA);

+       if (!static_data) {
+               __WARN();
+               return;

There are a couple other places in this patch which do the same thing.
Could you fix it, please?

regards,
dan carpenter


             reply	other threads:[~2012-04-16 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 10:48 Dan Carpenter [this message]
2012-04-18 22:59 ` wl12xx: fix DMA-API-related warnings Mircea Gherzan
2012-04-19  4:22   ` Luciano Coelho

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=20120416104858.GA24159@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=coelho@ti.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mgherzan@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