Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5551353ybi; Tue, 4 Jun 2019 08:19:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHV8vRqTz1GSuM7xIamyaW+i0TFFdJiFqDdzhNCauQqmAAJz1PB5IXc+LQzAm3+5GrPI2z X-Received: by 2002:a63:8f09:: with SMTP id n9mr35710727pgd.249.1559661549957; Tue, 04 Jun 2019 08:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559661549; cv=none; d=google.com; s=arc-20160816; b=qQtlRZVe+ug6B2IkSql2IhEP33d0XE4aX0A7PVmhiCGjNJFQFim7b4H1rqoIW285VE ZW5sBHsl2DwgeRthswDdcUJzR7HkE5D/E4OEfYcdzAyao4izSc0SlJ3NlKQM65FVQhgc 3Onx52WnExAqylaOyPKZaWbjUrBSprtIM+LTro+CBvxZe1CBDARm6v9AKSkDwGFSrtI8 Yt5eGs78B6awWlxjrby0a7L6AVsuZ1Wy7wp8RzBjzk4oLLoegRfCV9u+/B02Qf3Vhc7n E0ND6GnHB7z7mQvw4IKmUIIF9/TSqCVAgYXrv+ccDZtB2kQlaakc/iIMAig6vRN0bw7S 4JHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=qZbwgw4Lk/WVNr8+UVo93JROzRVGMlGDfST3iJJ9+Xg=; b=oe//tBOCRcndvV/Y5iE+pQdDsWOpiqF8OuJJFCfJcrK9VdppSmC/4jDXKbZAN1oocx uQ8cQrVMdtN4ENNHCTOv9M3swnIxas8GI1Ekgd2TYB/a0dYjw90/uTifaAQ9Kt0oaRZq ykgECLD5F6mcl6O9JhbtrfXrf/+kora/fN0Glqn6sbnrR2ZU6i2aI5g+Q32kca2KcpZa BToo7RKQGkYPK5ho2cHH1CGPsgzJvl8cyI+f0CtvMNf53ZfH9F+rtMtMnIeD34B/G7Gd Gt1CIAdOm1rBAHj/hM9Gzt7qKpY6DRAF+Ggm1q51WwFS003iw+yxXObRNbVv497bs/pb sSXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eDTYX8hn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si23391589pgg.225.2019.06.04.08.18.51; Tue, 04 Jun 2019 08:19:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eDTYX8hn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727960AbfFDPQ1 (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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