From: Mircea Gherzan <mgherzan@gmail.com>
To: Luciano Coelho <coelho@ti.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>, linux-wireless@vger.kernel.org
Subject: Re: wl12xx: fix DMA-API-related warnings
Date: Thu, 19 Apr 2012 00:59:55 +0200 [thread overview]
Message-ID: <4F8F476B.3040800@gmail.com> (raw)
In-Reply-To: <20120416104858.GA24159@elgon.mountain>
Hi Luciano,
Am 16.04.2012 12:48, schrieb Dan Carpenter:
> 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.
How would you prefer my fix for this issue: as a new version of the
original patch or as a separate new patch?
Thanks,
Mircea
> 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
>
--
Mircea
next prev parent reply other threads:[~2012-04-18 22:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 10:48 wl12xx: fix DMA-API-related warnings Dan Carpenter
2012-04-18 22:59 ` Mircea Gherzan [this message]
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=4F8F476B.3040800@gmail.com \
--to=mgherzan@gmail.com \
--cc=coelho@ti.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-wireless@vger.kernel.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 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.