linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Tomas Winkler <tomasw@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Dan Williams <dcbw@redhat.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Zhu Yi <yi.zhu@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: Re: coding style lesson: iwlwifi vs. endianness
Date: Mon, 10 Dec 2007 17:23:13 +0100	[thread overview]
Message-ID: <1197303793.6035.98.camel@johannes.berg> (raw)
In-Reply-To: <1ba2fa240712100810s1216bee4v8142fb9a279feedf@mail.gmail.com> (sfid-20071210_161015_599477_99D634D7)

[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]


> I'm not only loading the structure I'm using it all over the code. I
> don't have clean cut. You can blame me for that but that's another
> discussion.

I actually thought that was intentional to reduce the number of local
variables.

> We are going around the same issue all gain. I already agreed that
> your approach will be correct if we had more code of your example type
> then setting bits. But we are mostly setting bits.

Going from the definitions in the header files that's not true. I'm too
lazy to do actual stats though. Yes, there are many bits, but very often
you have two/three-bit values intermingled with flags.

> This is really arguing about taste and feel. 

Sort of. Maybe all I'm saying is that you're (artificially) limiting the
number of people who can work on your drivers because all non-Intel
drivers use the opposing style of defining things in native byte-order
while you're hiding the endian conversion in the defines rather than
making it explicit in the code which is much easier to understand.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  parent reply	other threads:[~2007-12-10 16:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 18:44 coding style lesson: iwlwifi vs. endianness Johannes Berg
2007-11-28 18:20 ` Tomas Winkler
2007-11-28 18:50   ` Johannes Berg
2007-11-28 21:43   ` Dan Williams
2007-11-29  0:58     ` John W. Linville
2007-11-29 23:02       ` Tomas Winkler
2007-12-10 11:42         ` Johannes Berg
2007-12-10 14:18           ` Tomas Winkler
2007-12-10 15:18             ` Johannes Berg
2007-12-10 15:30               ` Michael Buesch
2007-12-10 16:18                 ` Johannes Berg
2007-12-10 16:48                   ` Michael Buesch
2007-12-10 16:21                 ` Tomas Winkler
2007-12-10 16:25                   ` Johannes Berg
2007-12-10 21:18                     ` Tomas Winkler
2007-12-10 16:10               ` Tomas Winkler
2007-12-10 16:17                 ` Johannes Berg
2007-12-10 16:23                 ` Johannes Berg [this message]
2007-11-29  9:03   ` Holger Schurig

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=1197303793.6035.98.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=dcbw@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=reinette.chatre@intel.com \
    --cc=tomasw@gmail.com \
    --cc=yi.zhu@intel.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).