Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp395968rdg; Tue, 10 Oct 2023 13:38:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEirvPO+eIq1sFRHB9Xin3Mw+9vxqJut1YH16ZwHfWSfcOIIjw7q/dXoDnlWwN434b7l/Q X-Received: by 2002:a05:6a00:b84:b0:68e:2b17:a729 with SMTP id g4-20020a056a000b8400b0068e2b17a729mr20505965pfj.24.1696970312201; Tue, 10 Oct 2023 13:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696970312; cv=none; d=google.com; s=arc-20160816; b=UQ7+EYtfMYJwnfxiqQq8QhnMZwSScBWAxUR6W8jLqCSupCayorZqQilDyV66OXCpzo yuj/0Z6YxcZG4lUsbBM8CREvhvU/uSBWB16HBKgYgESf9aI/c4cGREtyV1BlR0RQEd5u s6r0PERv3Rm+A4ITSvKSFweSBRHsjaIRFRGlXeYsc5lfK99Z9n4cdXPoUFarsO4ly14O LbNNTx74GDJD3svSbgmxFHX1vhqb3YPc6Fx0AJXWDtwn6me3PUk+Tctqd4Efy+pzygY7 HWFNyWTUqQ1HVJq8dMPTn6+4NZBlifXfi8iz9N0FNDXP9YZ97ngAEyZT24ikP3sMuPNW Y2AA== 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:message-id:subject:cc:to:from:date :dkim-signature; bh=yejlf+E2XZ44CChzU1mb4tVOLUJpbT2z1zuWIKzU/3Q=; fh=CrQQyCKDDIAamyV/5LnEEpPmkV9HrM3gxyEcZ/KY/mg=; b=t3GoVinI441JF/O39cCJ9we3ZSI+BHImwB7JMNKmPu7aZPTXEIxpXEiCys3PQPngaO Ojb+HvpoIwxSz2JYp1ngN1M8Q3PDeq1txDfJPPzmrS1vP4gjuB2hvYgjA/WKrkpOVnZA ECtTxO+hE4Bb9SXEerL71lfZyvHGciszaN085uatqp9a0BNg7BG5f3NLGpyWwWFbKcEW +gNlYEzkAWCMc+C0HFGrbkUp2MQY7KrqOsmM9OGn0kvP0nqwhWaJOMzqMKk0KCEUzYvx wuNsH4/sQvjaNjG8XNwtJG970nxCYicW+69E78IrfpucHYryMpDVUFcKyHCQBB2H17O7 YxrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p9lcN0SA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id p65-20020a634244000000b00577ae8b603fsi12518828pga.314.2023.10.10.13.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 13:38:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p9lcN0SA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A7431807E452; Tue, 10 Oct 2023 13:38:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232096AbjJJUiT (ORCPT + 99 others); Tue, 10 Oct 2023 16:38:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbjJJUiR (ORCPT ); Tue, 10 Oct 2023 16:38:17 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4B6E8E; Tue, 10 Oct 2023 13:38:16 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AEFEC433C7; Tue, 10 Oct 2023 20:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696970296; bh=nYO8lXzg88/fnDY8vcHFgWOPAdak5gG9SWwFn4Txbwo=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=p9lcN0SAnQ4KZ0ai5ApKZxAdBKMnSWPI4ZbkWw/B2MU6ua/JpBj4aiBt6LINY9woA T4Dbpmn7Y+bL4rGRophFjdX6whYQx/xDGLcCPzfz+c4SaB08lNez/ycLrqnIjwqx1R L6tU5McFyFJO9noUXv+yPLhktCXjh1cVidABOk2tuSGuLJ4bgvsVgo6axLUopOQSOf WFk2xfdWqshNn8Eygtqp9VzphJhN/nEoL23zaSkRRI+UaoW8NJGZAup0pbv0//WXH0 mQF+bUmXWy+VGV742oP3g/v8Un66hBbNfsdnELv+viVlW2X6cnmBs9OGfemcCv22G0 4O8KMFHPLpUFg== Date: Tue, 10 Oct 2023 15:38:14 -0500 From: Bjorn Helgaas To: Ilpo =?utf-8?B?SsOkcnZpbmVu?= Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Jonathan Cameron , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/8] PCI/treewide: PCIe capability access cleanups Message-ID: <20231010203814.GA1000165@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230919125648.1920-1-ilpo.jarvinen@linux.intel.com> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 10 Oct 2023 13:38:29 -0700 (PDT) X-Spam-Level: ** On Tue, Sep 19, 2023 at 03:56:40PM +0300, Ilpo Järvinen wrote: > Instead of custom code to extract the PCIe capabilities, make the code > more obvious using FIELD_GET/PREP(). > > Also cleanup some duplicated defines in e1000e. > > This is just a step into the right direction, there's plenty of places > still to cleanup which will have to wait for another patch series. > > v3: > - Remove applied patches (scsi) > - Use pci_pcie_cap() and tweak local variable (e1000e) > - Use the correct prefix for RDMA/hfi1 > > v2: > - Remove extract_width() and use FIELD_GET() directly (IB/hfi1) > - Convert other fields beside Link Width ones > - Remove useless u8 casts (scsi: esas2r) > - e1000e: > - Remove defines that duplicate pci_regs.h ones > - Convert to pcie_capability_read_word() > > > Ilpo Järvinen (8): > RDMA/hfi1: Use FIELD_GET() to extract Link Width > media: cobalt: Use FIELD_GET() to extract Link Width > igb: Use FIELD_GET() to extract Link Width > PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields > PCI: mvebu: Use FIELD_PREP() with Link Width > PCI: Use FIELD_GET() to extract Link Width Applied these three drivers/pci patches to pci/field-get for v6.7, thanks! > e1000e: Use PCI_EXP_LNKSTA_NLW & FIELD_GET() instead of custom > defines/code > e1000e: Use pcie_capability_read_word() for reading LNKSTA > > drivers/infiniband/hw/hfi1/pcie.c | 9 ++------- > drivers/media/pci/cobalt/cobalt-driver.c | 11 ++++++----- > drivers/net/ethernet/intel/e1000e/defines.h | 3 --- > drivers/net/ethernet/intel/e1000e/mac.c | 18 ++++++++---------- > drivers/net/ethernet/intel/igb/e1000_mac.c | 6 +++--- > drivers/pci/controller/dwc/pcie-tegra194.c | 9 ++++----- > drivers/pci/controller/pci-mvebu.c | 2 +- > drivers/pci/pci-sysfs.c | 5 ++--- > drivers/pci/pci.c | 6 +++--- > 9 files changed, 29 insertions(+), 40 deletions(-) > > -- > 2.30.2 >