Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6404904ybi; Wed, 29 May 2019 07:22:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGMM3o9ZiE2LdeMqWOf26VoBU4JG6/AE0IR5qZ7qz1SomlgwbWRZDCl1Z6gGPVUmuKsV3F X-Received: by 2002:a63:de4b:: with SMTP id y11mr4736123pgi.301.1559139761591; Wed, 29 May 2019 07:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559139761; cv=none; d=google.com; s=arc-20160816; b=gaZC+Gu7WFKOpNeCma6gUm9htlRkayb5hzm/eVlqhDa3J8dkJbeu0IpBrWRKpeGw2I nbvm70dYin4JCLNrIkT6ubZY8ShDDoRC5Uv9CJQreabrhRyU1OdtIqsHyA0whUY6bPWA lfHtP58xKgJcPXj+NrC7OsxBR62TqQx9E3TnSKCMe/49xmu5ap3WYW4R4AD8JgrRsmpA g6oakK7I/odQSaB9+l2HzADTi1/8UgEh7u1C2IjS/dq44j+JT0avKylHvf8N1lxPgbeQ Krn+ej6W+nVv9ZqNHYglKfLXP6v5Py5MdRyKOSt+LtYpXLEctEsV6ABdSdWa9gF6SgVh 2doQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Y0q+Y+sIviFUqIa082iN+BhTufIjQhyZZXuXfardwAY=; b=anwKF4CmJTrUH309ph3AgnV56rbpg9AcbRuFeVb9uKQ/XR5uMvzfHuAoak2ed60W40 gVbOHM0Y3tOhyUzAxLVOCIFQf7ROgJsIqabbCvJzjUJdPuQCVL+0cBh71wO6klHiuB/z UPHXEPTBZoqZIqQfpe877Xp4WXpkAvDyv0Px62nHCpHEJPKSH+Y6i6CTxG6M/WTqfiCw 0XuvB3N7+qtMvM/BZ2MmHzbPJ99MbJwJ4enVbyDkc5bQGHLxHX2d4GA4S9epy8AijSKS +wCYVtkazsS8+aDA7FrSccUCu/biIyyMg1y0uX9UgYDno2CnmLtOBptg8S58GBs5rFrC MNkw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si24437971pgg.520.2019.05.29.07.22.24; Wed, 29 May 2019 07:22:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727340AbfE2OVK (ORCPT + 99 others); Wed, 29 May 2019 10:21:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:38472 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726889AbfE2OVK (ORCPT ); Wed, 29 May 2019 10:21:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 41F19AEDB; Wed, 29 May 2019 14:21:09 +0000 (UTC) From: Thomas Renninger To: ego@linux.vnet.ibm.com Cc: Abhishek Goel , shuah@kernel.org, LKML , Linux PM list Subject: Re: [PATCH] cpupower : frequency-set -r option misses the last cpu in related cpu list Date: Wed, 29 May 2019 16:21:08 +0200 Message-ID: <1825219.HmmgU4QcfA@house> In-Reply-To: References: <20190529093033.30068-1-huntbag@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Thanks! Thomas