Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp744379pxp; Fri, 11 Mar 2022 14:00:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJ/iDgZzdik3tWgYRVYQW1wgdWcBaAOdeoCowL+ZmaMYTMKqp3JHvCq8XjZc5MUG/GpFzV X-Received: by 2002:a63:e40e:0:b0:380:bfd8:c29f with SMTP id a14-20020a63e40e000000b00380bfd8c29fmr10323373pgi.86.1647036054472; Fri, 11 Mar 2022 14:00:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647036054; cv=none; d=google.com; s=arc-20160816; b=Z17W5HaAGB8htUZKGBPoZ5j1AaUuijsEdswj15BtC+dwx5nzoKCtB62bh8xTQGe9Wl upFwRMsxpiYShf6gbFFYnBd20IHM9oqth80foBSw6SlJoBA9IEsk2ekzeEmaqzRoY5Sc cJNSh9RgREuWXIsM3XbRyHgIq1LaNlWF9Zrzz1O5Hei8UZZgvQe/5igZf9PXzJS1ZIo8 C2IDpi0i6uwl3WXhk/iWoWivygWIhH8gWg1FYD7l+FM3ePRmMwVvfuAqDFl+uNwgOBwG BizN+fdO1c1SiGLg014M4UnBsvKUOroQj7ZitEQGvinu5MNEAuFA8nAHl/Bz+kMalYa/ 1B4w== 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=yx08IRwrdan+Mo3WyLuiUJbzxkiwNi4eKWLpFxN4RSU=; b=s+Rylqytj9bWpGKFaaH1xnwRcOWEiFkaVvrLywnI2cdh5I6iN4nOb2u2OzQVy7+nHG kk6PMM2iZOtZrFC46lEEyU5uRubzURWep80WLYOLB0POkM32n27vFx24s9Vnt8N/Vtvm lqXTQWTyDPknT/PNiQ1ePkehVFoT7Cn7N2V/sxEMk8iFKSQ3Bffw1yyr96tDkc3vpuQe Es3DybO2k8xWmPhtvRs8/RdeH0xL1eUteomkaH5gjGUeQtKIRz11BX98XRGYEMxx7aVu qkpFOZLFNY9WiIedkWYLinXFeqPuNqHhoHSRnNbL/bjPNiJrgAhOAtG2HLlNijD7+u/q 8OLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=CcSDpu8h; 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 f185-20020a636ac2000000b00380b8400c3esi8494708pgc.225.2022.03.11.14.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 14:00:54 -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=CcSDpu8h; 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 6BB2021245; Fri, 11 Mar 2022 13:17:29 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240725AbiCJQKQ (ORCPT + 99 others); Thu, 10 Mar 2022 11:10:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240672AbiCJQKP (ORCPT ); Thu, 10 Mar 2022 11:10:15 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B18618DAB4; Thu, 10 Mar 2022 08:09:14 -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 AAF941EC0295; Thu, 10 Mar 2022 17:09:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1646928548; 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=yx08IRwrdan+Mo3WyLuiUJbzxkiwNi4eKWLpFxN4RSU=; b=CcSDpu8hbeYpCKhe3NkIY/bbWNHEpXJ49JcfamVD6NCRsPvchLtjJeSRTJ9tWL25eBqtHZ X2pByUwFsL1bFdQaVr4hGXzcnLj5arAzNDDnTXRJ39HU4RLGBAcoA/EIvHmDSkoMLJ4cEW NfE8ib++jzBXrIgUCm5MSnZxLU3BHnA= Date: Thu, 10 Mar 2022 17:09:19 +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 10/24] EDAC/amd64: Define function to get Interleave Address Bit Message-ID: References: <20220127204115.384161-1-yazen.ghannam@amd.com> <20220127204115.384161-11-yazen.ghannam@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 Wed, Mar 09, 2022 at 10:12:00PM +0000, Yazen Ghannam wrote: > Similar goal as in other places. When the function seems sufficiently long > (subjective I know), break it up into helper functions. > > I've been trying to decide based on logical steps. Do you have any general > recommendations or rule-of-thumb? Documentation/process/coding-style.rst, 6) Functions has some good ideas about it. To me, a function should do one thing and one thing only but yes, the decision is subjective. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette