Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2752619pxb; Mon, 31 Jan 2022 03:37:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4vaLutI2NFQ3a777Jh2eVE1/ngbzUQGPXVuoodEResvS51/pBrgV2z3qCSKS7V/BfmiPd X-Received: by 2002:a17:902:b781:: with SMTP id e1mr20410816pls.72.1643629054252; Mon, 31 Jan 2022 03:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643629054; cv=none; d=google.com; s=arc-20160816; b=h+vW3mJ9m1qspsu0p1PfV7rGfnAEEK/yTKVvL5LZWVzjbtCTSRWIEM5V/mJO+v+gHJ rdzxSMbVTTsW6ESAwMRiSzGPSTg4a7rDABELXQnBFBZLKZVcIP1+7uYJRQQSMBWC72a7 td0JJmFSeKCZm+xayqP2SDALla5SSy1uiGzs4MgpI+2xsLQqr6ul70FEfuTNx25uBeym Ghs9TtKrzNpzLXGovoPfW7ysHUtRmzW69VSXW6yHUQnYVQoYyh/OtqsenmNLXJLvELtk Ok853+HaGb2v+P33TTEs9Rz23U3GQAGiH+Rucbx+FG0v5nPvGNxXLRI+Nsn+Gvrk997/ BtDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=jq5dwGgkiq/tjKMtkNEpgpX6pW2tDIubIfAQctI09OQ=; b=Ps6dsJo97Lrr6AnrZlixjoDDbVRkgt3q6a/dgxYc4pR1jrEB1L4qMV24uArOiGgJDD 3JMeYaEnbWSVd0W1HdNWd+cwJvKpV0BC4G+wMSo0VwoKRjvEB726pqrqfR9CaX/9G91j 104gn6sQolXXlksZDB/pgtXRQo8OV2VxIUpP7tcbFeYKwwygpOV+g/f5QPawnmCedGUv E22ctVSfxaGSV1RBCwvPKLEfJO86bZ41MMir1/KsVReRALP8kVlPgAbmss+ZB0hm0nQ0 LrxPNIPEuiHiV1GxIw/P4SVdlFWrGG6XUqnYZ6wJ6oD4qnei704EJzk0UZXNuKLxeTqG b8Ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v201si12706623pfc.5.2022.01.31.03.37.22; Mon, 31 Jan 2022 03:37:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236448AbiA1UtR (ORCPT + 99 others); Fri, 28 Jan 2022 15:49:17 -0500 Received: from mail-ej1-f50.google.com ([209.85.218.50]:40688 "EHLO mail-ej1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238025AbiA1UtO (ORCPT ); Fri, 28 Jan 2022 15:49:14 -0500 Received: by mail-ej1-f50.google.com with SMTP id p15so19878776ejc.7; Fri, 28 Jan 2022 12:49:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jq5dwGgkiq/tjKMtkNEpgpX6pW2tDIubIfAQctI09OQ=; b=R8QrTPQ1TnxjfVBxm/vPbSs+zZoij6ff/S5aKTxlp2+ttjb1Q0WhRqnUjx2ZJ3Biei UNfKTz3xzLPiQBTHWFK+9MgXkQnFBTEHa/MJwGRcvhyD1sIgWKfQP58v0VPU/Jt0brDv RDZ+p8wigIcTVvF+lp8GckSZBkL5TNCBWlEgitH4IgrssdqOOxGv/LSeOHrqX6VlZCji 7p40IOYzL/RVtIftNnJ18ieDX7mUYDGt2M7EsYAtgzcKYvDc6ncet4P/omXQfNCwOb/1 hrSRId/zJ0PckyUyi8iR72kNXSB7rHnY8/+DWgQBd7oiPkixruHoafy3n07v9JHlX62T xsTQ== X-Gm-Message-State: AOAM531KCam80TpzOUu3GawXJjFWqyCT9OrYcAFaMGPTDKmLJ0fWESwb A9CTKcA60IvXKE4+q/jI+F8zgR0vTXdjgoQO6/o= X-Received: by 2002:a17:906:910:: with SMTP id i16mr7916287ejd.677.1643402953464; Fri, 28 Jan 2022 12:49:13 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Brent Spillner Date: Fri, 28 Jan 2022 20:48:47 +0000 Message-ID: Subject: Re: [PATCH] arch:x86:pci:irq.c: Improve log message when IRQ cannot be identified To: Dave Hansen Cc: bhelgaas@google.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 28, 2022 at 6:00 PM Dave Hansen wrote: > Shockingly enough, that parameter is in the documentation: > and double-shockingly, it's even called out as X86-32-only: Right, seeing that is what convinced me that not customizing the log message for x86_64 could be considered a (admittedly very minor) bug, and perhaps worth fixing. > Given that, do we really need to refer to the line numbers of the > implementation which will probably be stale by the time this is merged > anyway? Understood, will change the commit message to just refer to the command line documentation. > Any chance you could make that, um, a bit more readable? It's OK to add > brackets to the else{} for readability even if they're not *strictly* > necessary. > > It might also be nice to use > > if (IS_ENABLED(CONFIG_FOO)) > ... > > rather than the #ifdefs. I don't mind doing either of those if that's the maintainer consensus, but would note that neither would be consistent with the surrounding code. Prior to the patch, the .c files in arch/x86/pci contain a total of 33 #ifdefs and just one IS_ENABLED(), and systematically avoid superfluous braces around single-statement if/else/for bodies. Granted, the code has other style problems and triggers a number of checkpatch.pl warnings (although not in the region affected by this patch), but I was trying to be as light a touch as possible. > I'd also be perfectly OK having two different strings rather than > relying on string concatenation and the #ifdefs. > > Is the "or enabling ACPI" message really necessary? Not strictly necessary--- it seems fair to assume that anyone disabling ACPI does so intentionally and with good reason--- but I thought it might stimulate the right thought process for someone who doesn't understand why their hardware isn't being properly detected, as ACPI triggers some very different code paths through this driver. It seems like the multiline string literal is your main pain point--- would +#ifdef CONFIG_ACPI + if (acpi_noirq) + msg = "; consider removing acpi=noirq"; + else + msg = "; recommend verifying UEFI/BIOS IRQ options"; +#else + msg = "; recommend verifying UEFI/BIOS IRQ options or enabling ACPI"; +#endif be OK without going to IS_ENABLED()? (Personally, I think the #ifdef style is more readable.)