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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8601DC2D0E4 for ; Sun, 15 Nov 2020 05:53:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B24E22447 for ; Sun, 15 Nov 2020 05:53:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="u+niM+ok" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B24E22447 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VTHIghIuWx/nfKFpn8Z/jB9qQkQCCR1i+6aUiRNKgGc=; b=u+niM+okEUd84nUMrTNlrFLMR RARb8+oZLI01TuoxRHWXY7UvWj5W/9GbBo0MdrLzNO/q+DlbXhpf67cGWNpRQtMifa9wqHn+dHDgi 5FLHLmRchjpiqssMdLqTZAYaiCv/bXR57PU7/Szsry0/5OuMcuwKZJ6zr154lPfiQ1NKzglA2J1l8 Kc8ky1qIK7H0FS8JjUou7y8EDwPCzWoRq3XjwXpJPp3LjeCkoR8CJWb9+K9cPXZT9ap8VsZLxkZ0+ sWnGXvhDZwQXIsu2RC2ZSym8V2gnrXk0/Yqz+lP8a1oGYhiyU1sAQw5rBi6ckinrbX7V3s2GHbhp3 iF+E+Ky+w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keAwL-0001gm-4X; Sun, 15 Nov 2020 05:51:05 +0000 Received: from mail-wr1-f67.google.com ([209.85.221.67]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1keAwI-0001gL-Ns; Sun, 15 Nov 2020 05:51:03 +0000 Received: by mail-wr1-f67.google.com with SMTP id j7so14764075wrp.3; Sat, 14 Nov 2020 21:51:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0Ar1HS0TIigbtEbbtbsrbeVh6VW06RBSYq0BlrEFWlQ=; b=tQiRdIWLhHVLODypdtZTPb75JG0hdeABy06M/m0hGdeuZkvh26H3HFLA6IKBzOKx6a ZQnv1CmOYboJ/mfB63lQQo19nTK3RktKqOcLmSvmTR4CmfxL7kIFBKVWrGZl9W6wRvOZ 6eiHOZzHOPliq7pETODz5bh/q2P8ZvKSxdnPZkbBR80OiUdytqER6RZ7osIwUyXlu2ze MuKd6Qom06XTBWxOdms34QaANs5Otf1XDIgSyewRZoKoe+Fqb8o12BhwpLSoGC8NB6lR flK/r3Dif9PYmVdxdEHO7OszvVCC9/ZqKtsWMwcYxkgbhTqj5rdkjnJcKkxOEwZkWS94 xPdQ== X-Gm-Message-State: AOAM532VwZwxQVBzApEvAYOlKcYGqCiTZagSvlLwhpB/pPxlUQeFCxFM oTrIJ42w8hny6hTIYuP8WRU= X-Google-Smtp-Source: ABdhPJyyWlqOi881rwwar8nssPXB4LzlZhjcTUAVcp2Ix24BVuoPkzt7VIFoWPh+xOxI1NRrikiLUw== X-Received: by 2002:a05:6000:345:: with SMTP id e5mr12059182wre.333.1605419460016; Sat, 14 Nov 2020 21:51:00 -0800 (PST) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id g11sm17547121wrq.7.2020.11.14.21.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 21:50:59 -0800 (PST) Date: Sun, 15 Nov 2020 06:50:57 +0100 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Florian Fainelli Subject: Re: [PATCH v4] PCI: Unify ECAM constants in native PCI Express drivers Message-ID: References: <20201005003805.465057-1-kw@linux.com> <429099a8-5186-40c3-f5c0-f219b3e79f01@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <429099a8-5186-40c3-f5c0-f219b3e79f01@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201115_005102_795711_5516DF8F X-CRM114-Status: GOOD ( 15.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Benjamin Herrenschmidt , Shawn Lin , Paul Mackerras , Thomas Petazzoni , Jonathan Chocron , Toan Le , Will Deacon , Rob Herring , Lorenzo Pieralisi , Michael Ellerman , Michal Simek , linux-rockchip@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, Jonathan Derrick , linux-pci@vger.kernel.org, Ray Jui , linux-rpi-kernel@lists.infradead.org, Jonathan Cameron , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Scott Branden , Zhou Wang , Robert Richter , linuxppc-dev@lists.ozlabs.org, Nicolas Saenz Julienne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 20-10-04 19:53:06, Florian Fainelli wrote: Hi Florian, Sorry for taking a long time to get back to you. [...] > This appears to be correct, so: > > Acked-by: Florian Fainelli Thank you! > however, I would have defined a couple of additional helper macros and do: > > idx = PCIE_ECAM_BUS(bus->number) | PCIE_ECAM_DEV(devfn) | > PCIE_ECAM_FUN(devfn); > > for clarity. > [...] > For instance, adding these two: > > #define PCIE_ECAM_DEV(x) (((x) & 0x1f) << PCIE_ECAM_DEV_SHIFT) > #define PCIE_ECAM_FUN(x) (((x) & 0x7) << PCIE_ECAM_FUN_SHIFT) > > may be clearer for use in drivers like pcie-brcmstb.c that used to treat the > device function in terms of device and function (though it was called slot > there). Regarding the suggestion above - it has been like that initially, albeit Bjorn suggested that there is no need to reply on the macros that use PCI_SLOT() and PCI_FUNC() macros, see: https://lore.kernel.org/linux-pci/20200922232715.GA2238688@bjorn-Precision-5520/ I would be happy to put the macros back if there is a value in having the extra macros added - perhaps for clarify, as you suggest. Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel