From patchwork Tue Nov 25 10:34:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41452 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F3E9225E18 for ; Tue, 25 Nov 2014 10:35:20 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf214389wgg.11 for ; Tue, 25 Nov 2014 02:35:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=6v4guRKrDWGYcsEiGDJ766XRheiS5YMPu28lcpS6bzY=; b=Po0G7cxyqutECVmO2hrvgkApIcRBUPYmkNNQCGJ4ariusQ6bgGziABrvyPCryWNXQM a3mqocFHIwgriwf1/hUmVxMgMy/ASVgkBY/epp9SvEyC3dqeSllJxW0EyywAkFjIexIc c9hZEtSOBJnS/yjiz5O7UAr/f4VplDRRbHz8zrQ4JT6fIqZ8cuBL+cfpDMiijDnI+dL7 F+qnsMBeJBmJtC/NJ/v4+MLV7gKXkuiZ6S3yIXDnpWc95+xuEHq2hCi6+vY6z1SXfRh+ WjzRz1MsQ7N/vcunrWXUXoeJy3AbXIQK/Q+O0G9y7atKtetlp87AdJ1DmxmLpGTw3imr 3tag== X-Gm-Message-State: ALoCoQkI0hgQJLdwILrXJ1uhycVXKePdr5K3LiaRBku0Ck6qy4rTHpb7RYkzPr4WcEEQONU9Jt7f X-Received: by 10.194.104.227 with SMTP id gh3mr151157wjb.7.1416911720156; Tue, 25 Nov 2014 02:35:20 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.194 with SMTP id g2ls564175lam.3.gmail; Tue, 25 Nov 2014 02:35:19 -0800 (PST) X-Received: by 10.112.205.65 with SMTP id le1mr10635512lbc.54.1416911719609; Tue, 25 Nov 2014 02:35:19 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id x7si870986lag.84.2014.11.25.02.35.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 02:35:19 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id z11so245476lbi.24 for ; Tue, 25 Nov 2014 02:35:19 -0800 (PST) X-Received: by 10.152.9.7 with SMTP id v7mr25401033laa.40.1416911719512; Tue, 25 Nov 2014 02:35:19 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp410665lbc; Tue, 25 Nov 2014 02:35:18 -0800 (PST) X-Received: by 10.70.119.70 with SMTP id ks6mr41798045pdb.80.1416911716927; Tue, 25 Nov 2014 02:35:16 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mk8si1367241pdb.23.2014.11.25.02.35.16 for ; Tue, 25 Nov 2014 02:35:16 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbaKYKfP (ORCPT + 12 others); Tue, 25 Nov 2014 05:35:15 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:50912 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752283AbaKYKfO (ORCPT ); Tue, 25 Nov 2014 05:35:14 -0500 Received: by mail-pa0-f54.google.com with SMTP id fb1so324459pad.27 for ; Tue, 25 Nov 2014 02:35:13 -0800 (PST) X-Received: by 10.68.162.100 with SMTP id xz4mr41815237pbb.138.1416911713596; Tue, 25 Nov 2014 02:35:13 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id p12sm1105234pdn.47.2014.11.25.02.35.11 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Nov 2014 02:35:12 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, stefan.wahren@i2se.com, nm@ti.com, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, Viresh Kumar Subject: [PATCH 1/8] opp: rename 'head' as 'rcu_head' or 'srcu_head' based on its type Date: Tue, 25 Nov 2014 16:04:16 +0530 Message-Id: <1407c1d67e546a09f5dd122de943de45bcd3c846.1416910766.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Both 'struct dev_pm_opp' and 'struct device_opp' have member with name 'head' but with different types. This leads to confusion while reading the code. Name them 'rcu_head' and 'srcu_head'. Signed-off-by: Viresh Kumar --- drivers/base/power/opp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 89ced95..76ae6fd 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -53,7 +53,7 @@ * @rate: Frequency in hertz * @u_volt: Nominal voltage in microvolts corresponding to this OPP * @dev_opp: points back to the device_opp struct this opp belongs to - * @head: RCU callback head used for deferred freeing + * @rcu_head: RCU callback head used for deferred freeing * * This structure stores the OPP information for a given device. */ @@ -65,7 +65,7 @@ struct dev_pm_opp { unsigned long u_volt; struct device_opp *dev_opp; - struct rcu_head head; + struct rcu_head rcu_head; }; /** @@ -76,7 +76,7 @@ struct dev_pm_opp { * RCU usage: nodes are not modified in the list of device_opp, * however addition is possible and is secured by dev_opp_list_lock * @dev: device pointer - * @head: notifier head to notify the OPP availability changes. + * @srcu_head: notifier head to notify the OPP availability changes. * @opp_list: list of opps * * This is an internal data structure maintaining the link to opps attached to @@ -87,7 +87,7 @@ struct device_opp { struct list_head node; struct device *dev; - struct srcu_notifier_head head; + struct srcu_notifier_head srcu_head; struct list_head opp_list; }; @@ -436,7 +436,7 @@ int dev_pm_opp_add(struct device *dev, unsigned long freq, unsigned long u_volt) } dev_opp->dev = dev; - srcu_init_notifier_head(&dev_opp->head); + srcu_init_notifier_head(&dev_opp->srcu_head); INIT_LIST_HEAD(&dev_opp->opp_list); /* Secure the device list modification */ @@ -481,7 +481,7 @@ int dev_pm_opp_add(struct device *dev, unsigned long freq, unsigned long u_volt) * Notify the changes in the availability of the operable * frequency/voltage list. */ - srcu_notifier_call_chain(&dev_opp->head, OPP_EVENT_ADD, new_opp); + srcu_notifier_call_chain(&dev_opp->srcu_head, OPP_EVENT_ADD, new_opp); return 0; } EXPORT_SYMBOL_GPL(dev_pm_opp_add); @@ -557,14 +557,14 @@ static int opp_set_availability(struct device *dev, unsigned long freq, list_replace_rcu(&opp->node, &new_opp->node); mutex_unlock(&dev_opp_list_lock); - kfree_rcu(opp, head); + kfree_rcu(opp, rcu_head); /* Notify the change of the OPP availability */ if (availability_req) - srcu_notifier_call_chain(&dev_opp->head, OPP_EVENT_ENABLE, + srcu_notifier_call_chain(&dev_opp->srcu_head, OPP_EVENT_ENABLE, new_opp); else - srcu_notifier_call_chain(&dev_opp->head, OPP_EVENT_DISABLE, + srcu_notifier_call_chain(&dev_opp->srcu_head, OPP_EVENT_DISABLE, new_opp); return 0; @@ -629,7 +629,7 @@ struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev) if (IS_ERR(dev_opp)) return ERR_CAST(dev_opp); /* matching type */ - return &dev_opp->head; + return &dev_opp->srcu_head; } #ifdef CONFIG_OF