From patchwork Tue Nov 8 05:09:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416493 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 CD08960512 for ; Tue, 8 Nov 2016 05:11:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE70628B99 for ; Tue, 8 Nov 2016 05:11:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1C8628B9B; Tue, 8 Nov 2016 05:11:52 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable 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 5189828B99 for ; Tue, 8 Nov 2016 05:11:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753421AbcKHFLP (ORCPT ); Tue, 8 Nov 2016 00:11:15 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35494 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbcKHFLM (ORCPT ); Tue, 8 Nov 2016 00:11:12 -0500 Received: by mail-pf0-f195.google.com with SMTP id i88so18054382pfk.2; Mon, 07 Nov 2016 21:11:12 -0800 (PST) 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=rPBoKeuiBPm7MapbjHAvymqGlfnNIWKDKnNGanQ7lI4=; b=FFV5TTDeZsQxFcY2BYkXHgf66JQxWg1547oMDgOOVGvnnNLQwNtn7rDqAmDI7weDnr aF0MJ+RuMU8vvzFSV2AO7/hEOZ15XBgh0Zd2IFFX6i7n9OkKDvW7cfK1500eBYnSorKr xvBw6EFcR2t/pcmuSEhRihZyfP2qZFcjUOHNoouxPxS4LTr9atdC+IJkth0K1iUJNcyA YAS9KjepFHUrBQjYshIAoU1lfBy5Xk4JiyevdWkAq+UegywRQ/WmOa4wKJRWsIm//pn5 Mp82LU7hfUAJLWFSH9UKQA3yZxWhhzTk41YHdn7uDe4E0Ir1vwnXjCzsunEZ1N40U4x+ wAxA== 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=rPBoKeuiBPm7MapbjHAvymqGlfnNIWKDKnNGanQ7lI4=; b=geS5agzdWAtLQRgkkfCSJtlcDjFoAoZllwS7yIvioEoFZzVbA4NXsYI3UQRA8Zwbd2 yOuJ2cEr/rJ5t6AuRjPhDKj1gDYeuQpVFKKezEr0ulfRh2+rMgXlU4EFu/WLLCnuWFQq Qh33CADrUS0chQbBZZrcIH6bVEZZKNwQ8BBcx+P+ViUeFY8Ucn1b+w0NhiFLZ0G5IcE2 NnBd/mzlU8L2IL7HzfF788G8ZN6bSeQVsCuTai3tLVv3TLrk/QaGPLylZUqsh0OTvj7E c/WnZlkHuDMp13Fd9qDQ5N3ZX1f02c9mjx+373Fb02+M7ZPIA6xMspNSYAa8b5/WoFLx hUew== X-Gm-Message-State: ABUngvcQPyo0A1IX9NqLmdoKBv97yZoqB0IgebOntwhb3mhT0OC/ni8QFDPB291b6CPRLw== X-Received: by 10.98.10.3 with SMTP id s3mr8769488pfi.78.1478581871583; Mon, 07 Nov 2016 21:11:11 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id v10sm44505297pag.44.2016.11.07.21.11.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:11:11 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 43/49] thermal: core: standardize line breaking alignment Date: Mon, 7 Nov 2016 21:09:21 -0800 Message-Id: <1478581767-7009-44-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1478581767-7009-1-git-send-email-edubezval@gmail.com> References: <1478581767-7009-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 f19fe03..d33b29a 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; @@ -797,7 +803,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); } @@ -1131,11 +1137,11 @@ static void bind_tz(struct thermal_zone_device *tz) * 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; @@ -1400,7 +1406,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; @@ -1477,7 +1483,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;