netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] netlink functions that can be static (trivial)
Date: Wed, 28 Apr 2004 12:25:35 -0700	[thread overview]
Message-ID: <20040428122535.4f30f1b0.davem@redhat.com> (raw)
In-Reply-To: <20040428104853.229f3d6c@dell_ss3.pdx.osdl.net>

On Wed, 28 Apr 2004 10:48:53 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:

> Several internal functions and tables in rtnetlink can be static, and
> fill functions don't change stat of the net_device.

Some problems here...


> -static int rtnetlink_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
> +static int rtnetlink_fill_ifinfo(struct sk_buff *skb,
> +				 const struct net_device *dev,

It doesn't start as static in my tree, I think you diffed the wrong
revisions in your tree. :-)  We export this thing to modules too, how
do you know some external module doesn't actually use this thing?  I
know of no users, but...

> -	struct net_device *dev;
> +	const struct net_device *dev;

This is wrong, a few lines down we assign it here:

>  	read_lock(&dev_base_lock);
>  	for (dev=dev_base, idx=0; dev; dev = dev->next, idx++) {

So marking that 'dev' const cannot be right.  Or are you marking the
"object pointed to by 'dev'" as const?

The rest of the patch seems fine, just clean these two things up.
Thanks.

  reply	other threads:[~2004-04-28 19:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-28 17:48 [PATCH] netlink functions that can be static (trivial) Stephen Hemminger
2004-04-28 19:25 ` David S. Miller [this message]
2004-04-28 22:02   ` Stephen Hemminger
2004-04-28 23:16     ` David S. Miller

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=20040428122535.4f30f1b0.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@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 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).