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 AFE6DC433EF for ; Thu, 10 Mar 2022 16:09:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240749AbiCJQKR (ORCPT ); Thu, 10 Mar 2022 11:10:17 -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: 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