Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5957283pxb; Mon, 14 Feb 2022 11:40:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDuFV2K/g93H0wRmoBJL85fwxTkARqGCAPNL2Utocp+KGzuKWWdLetA6nnoy+yB+084Hal X-Received: by 2002:a05:6a00:14c1:: with SMTP id w1mr390976pfu.53.1644867613479; Mon, 14 Feb 2022 11:40:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644867613; cv=none; d=google.com; s=arc-20160816; b=dr6GiG6yFN5WgvswX26OPHclhjKWHR22E/bvq5OsmhYiuXhdq+7xAiVeknSER/VXu3 86huLLsR5YvBpjHX94d2mbP7DWhlkye1NBuQwgwicf/PHFvAm7uffKSnft4kQ5IjhTVC xejqkh6qSuD5nYsQdaeQbBhhyJKpkJaJJptg7bbBTJhSt5zcFAp7WjPTcRxUfbdgkdiX lTEI0ebAV+ftV2UuzbuHJ2nAbNm9yCkt8eqJnGjTYQA2Dr0LY/RqDrWLuD5buxCyY9lv A/u8YJniKXj9xrtZnAimJ4U5vrjVk4ZuIYFTCPmbsSp3Gw0MAwRFOlmVjyTmh7Khobgw p0LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=awmOYe0q2eigKq4ItO9KPxIRltMibHr3LJFHTIRlYXU=; b=mR5LNBnAPGDWX8cCCgnjZfnO1nuAEN2Ume5TpMw7wirELXYvsEi4zKzKFSau97eScx JW1jO+nzKkFBVI1yoWgrhzVf6dzB0FkT2EOIxy739Mo75X4phg1p/acqDbcpEbag+epE b06ITnUuPNphVDAcsy2D/Saf0YVFLpfdYa2wGqNg7/ju3kDnhTdLx05YxzBgYOJ9v5MA 0WF1WMmEVY9h7PS463QdogkMoVKPCXT5OXmSc3hsYhoOVKTaSJct9MjXfJuOaswPdW3l JUtoilGoDg/qYUY4NbWnJMV1L/YZidsNpwTrOKwJkZC2sRJ8YvCMY0pxG3HzZzeWF9H3 V4tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=gZLjxhvB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 138si535848pgc.450.2022.02.14.11.40.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:40:13 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=gZLjxhvB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5130710709C; Mon, 14 Feb 2022 11:26:15 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352990AbiBNMU4 (ORCPT + 99 others); Mon, 14 Feb 2022 07:20:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:51692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352993AbiBNMUv (ORCPT ); Mon, 14 Feb 2022 07:20:51 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E5CE49274; Mon, 14 Feb 2022 04:20:44 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 9BFDF1EC04AD; Mon, 14 Feb 2022 13:20:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1644841238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=awmOYe0q2eigKq4ItO9KPxIRltMibHr3LJFHTIRlYXU=; b=gZLjxhvBJTVORBJtqIUTiIK4na7LGN3pMvm2SlZSnisTU43XeCmXW7yJq2Vl0+2CYlEeaq wdNAEfJZWzxiGMzG4IQYdaQlKJV4HnGKEqyIRhsHbQDuRpPqtGFDS+hWG8kSz/YKB5UmTV ABGVWy7ScWOhtYNEX7DSJLpbXorgR7A= Date: Mon, 14 Feb 2022 13:20:44 +0100 From: Borislav Petkov To: Yazen Ghannam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, mchehab@kernel.org, tony.luck@intel.com, james.morse@arm.com, rric@kernel.org, Smita.KoralahalliChannabasappa@amd.com Subject: Re: [PATCH v4 12/24] EDAC/amd64: Define function to get number of interleaved channels Message-ID: References: <20220127204115.384161-1-yazen.ghannam@amd.com> <20220127204115.384161-13-yazen.ghannam@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220127204115.384161-13-yazen.ghannam@amd.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, Jan 27, 2022 at 08:41:03PM +0000, Yazen Ghannam wrote: > Move number of interleaved channel calculation to a separate helper > function. Drop unused cases. ... or by looking at that change, I think you want to have each separate step in the address massaging be a separate function. Which, if so, makes sense but you have to say it... ... > +static void get_intlv_num_chan(struct addr_ctx *ctx) > +{ > + /* Save the log2(# of channels). */ > + switch (ctx->intlv_mode) { > + case NONE: > + ctx->intlv_num_chan = 0; > + break; > + case NOHASH_2CH: > + case DF2_HASH_2CH: > + ctx->intlv_num_chan = 1; > + break; > + default: > + /* Valid interleaving modes where checked earlier. */ "were" > + break; > + } > +} -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette