From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>,
Andrew Morton <akpm@osdl.org>, Dag Brattli <dag@brattli.net>,
Jean Tourrilhes <jt@hpl.hp.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
irda-users@lists.sourceforge.net
Subject: Re: [PATCH] irda: fix type of struct irda_ias_set.attribute.irda_attrib_string.len
Date: Tue, 11 Nov 2003 09:18:29 -0800 [thread overview]
Message-ID: <20031111171829.GA18882@bougret.hpl.hp.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0311101856130.2881-100000@home.osdl.org>
On Mon, Nov 10, 2003 at 06:59:59PM -0800, Linus Torvalds wrote:
>
> On Tue, 11 Nov 2003, Arnaldo Carvalho de Melo wrote:
> >
> > Ok, ias_opt->attribute.irda_attrib_string.len is __u8, but
> > IAS_MAX_STRING = 256... so attribute.irda_attrib_string.len has to be at least
> > __u18, this patch fix this, please see if it is appropriate and if it is so,
> > apply.
>
> No, please don't. This
> (a) changes ABI structures that are exported to user space
Yes ! You are 100% correct, changing this would break all the
IrDA user space, which I'm not keen on doing.
> (b) is unnecessary - since the problem is the _warning_, not the test.
>
> Just shut the warning up by either removing the test (replacing it with a
> comment about why it's unnecessary), or by adding a cast, ie
>
> unsigned int len = ias_opt->attribute.irda_attrib_string.len;
>
> if (len > IAS_MAX_STRING) {
> ...
>
> in case the code ever expects IAS_MAX_STRING to be shorter (or if the type
> is ever changed).
Yes, in this case the test should be removed with a comment.
> Linus
Jean
prev parent reply other threads:[~2003-11-11 17:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-11 2:06 [PATCH] irda: fix type of struct irda_ias_set.attribute.irda_attrib_string.len Arnaldo Carvalho de Melo
2003-11-11 2:59 ` Linus Torvalds
2003-11-11 3:07 ` Linus Torvalds
2003-12-30 12:39 ` Paul Jackson
2003-11-11 17:18 ` Jean Tourrilhes [this message]
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=20031111171829.GA18882@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=acme@conectiva.com.br \
--cc=akpm@osdl.org \
--cc=dag@brattli.net \
--cc=irda-users@lists.sourceforge.net \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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.