From: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
To: Daniel Drake <dsd-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Cc: linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kune-hUSrv6EASfkEnNRfnnE9gw@public.gmane.org,
rpjday-mn4gwa5WIIQysxA8WJXlww@public.gmane.org
Subject: Re: [PATCH] zd1211rw: Readd zd_addr_t cast
Date: Sat, 10 Feb 2007 07:02:14 +0100 [thread overview]
Message-ID: <200702100702.15264.mb@bu3sch.de> (raw)
In-Reply-To: <20070210012718.3B6E87B409F-k/4jFdqg8LLlyo9zxV8I99HuzzzSOjJt@public.gmane.org>
On Saturday 10 February 2007 02:27, Daniel Drake wrote:
> Robert P.J. Day's recent commit ("getting rid of all casts of k[cmz]alloc()
> calls") introduced a sparse warning for zd1211rw, related to our type-checking
> of addresses.
>
> zd_chip.c:116:15: warning: implicit cast to nocast type
>
> This patch readds the type cast, it is correct.
>
> Signed-off-by: Daniel Drake <dsd-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
>
> Index: linux/drivers/net/wireless/zd1211rw/zd_chip.c
> ===================================================================
> --- linux.orig/drivers/net/wireless/zd1211rw/zd_chip.c
> +++ linux/drivers/net/wireless/zd1211rw/zd_chip.c
> @@ -113,7 +113,7 @@ int zd_ioread32v_locked(struct zd_chip *
>
> /* Allocate a single memory block for values and addresses. */
> count16 = 2*count;
> - a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
> + a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
> GFP_NOFS);
Unrelated, but I am wondering since quite some time why you pass GFP_NOFS here.
Any special reason? I think in general there is no good reason for code outside
of the VFS to use this flag.
IMHO you should pass either GFP_ATOMIC or GFP_KERNEL.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-02-10 6:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-10 1:27 [PATCH] zd1211rw: Readd zd_addr_t cast Daniel Drake
[not found] ` <20070210012718.3B6E87B409F-k/4jFdqg8LLlyo9zxV8I99HuzzzSOjJt@public.gmane.org>
2007-02-10 6:02 ` Michael Buesch [this message]
2007-02-10 7:36 ` Ulrich Kunitz
2007-02-10 18:51 ` Joe Perches
2007-02-10 19:56 ` Ulrich Kunitz
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=200702100702.15264.mb@bu3sch.de \
--to=mb-fseuscv1ubazqb+pc5nmwq@public.gmane.org \
--cc=dsd-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org \
--cc=kune-hUSrv6EASfkEnNRfnnE9gw@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rpjday-mn4gwa5WIIQysxA8WJXlww@public.gmane.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).