Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5053192rwb; Mon, 8 Aug 2022 11:16:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR66oJMWPZ14zJQgvIaon4sBDb8ISdhT+Zz2QffPusbFi5wbVdZEBzmutVylsozCVx/xodzT X-Received: by 2002:a17:906:5a71:b0:730:aaa1:a9ec with SMTP id my49-20020a1709065a7100b00730aaa1a9ecmr14556750ejc.440.1659982590870; Mon, 08 Aug 2022 11:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659982590; cv=none; d=google.com; s=arc-20160816; b=PMFIDd5YHjGIci2dqouUfMYhdpDuaF/1UBxIjoErphRNgPk8dbmTwiII/t915yfTyl C+4yIFui7fUwRHl+qeEVnV5Ym6ZIgN9kRUOsOy5xC32kz5sFeV3uv5DCxLF5Uy0cjfBj /AoTu3RycwIz0r9AVn5iPAzMEhEMuhMeGIxNK3oFzMFPKaxU/aDy6DOZTl/LU2q5+V+H lGZyFpVL2d9tDZzIqJfA+Wk8+/nwd/I3FXSFdDnUbO5pGDB5rEBB3uegeX6rR491ISDM aKMzMczwEpZ0Sp+mzu5QtFluK2m6cseOgwS39xmLJY+Dpx4q504uek29YXWFmsSCBwtm gDLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=W8cjAfGnmpKS3m3KE+HCZewi9AmzOGxcwWsxxWAqg2s=; b=APFbiYEnECJyGNuibAVqwQoY/w5XpXLpUnHKw6tztPTDmEmRpBJmLHYsbIg/ZUjohh bkwvhemroCVQnffmiSdsFWoM83Ex1g7+JWe375tT4ET+qa2u0fmdd3eNKNvh7/T/s9/e BH/OchX6JCd8WWbzA2za7SlQhhk5nrU/dDZ1La9/tG6lVEWzMg5LzqIBJaYVwtGnxmjn RcJyh77q2XisShkbSbz9AmyIt1UXMsW243VZzrkJoh/k8nwVfYUw+6f+ZP1Ujmx04FcY Konk1ud5NuY2KQlL3RsKvRCZkMC97DVGwuPdX0dXzlsPlEKculIjKV67wY3O1bP5ZCVy LY8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WfL43eYu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp15-20020a170906c14f00b0072b3caae89asi240826ejc.341.2022.08.08.11.16.05; Mon, 08 Aug 2022 11:16:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WfL43eYu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244332AbiHHRoI (ORCPT + 99 others); Mon, 8 Aug 2022 13:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244343AbiHHRnf (ORCPT ); Mon, 8 Aug 2022 13:43:35 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC355B51 for ; Mon, 8 Aug 2022 10:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659980614; x=1691516614; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=eZHz5AZts8pa+4dAgLDzj+RDlAzwOdbJVrXvXp0Rcms=; b=WfL43eYuI3KWCs5hUgkt+oYHtcri+hAusIikoE4nQd7hW7eQOSV/U/zl aIj4HPf0AZ1kGVWpxjrcZBReISUp5iIsiBfAdgZ1Y4jN0XKJTwkPTv8/j Lc8A/t04jO9AthfJItzKuBXslRCm/SGsRnuXtpv//wIjYE5qFdp8pJReS OJl/amiW7l6A4OouBVNwKyvdOdpiIaPD+lftPTIiY7L2TdGb+NRbHbFR/ vWXh11Gn+wx6fE/wPL+hGAo9KkOqKEgW+EdVB5bPz5y8vp95zOsPsKEb0 EPKjnFYoj5yJ/0bkIZVFHHv5IoLhT9S/aWTrtiId5wMb3RIJNM+connEI Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10433"; a="273703180" X-IronPort-AV: E=Sophos;i="5.93,222,1654585200"; d="scan'208";a="273703180" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2022 10:43:34 -0700 X-IronPort-AV: E=Sophos;i="5.93,222,1654585200"; d="scan'208";a="604452861" Received: from sankarka-mobl1.amr.corp.intel.com (HELO [10.212.251.15]) ([10.212.251.15]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2022 10:43:34 -0700 Message-ID: Date: Mon, 8 Aug 2022 10:43:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [RFC PATCH 1/5] entry: Pass pt_regs to irqentry_exit_cond_resched() Content-Language: en-US To: Borislav Petkov , Ira Weiny Cc: Rik van Riel , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com References: <20220805173009.3128098-1-ira.weiny@intel.com> <20220805173009.3128098-2-ira.weiny@intel.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 8/8/22 10:38, Borislav Petkov wrote: > On Mon, Aug 08, 2022 at 10:34:19AM -0700, Ira Weiny wrote: >> I thought about that but generally have been steered away from using bool >> arguments like this. > The reason being? Might have been me. Function calls that look like this: foo(&ptr, false, true, false, true, 1, 0); are incomprehensible. A true/false is effectively a magic number here and you have to go looking at the code implementing 'foo()' or at least the declaration hoping that the variable names help (if the declaration has variable names). I think I've encouraged Ira to do something like this instead: enum foo_mode { MODE_BAR, MODE_BAZ } where the call ends up looking like: foo(&ptr, MODE_BAR); which is much more self-documenting.