2023-12-26 17:09:36

by Tanzir Hasan

[permalink] [raw]
Subject: [PATCH] android: removed asm-generic/errno-base.h

asm-generic/errno-base.h can be replaced by linux/errno.h and the file
will still build correctly. It is an asm-generic file which should be
avoided if possible.

Suggested-by: Al Viro <[email protected]>
Signed-off-by: Tanzir Hasan <[email protected]>
---
drivers/android/binderfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index 1224ab7aa070..d04ff6029480 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -29,7 +29,7 @@
#include <linux/uaccess.h>
#include <linux/user_namespace.h>
#include <linux/xarray.h>
-#include <uapi/asm-generic/errno-base.h>
+#include <linux/errno.h>
#include <uapi/linux/android/binder.h>
#include <uapi/linux/android/binderfs.h>


---
base-commit: 606d9c29e71fbf52fcfd3fcc3ad92e444c8e1d47
change-id: 20231218-binderfs-a758e162e0ba

Best regards,
--
Tanzir Hasan <[email protected]>



2024-01-04 15:10:01

by Carlos Llamas

[permalink] [raw]
Subject: Re: [PATCH] android: removed asm-generic/errno-base.h

On Tue, Dec 26, 2023 at 05:09:23PM +0000, Tanzir Hasan wrote:
> asm-generic/errno-base.h can be replaced by linux/errno.h and the file
> will still build correctly. It is an asm-generic file which should be
> avoided if possible.
>
> Suggested-by: Al Viro <[email protected]>
> Signed-off-by: Tanzir Hasan <[email protected]>
> ---
> drivers/android/binderfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
> index 1224ab7aa070..d04ff6029480 100644
> --- a/drivers/android/binderfs.c
> +++ b/drivers/android/binderfs.c
> @@ -29,7 +29,7 @@
> #include <linux/uaccess.h>
> #include <linux/user_namespace.h>
> #include <linux/xarray.h>
> -#include <uapi/asm-generic/errno-base.h>
> +#include <linux/errno.h>
> #include <uapi/linux/android/binder.h>
> #include <uapi/linux/android/binderfs.h>
>
>
> ---
> base-commit: 606d9c29e71fbf52fcfd3fcc3ad92e444c8e1d47
> change-id: 20231218-binderfs-a758e162e0ba
>
> Best regards,
> --
> Tanzir Hasan <[email protected]>


Acked-by: Carlos Llamas <[email protected]>

Thanks,
--
Carlos Llamas

2024-01-04 15:36:15

by Christophe JAILLET

[permalink] [raw]
Subject: Re: [PATCH] android: removed asm-generic/errno-base.h

Le 26/12/2023 à 18:09, Tanzir Hasan a écrit :
> asm-generic/errno-base.h can be replaced by linux/errno.h and the file
> will still build correctly. It is an asm-generic file which should be
> avoided if possible.
>
> Suggested-by: Al Viro <[email protected]>
> Signed-off-by: Tanzir Hasan <[email protected]>
> ---
> drivers/android/binderfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
> index 1224ab7aa070..d04ff6029480 100644
> --- a/drivers/android/binderfs.c
> +++ b/drivers/android/binderfs.c
> @@ -29,7 +29,7 @@
> #include <linux/uaccess.h>
> #include <linux/user_namespace.h>
> #include <linux/xarray.h>
> -#include <uapi/asm-generic/errno-base.h>
> +#include <linux/errno.h>

linux/errno.h is already included a few lines above.

CJ

> #include <uapi/linux/android/binder.h>
> #include <uapi/linux/android/binderfs.h>
>
>
> ---
> base-commit: 606d9c29e71fbf52fcfd3fcc3ad92e444c8e1d47
> change-id: 20231218-binderfs-a758e162e0ba
>
> Best regards,


2024-01-04 16:09:02

by Joel Fernandes

[permalink] [raw]
Subject: Re: [PATCH] android: removed asm-generic/errno-base.h



On 1/4/2024 10:36 AM, Christophe JAILLET wrote:
> Le 26/12/2023 à 18:09, Tanzir Hasan a écrit :
>> asm-generic/errno-base.h can be replaced by linux/errno.h and the file
>> will still build correctly. It is an asm-generic file which should be
>> avoided if possible.
>>
>> Suggested-by: Al Viro <[email protected]>
>> Signed-off-by: Tanzir Hasan <[email protected]>
>> ---
>>   drivers/android/binderfs.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
>> index 1224ab7aa070..d04ff6029480 100644
>> --- a/drivers/android/binderfs.c
>> +++ b/drivers/android/binderfs.c
>> @@ -29,7 +29,7 @@
>>   #include <linux/uaccess.h>
>>   #include <linux/user_namespace.h>
>>   #include <linux/xarray.h>
>> -#include <uapi/asm-generic/errno-base.h>
>> +#include <linux/errno.h>
>
> linux/errno.h is already included a few lines above.
>

Good point! With that nit addressed:
Reviewed-by: Joel Fernandes (Google) <[email protected]>

Thanks.


2024-01-04 17:24:04

by Carlos Llamas

[permalink] [raw]
Subject: Re: [PATCH] android: removed asm-generic/errno-base.h

On Thu, Jan 04, 2024 at 04:36:00PM +0100, Christophe JAILLET wrote:
> Le 26/12/2023 ? 18:09, Tanzir Hasan a ?crit?:
> > asm-generic/errno-base.h can be replaced by linux/errno.h and the file
> > will still build correctly. It is an asm-generic file which should be
> > avoided if possible.
> >
> > Suggested-by: Al Viro <[email protected]>
> > Signed-off-by: Tanzir Hasan <[email protected]>
> > ---
> > drivers/android/binderfs.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
> > index 1224ab7aa070..d04ff6029480 100644
> > --- a/drivers/android/binderfs.c
> > +++ b/drivers/android/binderfs.c
> > @@ -29,7 +29,7 @@
> > #include <linux/uaccess.h>
> > #include <linux/user_namespace.h>
> > #include <linux/xarray.h>
> > -#include <uapi/asm-generic/errno-base.h>
> > +#include <linux/errno.h>
>
> linux/errno.h is already included a few lines above.
>
> CJ
>

Good catch! Then we should just drop the errno-base.h include.

--
Carlos Llamas

2024-01-04 17:32:59

by Tanzir Hasan

[permalink] [raw]
Subject: Re: [PATCH] android: removed asm-generic/errno-base.h

On Thu, Jan 4, 2024 at 9:18 AM Carlos Llamas <[email protected]> wrote:
>
> On Thu, Jan 04, 2024 at 04:36:00PM +0100, Christophe JAILLET wrote:
> > Le 26/12/2023 à 18:09, Tanzir Hasan a écrit :
> > > asm-generic/errno-base.h can be replaced by linux/errno.h and the file
> > > will still build correctly. It is an asm-generic file which should be
> > > avoided if possible.
> > >
> > > Suggested-by: Al Viro <[email protected]>
> > > Signed-off-by: Tanzir Hasan <[email protected]>
> > > ---
> > > drivers/android/binderfs.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
> > > index 1224ab7aa070..d04ff6029480 100644
> > > --- a/drivers/android/binderfs.c
> > > +++ b/drivers/android/binderfs.c
> > > @@ -29,7 +29,7 @@
> > > #include <linux/uaccess.h>
> > > #include <linux/user_namespace.h>
> > > #include <linux/xarray.h>
> > > -#include <uapi/asm-generic/errno-base.h>
> > > +#include <linux/errno.h>
> >
> > linux/errno.h is already included a few lines above.
> >
> > CJ
> >
>
> Good catch! Then we should just drop the errno-base.h include.
>
> --
> Carlos Llamas

Thanks for bringing that up. I will correct it and just remove the
asm-generic header instead.

Best,
Tanzir

2024-01-04 18:17:07

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] android: removed asm-generic/errno-base.h

On Thu, Jan 04, 2024 at 09:32:37AM -0800, Tanzir Hasan wrote:
> On Thu, Jan 4, 2024 at 9:18 AM Carlos Llamas <[email protected]> wrote:
> >
> > On Thu, Jan 04, 2024 at 04:36:00PM +0100, Christophe JAILLET wrote:
> > > Le 26/12/2023 à 18:09, Tanzir Hasan a écrit :
> > > > asm-generic/errno-base.h can be replaced by linux/errno.h and the file
> > > > will still build correctly. It is an asm-generic file which should be
> > > > avoided if possible.
> > > >
> > > > Suggested-by: Al Viro <[email protected]>
> > > > Signed-off-by: Tanzir Hasan <[email protected]>
> > > > ---
> > > > drivers/android/binderfs.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
> > > > index 1224ab7aa070..d04ff6029480 100644
> > > > --- a/drivers/android/binderfs.c
> > > > +++ b/drivers/android/binderfs.c
> > > > @@ -29,7 +29,7 @@
> > > > #include <linux/uaccess.h>
> > > > #include <linux/user_namespace.h>
> > > > #include <linux/xarray.h>
> > > > -#include <uapi/asm-generic/errno-base.h>
> > > > +#include <linux/errno.h>
> > >
> > > linux/errno.h is already included a few lines above.
> > >
> > > CJ
> > >
> >
> > Good catch! Then we should just drop the errno-base.h include.
> >
> > --
> > Carlos Llamas
>
> Thanks for bringing that up. I will correct it and just remove the
> asm-generic header instead.

Please just send a patch removing the duplicate as I have already
applied this one.

thanks,

gre gk-h