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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C54BC433EF for ; Thu, 10 Mar 2022 16:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240299AbiCJQDu (ORCPT ); Thu, 10 Mar 2022 11:03:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241161AbiCJQC4 (ORCPT ); Thu, 10 Mar 2022 11:02:56 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D64D187BB7; Thu, 10 Mar 2022 08:01:21 -0800 (PST) Received: from zn.tnic (p200300ea971938780dcf83143dcfc403.dip0.t-ipconnect.de [IPv6:2003:ea:9719:3878:dcf:8314:3dcf:c403]) (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 B0ED11EC0674; Thu, 10 Mar 2022 17:01:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1646928075; 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=qq1ByKEPBSOo/sxIVvH/rIkfLgpjba3Yntjh1xdYd/I=; b=iRMmjX8EophVuPbvrtk5pc6091UVZXSKZ3ayEvHjTthXbp47gR22KcjFqM+ysNLjmFBU+j am2ESH4Ma51vPykRGvii5uoE2WZfDDPQi0Dank5eqbP4Dr8AvT/bxN6mHzhSfnAmAl5NwN IL4LvDdaqJaufeWucHZmzp0kuB413Lw= Date: Thu, 10 Mar 2022 17:01:21 +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 07/24] EDAC/amd64: Define function to dehash address Message-ID: References: <20220127204115.384161-1-yazen.ghannam@amd.com> <20220127204115.384161-8-yazen.ghannam@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 09, 2022 at 09:50:06PM +0000, Yazen Ghannam wrote: > But I can do something like you suggest. There will be an unconditional call > to dehash_addr(). Helper functions will be called for specific interleave > modes. Otherwise, it'll return 0 if hashing isn't used. That sounds like proper design to me. A single function which dehashes an address and that's the only thing it does but it takes care of all possible cases. Yap. :-) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette