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=-6.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH autolearn=ham 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 C219FC282CE for ; Tue, 4 Jun 2019 15:16:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95C67208E4 for ; Tue, 4 Jun 2019 15:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559661387; bh=pAQ9u+JYEr8bEaUMMm0FhnKAn06YVOdptDWZn/r/23Q=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=TvkQFk5U4P++LkL3NZ/FF6VEw4p91XyUD3hWWrl6xWHM+QgJdAR/LgLs1o0cAKXpW EhnIOg9VUFzspQhvupYU0rl1wiF8hCwq/sYc8489NfpE8byXwJwVQz62ble7ZKBXId n4HnDniyCJYlcAZTOeeK0oTWxx2ErrhVCzbHVMIU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727934AbfFDPQ1 (ORCPT ); Tue, 4 Jun 2019 11:16:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:38890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727912AbfFDPQ0 (ORCPT ); Tue, 4 Jun 2019 11:16:26 -0400 Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F24B420843; Tue, 4 Jun 2019 15:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559661386; bh=pAQ9u+JYEr8bEaUMMm0FhnKAn06YVOdptDWZn/r/23Q=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=eDTYX8hnxRGrI26LUGGi/CZbcE4D/3BLVgnyuc7XItSVxgmG67/4ym8jSg6uxnjxF mQf8m/ZQ3lUk+6207cPZRcPzShswLK5ZAiVpMAChOE5SxKIUovugiLt5U7ozs/sgI/ 7Y0kG3ubOR4kvn6TnkqUVFitW2KunUFINoYdilaQ= Subject: Re: [PATCH] cpupower : frequency-set -r option misses the last cpu in related cpu list To: Thomas Renninger , ego@linux.vnet.ibm.com Cc: Abhishek Goel , LKML , Linux PM list , shuah References: <20190529093033.30068-1-huntbag@linux.vnet.ibm.com> <1825219.HmmgU4QcfA@house> From: shuah Message-ID: Date: Tue, 4 Jun 2019 09:16:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <1825219.HmmgU4QcfA@house> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 5/29/19 8:21 AM, Thomas Renninger wrote: > Hi, > > On Wednesday, May 29, 2019 2:12:34 PM CEST Gautham R Shenoy wrote: >> Hi Abhishek, >> >> On Wed, May 29, 2019 at 3:02 PM Abhishek Goel > > ... > >>> bitmask_setbit(cpus_chosen, cpus->cpu); >>> cpus = cpus->next; >>> >>> } >>> >>> + /* Set the last cpu in related cpus list */ >>> + bitmask_setbit(cpus_chosen, cpus->cpu); >> >> Perhaps you could convert the while() loop to a do .. while(). That >> should will ensure >> that we terminate the loop after setting the last valid CPU. > > It would do exactly the same, right? > IMHO it's not worth the extra hassle of resubmitting. Setting the last value > outside a while loop is rather common. > > I do not have a CPU with related cores at hand. > If you tested this it would be nice to see this pushed: > > Reviewed-by: Thomas Renninger > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/ cpupower branch. thanks, -- Shuah