Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5036612rwb; Mon, 8 Aug 2022 11:00:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR6c0oLOQ+GpIe6jdRLTGprwJJ9sgym0V1ezlqt70KVftkoiVMOc2U041H/CLPARuWf3Lows X-Received: by 2002:a63:155f:0:b0:41b:6acb:68b6 with SMTP id 31-20020a63155f000000b0041b6acb68b6mr16153002pgv.225.1659981614799; Mon, 08 Aug 2022 11:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659981614; cv=none; d=google.com; s=arc-20160816; b=ex1IKf27k2XhkTH+heszsnZtjMy3JLz6MamD1ctRSJC51l78l8geQLuD+Geo5lHu2e t9OhqXTUyEiujvuQYHXaAb+IbLvQrfnVOr7Ufd0F5A2VDHlc4Rt0b3S+fhRJFFcj9uXD LbD1UXnkRO0fh5etspXLP59gCDJMy4+Gj7w48nYXzLgmX8JECGex/Q5Q6eWeAqrBmYbP dk3RIQloULO2CihL+Zz4syJV/SYjG0Z935/2FRb2Lz+hUUtG1guDSlGxze5LsAuCRAmw DmcWxkLvff6kXHEAlDta59TgLEYmOC3W12kQilNrRPOu9D9QfzNIEjQgJ6moIlZ93T38 qXVA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JRJo7F2gCg2Q0iwSOcsKqBEMEw8Tt1m4hAD6oBd1hBg=; b=J9pffEDseauZopo5AFjiLiwI6EXEO7dJ4lmCfdgywLw3mh3Jdsc7qqcjrodIAyxzeA y/FE59vIOcPoSLLvmFeToJ/ON9uW8Rm7PbyXizYH0rQO6fccZL+1XWg8caM1gpuRY5VA OAyIhYoQkNgd69K9/iOA8pOtjyww8KySNkSdk1OUSf17AY4DUmKQ5P3JlQmxr83z9vRz 6qhDil4sg8dX7jVzRbTy79OYEI5zj6bcl1IjbLSkN5pFAr2Q6UXcEhbKNhUtK7Si0Z7F TSO6rNsyTEKVo2mtFZvDmCJhQ2ei+D4Od+aqn0WBU/6FmffKLM4J5df84mZ86JtjEQzU oRgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=AjsuszBW; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a17090ad81500b001f50ee39879si6976548pjv.65.2022.08.08.10.59.58; Mon, 08 Aug 2022 11:00:14 -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=@alien8.de header.s=dkim header.b=AjsuszBW; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243784AbiHHRwV (ORCPT + 99 others); Mon, 8 Aug 2022 13:52:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243591AbiHHRwU (ORCPT ); Mon, 8 Aug 2022 13:52:20 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E34EDFFA for ; Mon, 8 Aug 2022 10:52:19 -0700 (PDT) Received: from zn.tnic (p200300ea971b98cb329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:98cb:329c:23ff:fea6:a903]) (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 613A51EC02F2; Mon, 8 Aug 2022 19:52:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1659981133; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JRJo7F2gCg2Q0iwSOcsKqBEMEw8Tt1m4hAD6oBd1hBg=; b=AjsuszBWb38+AQP//zAjgl4mLUEBfRlAVHX8WdLlXNMROy2LTy85rsEusvE0Z2NOmYV0Ay zTFzRRfIwC9ex4UR4ZA+4IFJNgG/2uPOZtLzNB1z67e6KcswZ/+2YwcA8pu7oPJPEbtnhx +UgpaaHtxXkXvoAwoh5HDQf9WTDLdBg= Date: Mon, 8 Aug 2022 19:52:09 +0200 From: Borislav Petkov To: Dave Hansen Cc: Ira Weiny , Rik van Riel , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC PATCH 1/5] entry: Pass pt_regs to irqentry_exit_cond_resched() Message-ID: References: <20220805173009.3128098-1-ira.weiny@intel.com> <20220805173009.3128098-2-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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 Mon, Aug 08, 2022 at 10:43:35AM -0700, Dave Hansen wrote: > 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). Yap, agreed. It would start getting on my nerves after the second bool. :) > 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. Yap, that's much better. I suggested the bool thing in thinking that this would be the only exception to the usage, i.e., a one-off thing. I probably should talk to Jürgen whether we even need this one-off thing and maybe solve it differently. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette