From: Stephen Hemminger <shemminger@osdl.org>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: ctindel@users.sourceforge.net, Jay Vosburgh <fubar@us.ibm.com>,
bonding-devel@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [PATCH] bonding: fix sparse warnings
Date: Wed, 10 May 2006 20:45:13 -0700 [thread overview]
Message-ID: <20060510204513.127d9bef@localhost.localdomain> (raw)
In-Reply-To: <20060510232203.GK27946@ftp.linux.org.uk>
On Thu, 11 May 2006 00:22:03 +0100
Al Viro <viro@ftp.linux.org.uk> wrote:
> On Wed, May 10, 2006 at 04:14:05PM -0700, Stephen Hemminger wrote:
> > Fix warning from sparse in bonding code about "incorrect type in assignment"
>
> *snerk*
>
> Only if you are building without -Wcast-to-as. It _is_ incorrect type in
> assignment. And the real fix is to expand the call, killing set_fs()
> in there.
More like this (in br_if.c)?
struct ethtool_cmd ecmd = { ETHTOOL_GSET };
struct ifreq ifr;
mm_segment_t old_fs;
int err;
strncpy(ifr.ifr_name, dev->name, IFNAMSIZ);
ifr.ifr_data = (void __user *) &ecmd;
old_fs = get_fs();
set_fs(KERNEL_DS);
err = dev_ethtool(&ifr);
set_fs(old_fs);
if (!err)
...
prev parent reply other threads:[~2006-05-11 3:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-10 23:14 [PATCH] bonding: fix sparse warnings Stephen Hemminger
2006-05-10 23:22 ` Al Viro
2006-05-11 3:45 ` Stephen Hemminger [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=20060510204513.127d9bef@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=bonding-devel@lists.sourceforge.net \
--cc=ctindel@users.sourceforge.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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).