All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] genirq/msi: Clean up usage of __u8/__u16 types
@ 2019-02-08 16:54 Logan Gunthorpe
  2019-02-08 16:54 ` [PATCH 2/2] PCI: Clean up usage of __u32 type Logan Gunthorpe
  2019-02-08 19:44 ` [PATCH 1/2] genirq/msi: Clean up usage of __u8/__u16 types Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Logan Gunthorpe @ 2019-02-08 16:54 UTC (permalink / raw)
  To: linux-kernel, linux-pci, Bjorn Helgaas; +Cc: Logan Gunthorpe, Bjorn Helgaas

The double underscore types are meant for compatibility in userspace
headers which does not apply here. Therefore, change to use the
standard no-underscore types.

The origin of the double underscore types dates back to before the
git era so I was not able to find a commit to see the original
justification.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>
---
 include/linux/msi.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/msi.h b/include/linux/msi.h
index 784fb52b9900..7e9b81c3b50d 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -83,12 +83,12 @@ struct msi_desc {
 		struct {
 			u32 masked;
 			struct {
-				__u8	is_msix		: 1;
-				__u8	multiple	: 3;
-				__u8	multi_cap	: 3;
-				__u8	maskbit		: 1;
-				__u8	is_64		: 1;
-				__u16	entry_nr;
+				u8	is_msix		: 1;
+				u8	multiple	: 3;
+				u8	multi_cap	: 3;
+				u8	maskbit		: 1;
+				u8	is_64		: 1;
+				u16	entry_nr;
 				unsigned default_irq;
 			} msi_attrib;
 			union {
-- 
2.19.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] PCI: Clean up usage of __u32 type
  2019-02-08 16:54 [PATCH 1/2] genirq/msi: Clean up usage of __u8/__u16 types Logan Gunthorpe
@ 2019-02-08 16:54 ` Logan Gunthorpe
  2019-02-08 19:44 ` [PATCH 1/2] genirq/msi: Clean up usage of __u8/__u16 types Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Logan Gunthorpe @ 2019-02-08 16:54 UTC (permalink / raw)
  To: linux-kernel, linux-pci, Bjorn Helgaas; +Cc: Logan Gunthorpe, Bjorn Helgaas

The double underscore types are meant for compatibility in userspace
headers which does not apply here. Therefore, change to use the
standard no-underscore types.

The origin of the double underscore types dates back to before the
git era so I was not able to find a commit to see the original
justification.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>
---
 drivers/pci/pci-driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 79b1610a8beb..71853befd435 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -100,7 +100,7 @@ static ssize_t new_id_store(struct device_driver *driver, const char *buf,
 {
 	struct pci_driver *pdrv = to_pci_driver(driver);
 	const struct pci_device_id *ids = pdrv->id_table;
-	__u32 vendor, device, subvendor = PCI_ANY_ID,
+	u32 vendor, device, subvendor = PCI_ANY_ID,
 		subdevice = PCI_ANY_ID, class = 0, class_mask = 0;
 	unsigned long driver_data = 0;
 	int fields = 0;
@@ -168,7 +168,7 @@ static ssize_t remove_id_store(struct device_driver *driver, const char *buf,
 {
 	struct pci_dynid *dynid, *n;
 	struct pci_driver *pdrv = to_pci_driver(driver);
-	__u32 vendor, device, subvendor = PCI_ANY_ID,
+	u32 vendor, device, subvendor = PCI_ANY_ID,
 		subdevice = PCI_ANY_ID, class = 0, class_mask = 0;
 	int fields = 0;
 	size_t retval = -ENODEV;
-- 
2.19.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] genirq/msi: Clean up usage of __u8/__u16 types
  2019-02-08 16:54 [PATCH 1/2] genirq/msi: Clean up usage of __u8/__u16 types Logan Gunthorpe
  2019-02-08 16:54 ` [PATCH 2/2] PCI: Clean up usage of __u32 type Logan Gunthorpe
@ 2019-02-08 19:44 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2019-02-08 19:44 UTC (permalink / raw)
  To: Logan Gunthorpe; +Cc: linux-kernel, linux-pci, Marc Zyngier, Thomas Gleixner

[+cc Marc, Thomas]

On Fri, Feb 08, 2019 at 09:54:38AM -0700, Logan Gunthorpe wrote:
> The double underscore types are meant for compatibility in userspace
> headers which does not apply here. Therefore, change to use the
> standard no-underscore types.
> 
> The origin of the double underscore types dates back to before the
> git era so I was not able to find a commit to see the original
> justification.
> 
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> Cc: Bjorn Helgaas <helgaas@kernel.org>

I applied both of these:

  PCI: Clean up usage of __u32 type
  genirq/msi: Clean up usage of __u8/__u16 types

to pci/misc for v5.1, thanks!

> ---
>  include/linux/msi.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/msi.h b/include/linux/msi.h
> index 784fb52b9900..7e9b81c3b50d 100644
> --- a/include/linux/msi.h
> +++ b/include/linux/msi.h
> @@ -83,12 +83,12 @@ struct msi_desc {
>  		struct {
>  			u32 masked;
>  			struct {
> -				__u8	is_msix		: 1;
> -				__u8	multiple	: 3;
> -				__u8	multi_cap	: 3;
> -				__u8	maskbit		: 1;
> -				__u8	is_64		: 1;
> -				__u16	entry_nr;
> +				u8	is_msix		: 1;
> +				u8	multiple	: 3;
> +				u8	multi_cap	: 3;
> +				u8	maskbit		: 1;
> +				u8	is_64		: 1;
> +				u16	entry_nr;
>  				unsigned default_irq;
>  			} msi_attrib;
>  			union {
> -- 
> 2.19.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-08 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-08 16:54 [PATCH 1/2] genirq/msi: Clean up usage of __u8/__u16 types Logan Gunthorpe
2019-02-08 16:54 ` [PATCH 2/2] PCI: Clean up usage of __u32 type Logan Gunthorpe
2019-02-08 19:44 ` [PATCH 1/2] genirq/msi: Clean up usage of __u8/__u16 types Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.