Patchwork [1/2] genirq/msi: Clean up usage of __u8/__u16 types

login
register
mail settings
Submitter Logan Gunthorpe
Date Feb. 8, 2019, 4:54 p.m.
Message ID <20190208165439.19503-1-logang@deltatee.com>
Download mbox | patch
Permalink /patch/721747/
State New
Headers show

Comments

Logan Gunthorpe - Feb. 8, 2019, 4:54 p.m.
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(-)
Bjorn Helgaas - Feb. 8, 2019, 7:44 p.m.
[+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
>

Patch

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 {