[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0000013dc6307f44-940f2bf1-7556-4d9e-92ab-1a84d2a47ca8-000000@email.amazonses.com>
Date: Mon, 1 Apr 2013 15:21:39 +0000
From: Christoph Lameter <cl@...ux.com>
To: RongQing Li <roy.qing.li@...il.com>
cc: Eric Dumazet <eric.dumazet@...il.com>,
Shan Wei <davidshan@...cent.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] core: fix the use of this_cpu_ptr
On Fri, 29 Mar 2013, RongQing Li wrote:
> > &this_cpu_ptr is always an error since you are taking the addresss of an
> > address.
> >
>
> &this_cpu_ptr()->flush_tasklet, "->" has high priority than "&"
> so the result is same as
> &(this_cpu_ptr()->flush_tasklet)
Ok. This is the same as
this_cpu_read(xxx.flush_tasklet)
Looks less confusing to me.
> flush_tasklet is not a percpu var, it is a member of percpu var.
Well then it would be best to use this_cpu_read() instead of this_cpu_ptr.
It also will generate better code.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists