From patchwork Wed Oct 31 11:22:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: solomon X-Patchwork-Id: 195852 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4BBCD2C00A4 for ; Wed, 31 Oct 2012 22:25:18 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422712Ab2JaLWT (ORCPT ); Wed, 31 Oct 2012 07:22:19 -0400 Received: from mail-da0-f46.google.com ([209.85.210.46]:63014 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935399Ab2JaLWQ (ORCPT ); Wed, 31 Oct 2012 07:22:16 -0400 Received: by mail-da0-f46.google.com with SMTP id n41so597618dak.19 for ; Wed, 31 Oct 2012 04:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=gPwksygv69WeoktniYFR18kjkYCIC0YxCwGuoGbi73Q=; b=MUfryoHxeq3j4zoxFuyWaMBreGJ+OG/BuwOM+UjCcqPToU7WJyaM6debEOIIQLkF8b knbmPMrO0olbmZTWiJ78NDNuLCfIQDAyWH9u7Q7nf/IizsmH74CiQkevcgVGVQ+WqMvM moHjqdWTXwkJIdZynWCMq9I3U7viWtQnZ6DvfGfNnHqygP0WRpeAxQCAETa8zty2/l7F BD3p9wxef3rLmB8oKjgntTiBbuVPuXt0+i056t5AMApUJ/V4ZNiDF3puC7kfVO7V1dTL RCH+ACAhARPDh3WDjHrhjsM88rYFE4zck/a0k+gL/7mfWWYeAdBPH2/32KnZhnynqvHr 2fIQ== Received: by 10.66.76.9 with SMTP id g9mr77402602paw.17.1351682535545; Wed, 31 Oct 2012 04:22:15 -0700 (PDT) Received: from [172.30.10.98] ([121.14.96.125]) by mx.google.com with ESMTPS id m8sm2040549pax.38.2012.10.31.04.22.11 (version=SSLv3 cipher=OTHER); Wed, 31 Oct 2012 04:22:14 -0700 (PDT) Message-ID: <509109E1.6040607@gmail.com> Date: Wed, 31 Oct 2012 19:22:09 +0800 From: Shan Wei User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: David Miller , timo.teras@iki.fi, steffen.klassert@secunet.com, NetDev , Kernel-Maillist , cl@linux-foundation.org Subject: [PATCH 1/9] net: core: use this_cpu_ptr per-cpu helper Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Shan Wei Signed-off-by: Shan Wei Reviewed-by: Christoph Lameter --- net/core/flow.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/net/core/flow.c b/net/core/flow.c index e318c7e..3bad824 100644 --- a/net/core/flow.c +++ b/net/core/flow.c @@ -327,11 +327,9 @@ static void flow_cache_flush_tasklet(unsigned long data) static void flow_cache_flush_per_cpu(void *data) { struct flow_flush_info *info = data; - int cpu; struct tasklet_struct *tasklet; - cpu = smp_processor_id(); - tasklet = &per_cpu_ptr(info->cache->percpu, cpu)->flush_tasklet; + tasklet = &this_cpu_ptr(info->cache->percpu)->flush_tasklet; tasklet->data = (unsigned long)info; tasklet_schedule(tasklet); }