Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1264598lqt; Fri, 7 Jun 2024 12:48:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXT1gm1sUsQDHnHlSKMUZrCtQRzyDI5Z5wCT4AaHoT78j156SqHUq1+pqFADcomMcBTjbUyZWkZMIeJbHqbX6MLcrXxT62EfJzjrZwzjQ== X-Google-Smtp-Source: AGHT+IGAXYdygRJUrYoqQ1q3jGCG+AXvlC7gQnNs/QaZG9RTWeggp60Tkp4iZm/9KkrGTGhubCd2 X-Received: by 2002:a17:902:ced1:b0:1f6:ef5a:7740 with SMTP id d9443c01a7336-1f6ef5a7820mr4243535ad.34.1717789691835; Fri, 07 Jun 2024 12:48:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717789691; cv=pass; d=google.com; s=arc-20160816; b=y3u17nHzOiakkevZi7vOmKfmeODqgr2kUbMAuReQFq+d81h5TaNrUjXrmtyAl/9cI7 Li3m1kEo1+d5UYFO8oSY/s6dEKdXhbG6yymf21sO810ro1OwcJVK6tsscfiML8iZ1EyZ KE9c8iZ6VIW/P3YNY5oqO/DNs2NN3zilCfkhYEXbw+g30RAyz2dOZZELEDqvLGJvQwQ/ opqmD5g0s0jqiPXoMGqbCC3lta1UkkKxnxtOBMD3sY7OR+qUtuuYvdFLZ7ZcGI5i3RtW +W0miiujlBdIIUcR8bqsOrnqJzArGq1qKlTp8SCkVfhUN4KS46/hnyls8IRUerSeKBc/ D8SQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=3Jc6UNZcqwREvU+MXue0cpXH4oRErwNcj+sBAhGfg5A=; fh=lvqL1xSxMbR9JCL/sj7M6iCWtcRDNumURRKqvQuuWJU=; b=IWf9kabJOfnGqxrxW4uCs3R6f0v3zy6agf3PyW/EX2zw8mbVjcXpiZV8D5TFDo6kWy TpO3YlbQSBu2t2DrCiNnOhTnQDeH9Uc0g/cM4VURhXCGRTp81gIS77tfxrSoDwnLC3RE W2bMhBc6/iBlX7E8561SJ2yWR0kekSsvnb6WXfV5XiiLHuEAsoiWBmSaWb10/EkSBXcj epF+JOI039o/UrGh5hi+cFscuZzGZqOZDB7BG27tLzZ4eAJxVvDHqNqL2FnSUt+Y0FS+ 19pPIjrlZt6Gt2Le9J1pbZigbFrswa+HMbURkyeBnQ6QC1x2RMk5sVNcFX04kb/QemDd gkfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WXupJrvx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd75f88asi1193625ad.112.2024.06.07.12.48.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 12:48:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WXupJrvx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8873CB23D26 for ; Fri, 7 Jun 2024 19:48:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2414B14EC5B; Fri, 7 Jun 2024 19:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WXupJrvx" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FAC01CAB5; Fri, 7 Jun 2024 19:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717789665; cv=none; b=f5L5QWS5baqPRi/C9MUF4F+0w8WvktxL99V0SqwryXF2VRUZ6oXnNB4otsqgp8FPzU67JjNvhbQRjWWEhgGhTQKHDaD4W2F9rqMD+re+al6WwBz3b4SofOH/BSyRWOLR9G48c0GcqwgValf0lZ56nmAw0RXjzZmP01tHzqUwFbk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717789665; c=relaxed/simple; bh=NTZmlXTtPqo/64yJt8pRksmMIHacjeI8YFNmvRh9tBg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=X70pssvsfKA3CAAL/RIwv0pJsTG1PBD2WNh6PaNVcf0oyJouo0VgsIZdc9iDkpWIJj2kYio1YdqCBBlYl5Uwq3DfK0SgncwcvFPhrAnGP/D6vyLsIuHNEAZcBQ4yqhPx7xw0nA9S5KrGDBSP9owvqnobrn/ubGcx82Q9dz0OQbM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WXupJrvx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F5CFC2BBFC; Fri, 7 Jun 2024 19:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717789664; bh=NTZmlXTtPqo/64yJt8pRksmMIHacjeI8YFNmvRh9tBg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=WXupJrvxbx3FZTRQhsGfqh/xmfTxBf9mrGx8YB/ibh3OmXe1PmwVh6KKbV/8LV3X/ S92NJ0dyXi8YRevQjpWcXy7hLSx0yltvssvX6qeZA0B/3gWbuLOe6080OUEYw5oKi/ oiIL//yla/akXVLbI34EQjy9XOHxOmE1OyjqVithNTbv7ddlCVwDM0YIvhz4azB6iw qC+WBjz8Sb7iKhK4FGCxWNkK2bpRqwX8oUTMFu14wOCmcPQu5expC9D/B3+l9QtIaG SfdNc8y1GY06leQEuK4et0skSVtbWHpKgXj454CvuxG0itWz3bq7FZMxLr0tIyXvmW UJDMRsBx+OCng== Date: Fri, 7 Jun 2024 14:47:42 -0500 From: Bjorn Helgaas To: Masahiro Yamada Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Alex Shi , Greg Kroah-Hartman , Jonathan Corbet , Pawel Laszczak , Yanteng Si , linux-doc@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH] PCI: use array for .id_table consistently Message-ID: <20240607194742.GA857985@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240517120458.1260489-1-masahiroy@kernel.org> On Fri, May 17, 2024 at 09:04:58PM +0900, Masahiro Yamada wrote: > While 'x' and '&x[0]' are equivalent, most of the PCI drivers use the > former form for the .id_table. > > Update some drivers and documentation for consistency. > > Signed-off-by: Masahiro Yamada Applied to pci/misc for v6.11, thanks! USB folks, let me know if you'd rather that I drop your parts. > --- > > Documentation/PCI/pciebus-howto.rst | 2 +- > Documentation/translations/zh_CN/PCI/pciebus-howto.rst | 2 +- > drivers/pci/pcie/portdrv.c | 2 +- > drivers/usb/cdns3/cdnsp-pci.c | 2 +- > drivers/usb/gadget/udc/cdns2/cdns2-pci.c | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/Documentation/PCI/pciebus-howto.rst b/Documentation/PCI/pciebus-howto.rst > index a0027e8fb0d0..f344452651e1 100644 > --- a/Documentation/PCI/pciebus-howto.rst > +++ b/Documentation/PCI/pciebus-howto.rst > @@ -139,7 +139,7 @@ driver data structure. > > static struct pcie_port_service_driver root_aerdrv = { > .name = (char *)device_name, > - .id_table = &service_id[0], > + .id_table = service_id, > > .probe = aerdrv_load, > .remove = aerdrv_unload, > diff --git a/Documentation/translations/zh_CN/PCI/pciebus-howto.rst b/Documentation/translations/zh_CN/PCI/pciebus-howto.rst > index 65c4301f12cd..c6ffda62af21 100644 > --- a/Documentation/translations/zh_CN/PCI/pciebus-howto.rst > +++ b/Documentation/translations/zh_CN/PCI/pciebus-howto.rst > @@ -124,7 +124,7 @@ pcie_port_service_unregister取代了Linux驱动模型的pci_unregister_driver > > static struct pcie_port_service_driver root_aerdrv = { > .name = (char *)device_name, > - .id_table = &service_id[0], > + .id_table = service_id, > > .probe = aerdrv_load, > .remove = aerdrv_unload, > diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c > index 14a4b89a3b83..2faca06ff67c 100644 > --- a/drivers/pci/pcie/portdrv.c > +++ b/drivers/pci/pcie/portdrv.c > @@ -786,7 +786,7 @@ static const struct pci_error_handlers pcie_portdrv_err_handler = { > > static struct pci_driver pcie_portdriver = { > .name = "pcieport", > - .id_table = &port_pci_ids[0], > + .id_table = port_pci_ids, > > .probe = pcie_portdrv_probe, > .remove = pcie_portdrv_remove, > diff --git a/drivers/usb/cdns3/cdnsp-pci.c b/drivers/usb/cdns3/cdnsp-pci.c > index 0725668ffea4..225540fc81ba 100644 > --- a/drivers/usb/cdns3/cdnsp-pci.c > +++ b/drivers/usb/cdns3/cdnsp-pci.c > @@ -231,7 +231,7 @@ static const struct pci_device_id cdnsp_pci_ids[] = { > > static struct pci_driver cdnsp_pci_driver = { > .name = "cdnsp-pci", > - .id_table = &cdnsp_pci_ids[0], > + .id_table = cdnsp_pci_ids, > .probe = cdnsp_pci_probe, > .remove = cdnsp_pci_remove, > .driver = { > diff --git a/drivers/usb/gadget/udc/cdns2/cdns2-pci.c b/drivers/usb/gadget/udc/cdns2/cdns2-pci.c > index 1691541c9413..50c3d0974d9b 100644 > --- a/drivers/usb/gadget/udc/cdns2/cdns2-pci.c > +++ b/drivers/usb/gadget/udc/cdns2/cdns2-pci.c > @@ -121,7 +121,7 @@ static const struct pci_device_id cdns2_pci_ids[] = { > > static struct pci_driver cdns2_pci_driver = { > .name = "cdns2-pci", > - .id_table = &cdns2_pci_ids[0], > + .id_table = cdns2_pci_ids, > .probe = cdns2_pci_probe, > .remove = cdns2_pci_remove, > .driver = { > -- > 2.40.1 >