From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D036C388F9 for ; Tue, 27 Oct 2020 08:54:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6E48207DE for ; Tue, 27 Oct 2020 08:54:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="m0KVs/9y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2509558AbgJ0Iyz (ORCPT ); Tue, 27 Oct 2020 04:54:55 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33986 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2509548AbgJ0Iyy (ORCPT ); Tue, 27 Oct 2020 04:54:54 -0400 Received: by mail-wr1-f66.google.com with SMTP id i1so956702wro.1 for ; Tue, 27 Oct 2020 01:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YlMgE4ppo7MlVQWfq5CEJGy3SNLKHCbh9joy1n3UStg=; b=m0KVs/9yZ8OKFotOH/qrqzH0gTb83r9uYRcXbBtFWL9gTbMDm1+qwna4OX/Cs264gd yPNXo4soQfhoi3XIdGNsQ4gLuVVAF8HsmBJTQdCYgg3c8oLMjaOXPcL+HAqFWB2y0O9I vewiTkzY7MZmbbGZda0k1IM/NmBa2srAT4jbJVW9pwZzw2269/7heqtJrOInMeNaiXcp 9BSoy6/o1NPomhDffBfWzikSisc1lCttQxn2gUDxW/PWImq4GNh5e3qFxQIIO57dEb7k XEoT+8qhlFquWP/mFUtF8GufxfJhg6cDPd/S8aq9veeWZVP/8iXOAc5B1gTuUQcotJir ZX7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YlMgE4ppo7MlVQWfq5CEJGy3SNLKHCbh9joy1n3UStg=; b=pBbh3/54ds+U+kygLUMCDTyPYbxSTfaOniaFCaO9vFmZAOGmisep3rdsfLRxQHnrRP 1Y95RaHCtMU3d8S87H0jP8sH5KOtPP/5v+LeRgd7w0S4AmT1u2QdTlggXbCD9yWPh925 8J5+15Ji7WJAx94shcKyteJWmJzwT12X5B/J/ykRXnD7BeQcGDySF8sIDhIeo+DB03Dh xf2Ovehdw2kP1UGB3RNpk2AkQ23ACv3kDFummtUTA2dU97sbUpcOkWLELKgNLXZTGz09 5yGfhNB/cpp2mp7ncyqz1HEWXoobddBSglsMPMTPyazMMUh953eYoyUXVG04p8ZW/Zg7 cwsA== X-Gm-Message-State: AOAM531/Ekbi917u3cB9EoNsnStOczPow/f/98e7po7frz9ceHApTup2 tacQGcMuSC/JP2o8gtXkIGhPSQ== X-Google-Smtp-Source: ABdhPJypWtJn/cuPU7mPyxPMd2RFbt2QsX7vI7Bl4AedIthAYHyvrkDB+hjzcxJ3WhE1L/Aa1ixx7w== X-Received: by 2002:adf:edcf:: with SMTP id v15mr1423257wro.291.1603788892011; Tue, 27 Oct 2020 01:54:52 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:6cbc:1a3:aabd:d451? ([2a01:e34:ed2f:f020:6cbc:1a3:aabd:d451]) by smtp.googlemail.com with ESMTPSA id c1sm1130197wru.49.2020.10.27.01.54.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 01:54:51 -0700 (PDT) Subject: Re: [PATCH v2] drivers/thermal: optimize the for circle to run a bit fast To: Bernard Zhao , Zhang Rui , Amit Kucheria , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com References: <20201027013743.62392-1-bernard@vivo.com> From: Daniel Lezcano Message-ID: Date: Tue, 27 Oct 2020 09:54:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201027013743.62392-1-bernard@vivo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/10/2020 02:37, Bernard Zhao wrote: > Function thermal_zone_device_register, in the for circle, if the > first if branch set the count bit in tz->trips_disabled, there is > no need to set in the other if branch again. > This change is to make the code run a bit fast and readable. > > Signed-off-by: Bernard Zhao > > Changes since V1: > *make the code more clear and readable > > Link for V1: > *https://lore.kernel.org/patchwork/patch/1324507/ > --- Applied with the patch description massaged. https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/commit/?h=testing&id=37b2539e63d6570c9ee51b1d48bdecb334df367d -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog