All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	jkosina@suse.cz, benm@symmetric.co.nz, stephen@symmetric.co.nz
Subject: Re: [PATCH] ipwireless: driver for 3G PC Card
Date: Tue, 29 Jan 2008 14:40:05 +0100	[thread overview]
Message-ID: <200801291440.06099.dsterba@suse.cz> (raw)
In-Reply-To: <20080128100854.fe7acad8.rdunlap@xenotime.net>

On Monday 28 of January 2008 19:08:54 Randy Dunlap wrote:

> > +/* Number of bytes in NL packet header (can not do
>
> cannot

Fixed.

>
> > + * sizeof(nl_packet_header) since it's a bitfield) */
> > +#define NL_FOLLOWING_PACKET_HEADER_SIZE    1
> > +
> > +struct nl_first_paket_header {
>
>                    packet ?

Yes, packet of course.

>
> > +#if defined(__BIG_ENDIAN)
> > +	unsigned char packet_rank:2;
> > +	unsigned char address:3;
> > +	unsigned char protocol:3;
> > +#else
> > +	unsigned char protocol:3;
> > +	unsigned char address:3;
> > +	unsigned char packet_rank:2;
> > +#endif
>
> From C99 spec:
> "The order of allocation of bit-fields within a unit (high-order to
> low-order or low-order to high-order) is implementation-defined."
>
> so if the order/location of these bitfields is important (from one
> system to another), you should use bit masks instead of bitfields
> for them.

I've changed it to __BIG_ENDIAN_BITFIELDS, as suggested by Alexey. The order 
is important. I'll add it to my todo to convert it to bitmasks.

> > +/*
> > + * @return 1 if something has been received from hw
>
> What's with the '@'?

Removed, and converted to plaintext as suggested by others.

> Need ":" and/or space between CARD_NAME and following string.
> (in several places)

Found a few of them and fixed.

> > +module_param(major, int, 0);
> > +module_param(ipwireless_debug, int, 0);
> > +module_param(ipwireless_loopback, int, 0);
> > +module_param(ipwireless_out_queue, int, 0);
> > +MODULE_PARM_DESC(major, "ttyIPWp major number [0]");
> > +MODULE_PARM_DESC(ipwireless_debug, "switch on debug messages [0]");
> > +MODULE_PARM_DESC(ipwireless_debug, "switch on loopback mode [0]");
> > +MODULE_PARM_DESC(ipwireless_debug, "set size of outgoing queue [1]");
>
> Will these parameters be documented anywhere?

The options are intended for debugging. Normal user does not need to tweak 
them. Adjusted the description to reflect their debugging purpose.

> > +#ifdef IPWIRELESS_STATE_DEBUG
> > +int ipwireless_dump_network_state(char *p, struct ipw_network *network)
> > +{
> > +	int idx = 0;
> > +
> > +	idx += sprintf(p + idx, "debug: ppp_blocked=%d\n",
> > +			network->ppp_blocked);
> > +	idx += sprintf(p + idx, "debug: outgoing_packets_queued=%d\n",
> > +			network->outgoing_packets_queued);
> > +	idx += sprintf(p + idx, "debug: network.shutting_down=%d\n",
> > +			network->shutting_down);
>
> check for overflow of 'p'?

Converted to one snprintf too.

> > +/* Syncronous start-messages */
>
> 	Synchronous

Fixed.

Updated patch will follow.


Thank you for comments.

Dave


  parent reply	other threads:[~2008-01-29 13:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 17:19 [PATCH] ipwireless: driver for 3G PC Card David Sterba
2008-01-28 17:53 ` Alexey Dobriyan
2008-01-30 13:28   ` Pavel Machek
2008-01-28 18:08 ` Randy Dunlap
2008-01-28 23:18   ` Jiri Slaby
2008-01-28 23:28     ` Randy Dunlap
2008-01-28 23:29       ` Jiri Slaby
2008-01-28 23:33         ` Randy Dunlap
2008-01-29  6:22           ` Pekka Enberg
2008-01-29 13:42     ` David Sterba
2008-01-29 13:40   ` David Sterba [this message]
2008-01-30 13:40 ` Pavel Machek
2008-01-30 21:29   ` Stephen Blackheath [to Foxconn]
2008-01-30 23:15     ` Pavel Machek
2008-02-01 15:21   ` David Sterba
2008-02-01 23:43     ` Pavel Machek

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=200801291440.06099.dsterba@suse.cz \
    --to=dsterba@suse.cz \
    --cc=benm@symmetric.co.nz \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=stephen@symmetric.co.nz \
    --cc=torvalds@linux-foundation.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.