Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3715541pxu; Tue, 8 Dec 2020 21:22:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyy1aGhCJoWmyxMk7WWrM+kV5MicA+uyH/CEDWvPptXXj2sAUPlETm2JQXm23lpmnvo9AP4 X-Received: by 2002:a05:6402:31b5:: with SMTP id dj21mr473320edb.90.1607491355283; Tue, 08 Dec 2020 21:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607491355; cv=none; d=google.com; s=arc-20160816; b=BBS8Z6k+fCgRKOBFfWQ2hoHn/y60aXgLuOYceUcivD7v0XMRk4N6s0MYmslUyoTwuA r12O9gRDmpPSBGhOc9XFbsxe1LJFCAPAI219SB22IZWZEqJhVZ9x8k7AuItxeLXiGZ4a fghvuEKbOYYXmpTH0UIUEW4S+X4TACEIpxFkSE/3tCPDVMP82gvqIQSXPmS5lXZJ8nFm JNnu57Mac5v2NWY7vs9DyggbJsb8HdhS0V9PeYliLxqKIWvysBGyq0Ow+6zXh+tFLh15 g536j/MLxpAIrj7xHvYdzo6MGAD3t37AJ/pS3is+sE+6Ezk1TOh9od1eb3viLnB5yEap YsLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=HN93vg3c3DB6nHbJPHtQvlPqetLjTUkwz97cHr4cWYA=; b=wC3D0DEcA4TsOqDGr9oSNVq/dr1rxL+wKM6i8iTP4oXNuQfFLEMFf2kCDuAuicEDRf 5ou/saHBCrjpxcfiBtl6XF7YayjBMkszZyNm1hEt/zdl/cllV4mxoDbg9PpJHf+R+uZk Sq0fJykxDg3HslSy4UtQLyadcrEqb4EdBu4lSd8CYAl3HrFKFI5sBQlpHLvhft1iQzNF JtLJF9tqSPrBagwftNf3obXTCGkHA6lzNjTKw2ltCEhmThReVoAinK7B5aUabi3qa1LM nOQKC3tX7h/ZRkLi2syXL25dURp0ZahuNst10lDen38md+ywEC5gyubNTQbIE+JB3AV1 RiRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=Yt24v0LC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv27si178097ejb.720.2020.12.08.21.22.13; Tue, 08 Dec 2020 21:22:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=Yt24v0LC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726508AbgLIEAK (ORCPT + 99 others); Tue, 8 Dec 2020 23:00:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbgLIEAK (ORCPT ); Tue, 8 Dec 2020 23:00:10 -0500 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F27F5C0613CF for ; Tue, 8 Dec 2020 19:59:29 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4CrNbK1Gwvz9sWC; Wed, 9 Dec 2020 14:59:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1607486366; bh=83V+Va2FNLgnoBV3YAia+6UJv+qGMO3fTqLdZkCP+C4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Yt24v0LCtsKwWGXCurr8VaFtMo5RmrQKPnR9mW5NtbRlzdHpZ46yELwnVAisTASgG fITRNt534cteOwIkr8yluYbJwiwnNFssp0dnxIwDFak9yz/aOZeuoBSBqCAiESKgAL yfbZ5FkAPg1QOaUMqBeAUBjcyFFlcIEXVdnR7jG5H96Xpt6TO+9AyXhT5Nl+7GR5vZ cTH3ovccMRffeawB3BFNwkIoE2KngtZBDjsrWioLXuhqlNLlIByayl6ltlnb4bkTe3 e3r+1xg3XAKXlLy6GgnE4o7XbMPdRPDQS9JnPjoITklFF9OSifjZQ1xWXlYmuE6BDx jmWLAUp7V8rTg== From: Michael Ellerman To: Gautham R Shenoy , Srikar Dronamraju Cc: "Gautham R. Shenoy" , Anton Blanchard , Vaidyanathan Srinivasan , Michael Neuling , Nicholas Piggin , Nathan Lynch , Peter Zijlstra , Valentin Schneider , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] powerpc/smp: Parse ibm,thread-groups with multiple properties In-Reply-To: <20201208172540.GA14206@in.ibm.com> References: <1607057327-29822-1-git-send-email-ego@linux.vnet.ibm.com> <1607057327-29822-2-git-send-email-ego@linux.vnet.ibm.com> <20201207121042.GH528281@linux.vnet.ibm.com> <20201208172540.GA14206@in.ibm.com> Date: Wed, 09 Dec 2020 14:59:22 +1100 Message-ID: <87v9dbsk85.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gautham R Shenoy writes: > Hello Srikar, > > Thanks for taking a look at the patch. > > On Mon, Dec 07, 2020 at 05:40:42PM +0530, Srikar Dronamraju wrote: >> * Gautham R. Shenoy [2020-12-04 10:18:45]: >> >> > From: "Gautham R. Shenoy" >> >> >> >> > >> > static int parse_thread_groups(struct device_node *dn, >> > - struct thread_groups *tg, >> > - unsigned int property) >> > + struct thread_groups_list *tglp) >> > { >> > - int i; >> > - u32 thread_group_array[3 + MAX_THREAD_LIST_SIZE]; >> > + int i = 0; >> > + u32 *thread_group_array; >> > u32 *thread_list; >> > size_t total_threads; >> > - int ret; >> > + int ret = 0, count; >> > + unsigned int property_idx = 0; >> >> NIT: >> tglx mentions in one of his recent comments to try keep a reverse fir tree >> ordering of variables where possible. > > I suppose you mean moving the longer local variable declarations to to > the top and shorter ones to the bottom. Thanks. Will fix this. Yeah. It's called "reverse christmas tree", that's googleable. I also prefer that style, it makes the locals visually sit with the beginning of the function body. cheers