linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Daniel Drake <dsd@gentoo.org>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [RFC] zd1211rw: remove zd_addr_t typedef for a simple u16
Date: Tue, 10 Mar 2009 09:38:10 -0700	[thread overview]
Message-ID: <20090310163810.GA6140@tesla> (raw)
In-Reply-To: <49B66A73.4030408@gentoo.org>

On Tue, Mar 10, 2009 at 06:26:11AM -0700, Daniel Drake wrote:
> Luis R. Rodriguez wrote:
> > The __nocast attribute is used to shut sparse up but we
> > don't need it, lets just use u16 directly.
> 
> Which warning does this remove?

Yeah sorry, I should have added that, here it is:

  CHECK   drivers/net/wireless/zd1211rw/zd_usb.c
drivers/net/wireless/zd1211rw/zd_usb.c:363:24: warning: implicit cast from nocast type
  CC [M]  drivers/net/wireless/zd1211rw/zd_usb.o

> The purpose of this system was (I think) to make it so that if you got
> addr and value in the wrong order in calls to e.g. zd_ioread16() then
> sparse would tell you about it. Looks like your patch would remove that
> protection?

Sure.

> Admittedly it is a bit of a strange thing and no excuse for programmers
> getting parameters in the wrong order.. if it needs to go then I'm happy
> with whatever you decide.

It would seem to make the code cleaner and more legible but it just fixed a
sparse warning for me. Unfortunately I don't have an old zydas hardware to
test it with too though.

  Luis

  reply	other threads:[~2009-03-10 17:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-10  2:10 [RFC] zd1211rw: remove zd_addr_t typedef for a simple u16 Luis R. Rodriguez
2009-03-10  7:02 ` Hin-Tak Leung
2009-03-10  7:11   ` Luis R. Rodriguez
2009-03-10 18:23     ` Hin-Tak Leung
2009-03-10 13:26 ` Daniel Drake
2009-03-10 16:38   ` Luis R. Rodriguez [this message]
2009-03-10 18:49     ` Daniel Drake

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=20090310163810.GA6140@tesla \
    --to=lrodriguez@atheros.com \
    --cc=Luis.Rodriguez@Atheros.com \
    --cc=dsd@gentoo.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).