All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Thomas Pedersen <thomas@cozybit.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: refactor skb copy to failq in mesh_path_move_to_queue
Date: Wed, 24 Aug 2011 15:32:25 -0400	[thread overview]
Message-ID: <20110824193224.GL9770@tuxdriver.com> (raw)
In-Reply-To: <CAG6hwVNvLREnnZQ0t8UaKZ7Q1nn-4kx=z_1nPzVG89a5NMWFpg@mail.gmail.com>

On Wed, Aug 24, 2011 at 12:27:29PM -0700, Thomas Pedersen wrote:
> On Wed, Aug 24, 2011 at 12:12 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
> > This seems a bit less awkward, and avoids the following warning:
> >
> >  CC [M]  net/mac80211/mesh_pathtbl.o
> > net/mac80211/mesh_pathtbl.c: In function ‘mesh_path_move_to_queue’:
> > net/mac80211/mesh_pathtbl.c:291:24: warning: ‘cp_skb’ may be used uninitialized in this function
> 
> cp_skb was initialized to NULL in v2 of "mac80211:  mesh gate implementation'
> 
> >
> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> > ---
> > Does it matter if the copy ends-up on the failq before the original goes
> > to the gateq?
> >
> >  net/mac80211/mesh_pathtbl.c |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
> > index 75e4b60..b5caf5b 100644
> > --- a/net/mac80211/mesh_pathtbl.c
> > +++ b/net/mac80211/mesh_pathtbl.c
> > @@ -307,14 +307,14 @@ static void mesh_path_move_to_queue(struct mesh_path *gate_mpath,
> >
> >        while (num_skbs--) {
> >                skb = __skb_dequeue(&failq);
> > -               if (copy)
> > +               if (copy) {
> >                        cp_skb = skb_copy(skb, GFP_ATOMIC);
> > +                       if (cp_skb)
> > +                               __skb_queue_tail(&failq, cp_skb);
> > +               }
> >
> >                prepare_for_gate(skb, gate_mpath->dst, gate_mpath);
> >                __skb_queue_tail(&gateq, skb);
> > -
> > -               if (copy && cp_skb)
> > -                       __skb_queue_tail(&failq, cp_skb);
> >        }
> 
> However, this does look nicer. Please be sure to apply the version
> submitted on 11 August.

You just told me yesterday to apply the 9 August version???

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2011-08-24 19:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24 19:12 [PATCH] mac80211: refactor skb copy to failq in mesh_path_move_to_queue John W. Linville
2011-08-24 19:27 ` Thomas Pedersen
2011-08-24 19:32   ` John W. Linville [this message]
2011-08-24 20:06     ` Thomas Pedersen
2011-08-25  9:11       ` Kalle Valo
2011-08-25 17:02         ` Thomas Pedersen
2011-08-24 20:25     ` John W. Linville

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=20110824193224.GL9770@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=thomas@cozybit.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 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.