Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3905167pxb; Mon, 4 Oct 2021 12:17:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/rntp+KHBSNlrXuWjtYEvHYQdaqp41pHNs3wg+HunaKYr0plQlmp+DryZ13CXY96iPaDG X-Received: by 2002:a17:902:b94b:b0:13d:b1af:f9d4 with SMTP id h11-20020a170902b94b00b0013db1aff9d4mr1299226pls.0.1633375027635; Mon, 04 Oct 2021 12:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633375027; cv=none; d=google.com; s=arc-20160816; b=Zcjy0RMuPpPO1C8ERTEpj6TXZaK0pA2yLELyWFIG/OuN3IjMnrdT5EjqdYxO+XGqRG pAybLkYxlYHtVkZVyThxGjJYtBIo2VcHWZxw7HNBba12bQg+LwQf20ksM7b0vGJWj565 53+VrxVasP6O+E+HllgclTce1f1j1hcifS8koJqGG1AmYmb19QBvB7c4nfio7iaSLahU BAbRkjq9e6IZQUNw/vkSbI6PqqzTqpBq8Jl8M3qZqOLSpjgitiZ1lBUPSaXNMhZW4MT5 /HKw8yDEmZnqsoReFeebiGQMQ9LIvgFBrR7yD3iR+WUt6XqpLHtcvdW+pY3vQh3S5IXD PQvQ== 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; bh=eS3yIdA30SJ4zKaXnysEXsznetD3b0GwKKFLH0KJiIA=; b=D91zpM8Y5wjkMz1cng2RHz2+7CxwqZ+IRQXOdCEBA2kqT3yL+jUAyXRatbOq3Mpcm3 pbMimjTPJhdxyN+1lfgt84oFqqKanJaRgsdgp8HnBLHeZBWXjZXrck4j+3Xmlevvj/W1 oeTTvLofkTk3jDHtw8QcmfDdmuEPGYAzBewPavkgyzk0BaHFm2yTCrAs2QINppJtTXQz wriA3Lmk9BH1/FMo6BkuqgRo66BUp6RZu2U+cUrrYlp5udPUEX0wkbp/SIQrrH5zp0q/ rojEsniUdDF6Pe3OZuUEn2/xYwkdsmRb54472R+kn2d0MRRwi3QTSEcRq+tcTJfA0m2V OwyA== 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 o13si25985430pgu.156.2021.10.04.12.16.52; Mon, 04 Oct 2021 12:17:07 -0700 (PDT) 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 S236966AbhJDTJX (ORCPT + 99 others); Mon, 4 Oct 2021 15:09:23 -0400 Received: from mail-ed1-f41.google.com ([209.85.208.41]:47099 "EHLO mail-ed1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233226AbhJDTJW (ORCPT ); Mon, 4 Oct 2021 15:09:22 -0400 Received: by mail-ed1-f41.google.com with SMTP id z20so17399374edc.13; Mon, 04 Oct 2021 12:07:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=eS3yIdA30SJ4zKaXnysEXsznetD3b0GwKKFLH0KJiIA=; b=qW720hianUSEljN35lHZPyx5UZ6QQBSl/h5A09CudW45pliqK/1dsVro0HOM75rgpU bFTgeg5Rn6UWfBA7RzSHjgiNKm3OsnNHDUggURTnlo8W53inWFeeHfQz6n2f/Mmf/arQ daVcLdRQW+lr9MHuPlq5GuKTHudjnRQT4iG47rnKtIxzae7uitHdknCReIU6yPFTFOZe 8KZObdd08jQquS0kf384Nw5LfirIIkwI69U9BtKSr/vABlvg7yvRZDSiqYXHwDu+LB+A dNbbYXyubS0aA1gO2QRDCCCTEbX/kKF+ML6IEznx+85/WZ2GzPv80qtOG5RCmFsMQf1g YcZQ== X-Gm-Message-State: AOAM533XViy7fVBsQqIbJUULGAhD2/FMXAvPlGJ9FlXNz1LXWi06Kyql rzcZqdsrJ8YQUWotF2jNzVM= X-Received: by 2002:a05:6402:4309:: with SMTP id m9mr5264219edc.272.1633374452230; Mon, 04 Oct 2021 12:07:32 -0700 (PDT) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id i6sm6740885ejd.57.2021.10.04.12.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 12:07:31 -0700 (PDT) Date: Mon, 4 Oct 2021 21:07:30 +0200 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Max Gurtovoy Cc: Bjorn Helgaas , gregkh@linuxfoundation.org, hch@infradead.org, stefanha@redhat.com, oren@nvidia.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] PCI/sysfs: use NUMA_NO_NODE macro Message-ID: References: <20211003091344.718-1-mgurtovoy@nvidia.com> <20211003091344.718-2-mgurtovoy@nvidia.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 Hi Max, [...] > > #ifdef CONFIG_NUMA > > - mask = (dev_to_node(dev) == -1) ? cpu_online_mask : > > - cpumask_of_node(dev_to_node(dev)); > > + mask = (dev_to_node(dev) == NUMA_NO_NODE) ? cpu_online_mask : > > + cpumask_of_node(dev_to_node(dev)); > > Oh this somewhat awkward indentation we have with this ternary now, > and so I wonder if either: > > mask = (dev_to_node(dev) == NUMA_NO_NODE) ? > cpu_online_mask : cpumask_of_node(dev_to_node(dev)); > > Or, perhaps (yes, a few more lines): > > if (dev_to_node(dev) == NUMA_NO_NODE) > mask = cpu_online_mask; > else > mask = cpumask_of_node(node); Doh! I should be cpumask_of_node(dev_to_node(dev)) in the above, of course. Apologies! Albeit, v3 you sent looks great! Thank you! Krzysztof