Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4054653rwi; Wed, 12 Oct 2022 09:59:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7lbtJRznWWUcWJ8S1OJB1u9IC3eNvcC7cb2UunU6fgXFW8iWBPIn4OUS4H4eYWHYdNfNdx X-Received: by 2002:a65:6d1a:0:b0:3fb:2109:7b87 with SMTP id bf26-20020a656d1a000000b003fb21097b87mr26212868pgb.127.1665593980072; Wed, 12 Oct 2022 09:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665593980; cv=none; d=google.com; s=arc-20160816; b=VU1RvWhodo2IkWAkozHG2mhxIybmiDpp8ZZkTA+Y7dv/rCxkI8OVI0HmFXqkTCIEsE 1bRe2KWiRLmuClo7Dj2I3pU5Tcdfm8ex6fYk+7Rfa7i+pMhruuH0MIuxOrZHniBdpzXO e6IJw5FZOS67aVbDrfbiqIIFC28C34jMSZu0k5OudeE9C0xBn1m/HFP/jGdMcWRMWUoQ 7WjGzhPqHXCtRQ6+NuIzucHeWSpCngpSRDZSQuqRHpPakW8GdfMrQQ+t2OfkTZaxtZQ3 1HHn3rsnOrffr4kN3xAwOxcxRlmpZRWiVZpIWFy9fQxgPp3qnIAC0EOOL5z9mJSv8TxS xG3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=DmZMR3m2P4foh3/AnslPZcLh3BzKs5VTYcawpGmrgBQ=; b=fEtnaXIJkG2DdOJF2LBhdbOvT82MIkwQQTz6LD+SnxqSd0MyhvjeXujCg/W1fWfi1v i9ajXIo2YSRRTozDAbH+ziKn1YQO7/JPaMz112nxbIx8jEqXNS8xZLaYzVDcnQbiJW+6 mqcMTiXW0+t0Itv6wOIgVXvJllU+tyHLSWNHIEsS3+XwVAWI8c+/m0rGkAm2+IBHfJwr 3vDXAdL8CUjsk4i2fwIVEFv+TM+a7dzDyAEWFoDXUD/9KXffvzbKz2CvbPILCjpX/ZCS 9WGTwMHqXikDh1rl3RpOYoVuQsup+YQrJJSNJ6tYvBUW8QFLJfl92/nbfMSQ/sFyh4GF ammA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=W+BRf1i+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x9-20020a170902b40900b0016d67ef8943si16542776plr.187.2022.10.12.09.59.22; Wed, 12 Oct 2022 09:59:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=W+BRf1i+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229590AbiJLPkF (ORCPT + 99 others); Wed, 12 Oct 2022 11:40:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbiJLPkC (ORCPT ); Wed, 12 Oct 2022 11:40:02 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D36F45980 for ; Wed, 12 Oct 2022 08:39:59 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id 187so13681614iov.10 for ; Wed, 12 Oct 2022 08:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DmZMR3m2P4foh3/AnslPZcLh3BzKs5VTYcawpGmrgBQ=; b=W+BRf1i+101nPJSuleHKgC4CHXztnHYDxfdNnAyn8JowdXbRdwVFIhQVN2UGQ4oGXn 5X/ZlQ41XNlTLur+74o4rlpD3Pb+ki4L3vMG1NzaBBTdd2nuxmkbWmfXRKit73RHL5Zj hoSxz0q6oIs9ZRT7HObmSGlK34ePhXhq4Rmag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DmZMR3m2P4foh3/AnslPZcLh3BzKs5VTYcawpGmrgBQ=; b=ZzXLfwuEZEvJNJmxbTfCWDi28FCGXF9AueIiH5fbMJ96AvAxOArd+kHPSo4OHyo7pw PanMW2Nfaqw7D+hJ6O3QWAukxYbr8Jdy7OT4wRgCLndD3rAqgiOQMRtrhhcnFXUlT/It +FqXat1wPv9D/rqTZehYM8jdqLZ6EPGrqsL7KawUkkN7UCXniam79DvtZ80Pz9yTc4E4 VFVukVGrxrYtVFsy8sd3N1I27FtYbSe7LMyrCubk2cadtqW6TXkZjg05d6xvmX4BWas8 lu04Fll+uzaPVVg9eVKcBqP1mIlBieIel52biyD32P3AdxTdQhJuf++dqTdMizBJQJuE vBPQ== X-Gm-Message-State: ACrzQf2nD1PvDioV1jsmhq0KfPJ8ajn2qKy+e8RBUktdHs7Pr8i3Oi0t /XC0b7H5JoXqazJmKb81zNxlYg== X-Received: by 2002:a5d:9403:0:b0:6bb:dd42:ad53 with SMTP id v3-20020a5d9403000000b006bbdd42ad53mr10712635ion.106.1665589198606; Wed, 12 Oct 2022 08:39:58 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id y1-20020a929501000000b002e988fe84d1sm5805274ilh.58.2022.10.12.08.39.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Oct 2022 08:39:58 -0700 (PDT) Message-ID: <14d690a4-d2d5-01db-b2a2-e3c87b4a6394@linuxfoundation.org> Date: Wed, 12 Oct 2022 09:39:56 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] power: cpupower: utils: Optimize print_online_cpus and print_offline_cpus function To: Li kunyu , trenn@suse.com, shuah@kernel.org, ray.huang@amd.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20221012101039.3142-1-kunyu@nfschina.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <20221012101039.3142-1-kunyu@nfschina.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/22 04:10, Li kunyu wrote: > 1. Remove the initialization assignment of variables, and they will be > assigned first. > 2. Remove the mandatory conversion of returned value of malloc function, > which returns void* type. > > Signed-off-by: Li kunyu Can you tell me more about why this change is needed and how you determined the need for this change? thanks, -- Shuah