From patchwork Tue May 31 06:18:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9143381 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 039E8607D6 for ; Tue, 31 May 2016 06:21:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC5BE28227 for ; Tue, 31 May 2016 06:21:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E125528226; Tue, 31 May 2016 06:21:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B23528213 for ; Tue, 31 May 2016 06:21:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755986AbcEaGUs (ORCPT ); Tue, 31 May 2016 02:20:48 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36783 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755883AbcEaGUp (ORCPT ); Tue, 31 May 2016 02:20:45 -0400 Received: by mail-pa0-f65.google.com with SMTP id fg1so23775163pad.3; Mon, 30 May 2016 23:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ouB9od/wykIbCoxOiWSb1Jk3W3XTzprQuzKkCbNvBDM=; b=UfpluEjaBNzdB0RE2QBsi7QcmxDGNgHMa2glABshvL+O5Zo/pXugzV4B4vj9Uz7qHc wf1YQ7Q6IJZ9VyKIVwq5weCwZodYQoTbMeOi35ePP36Q7NOTZzvo3o/HnVQwm3Du8bfF nSs/APnnaMLz4jTnOkKxOEX6bsiBFi3/OBEvHeI4dREXaItgo8obGNCQcI/RHhl2hozD YNOWu6bAdFUvwCXKqrGy8R8Z6o6rlZOdPAQkXhEeyWQ/mlWuQ8II0QDEbqCcU1xpAhCx vn4vDhlSkSBnnKKpaYLXS7lC701eKq0nJwVK/v6BOzvD928K6nTvu5/QxtAhUkQdv0d1 sv9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ouB9od/wykIbCoxOiWSb1Jk3W3XTzprQuzKkCbNvBDM=; b=XCF4gGUI3ibsk8Ymq77dfvdtsztfPsxaZDETE1KNs7lRJ4AOc+syZwAAWWwOgRrhuu kWmGGnIaR62COaC3b66It3bFyeX0b7iRAMEtTxCyfe52GESKO4K6hIsWDgaEzemxReeL zWtSWUulj07Oqhne+Q8VhFxa3p280Oj/x4w7CD37ZQIIcY1oZ6fXR+eiQ5UipO2cSDer aC4aaeF8Mdz8gu22h6Twg/9i6aTJyBda6HNUe2ZR672w1hirmv60Oc/RVcX01db1laV7 G74JUW4lQak3LBDJn7zLRM5kXZvE8lltZ2UiA/W3M170w3QYnvGR6wXFkSXstZcnDAab 2iOw== X-Gm-Message-State: ALyK8tLTXwd9/+6a9xGMEZU9sXWn7tvheGMGvz8fJwKXP7/itmHx1f+zW71Lso6d8bLykQ== X-Received: by 10.66.222.98 with SMTP id ql2mr52724766pac.137.1464675644489; Mon, 30 May 2016 23:20:44 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id b19sm37139414pfb.55.2016.05.30.23.20.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 23:20:43 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Keerthy , Eduardo Valentin Subject: [PATCHv4 43/48] thermal: core: standardize line breaking alignment Date: Mon, 30 May 2016 23:18:50 -0700 Message-Id: <1464675535-2433-44-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464675535-2433-1-git-send-email-edubezval@gmail.com> References: <1464675535-2433-1-git-send-email-edubezval@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Pass through the code to remove check suggested by checkpatch.pl (alignment to parenthesis): CHECK: Alignment should match open parenthesis Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index cbc5954..3f1082d 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -137,10 +137,15 @@ int thermal_register_governor(struct thermal_governor *governor) err = -EBUSY; if (!__find_governor(governor->name)) { + bool match_default; + err = 0; list_add(&governor->governor_list, &thermal_governor_list); - if (!def_governor && !strncmp(governor->name, - DEFAULT_THERMAL_GOVERNOR, THERMAL_NAME_LENGTH)) + match_default = !strncmp(governor->name, + DEFAULT_THERMAL_GOVERNOR, + THERMAL_NAME_LENGTH); + + if (!def_governor && match_default) def_governor = governor; } @@ -189,7 +194,7 @@ void thermal_unregister_governor(struct thermal_governor *governor) list_for_each_entry(pos, &thermal_tz_list, node) { if (!strncasecmp(pos->governor->name, governor->name, - THERMAL_NAME_LENGTH)) + THERMAL_NAME_LENGTH)) thermal_set_governor(pos, NULL); } @@ -312,14 +317,15 @@ static void monitor_thermal_zone(struct thermal_zone_device *tz) } static void handle_non_critical_trips(struct thermal_zone_device *tz, - int trip, enum thermal_trip_type trip_type) + int trip, + enum thermal_trip_type trip_type) { tz->governor ? tz->governor->throttle(tz, trip) : def_governor->throttle(tz, trip); } static void handle_critical_trips(struct thermal_zone_device *tz, - int trip, enum thermal_trip_type trip_type) + int trip, enum thermal_trip_type trip_type) { int trip_temp; @@ -790,7 +796,7 @@ static void thermal_release(struct device *dev) tz = to_thermal_zone(dev); kfree(tz); } else if(!strncmp(dev_name(dev), "cooling_device", - sizeof("cooling_device") - 1)){ + sizeof("cooling_device") - 1)) { cdev = to_cooling_device(dev); kfree(cdev); } @@ -1123,11 +1129,11 @@ exit: * in case of error, an ERR_PTR. Caller must check return value with * IS_ERR*() helpers. */ -struct thermal_zone_device *thermal_zone_device_register(const char *type, - int trips, int mask, void *devdata, - struct thermal_zone_device_ops *ops, - struct thermal_zone_params *tzp, - int passive_delay, int polling_delay) +struct thermal_zone_device * +thermal_zone_device_register(const char *type, int trips, int mask, + void *devdata, struct thermal_zone_device_ops *ops, + struct thermal_zone_params *tzp, int passive_delay, + int polling_delay) { struct thermal_zone_device *tz; enum thermal_trip_type trip_type; @@ -1362,7 +1368,7 @@ static struct genl_family thermal_event_genl_family = { }; int thermal_generate_netlink_event(struct thermal_zone_device *tz, - enum events event) + enum events event) { struct sk_buff *skb; struct nlattr *attr; @@ -1439,7 +1445,7 @@ static inline void genetlink_exit(void) {} #endif /* !CONFIG_NET */ static int thermal_pm_notify(struct notifier_block *nb, - unsigned long mode, void *_unused) + unsigned long mode, void *_unused) { struct thermal_zone_device *tz;