2014-12-18 17:57:19

by Kyle McMartin

[permalink] [raw]
Subject: [PATCH] uapi/linux/target_core_user.h: fix headers_install.sh badness

scripts/headers_install.sh will transform __packed to
__attribute__((packed)), so the #ifndef is not necessary.
(and, in fact, it's problematic, because we'll end up with the header
containing:
#ifndef __attribute__((packed))
#define __attribu...
and so forth.)

Cc: [email protected] # 3.18
Signed-off-by: Kyle McMartin <[email protected]>

---
cc-ing stable@ so this headers fix gets picked up by distros.

--- a/include/uapi/linux/target_core_user.h
+++ b/include/uapi/linux/target_core_user.h
@@ -6,10 +6,6 @@
#include <linux/types.h>
#include <linux/uio.h>

-#ifndef __packed
-#define __packed __attribute__((packed))
-#endif
-
#define TCMU_VERSION "1.0"

/*


2014-12-18 18:02:28

by Andy Grover

[permalink] [raw]
Subject: Re: [PATCH] uapi/linux/target_core_user.h: fix headers_install.sh badness

On 12/18/2014 09:57 AM, Kyle McMartin wrote:
> scripts/headers_install.sh will transform __packed to
> __attribute__((packed)), so the #ifndef is not necessary.
> (and, in fact, it's problematic, because we'll end up with the header
> containing:
> #ifndef __attribute__((packed))
> #define __attribu...
> and so forth.)
>
> Cc: [email protected] # 3.18
> Signed-off-by: Kyle McMartin <[email protected]>
>
> ---
> cc-ing stable@ so this headers fix gets picked up by distros.

Acked-by: Andy Grover <[email protected]>

2014-12-19 01:20:02

by Nicholas A. Bellinger

[permalink] [raw]
Subject: Re: [PATCH] uapi/linux/target_core_user.h: fix headers_install.sh badness

Hi Kyle,

On Thu, 2014-12-18 at 12:57 -0500, Kyle McMartin wrote:
> scripts/headers_install.sh will transform __packed to
> __attribute__((packed)), so the #ifndef is not necessary.
> (and, in fact, it's problematic, because we'll end up with the header
> containing:
> #ifndef __attribute__((packed))
> #define __attribu...
> and so forth.)
>
> Cc: [email protected] # 3.18
> Signed-off-by: Kyle McMartin <[email protected]>
>
> ---
> cc-ing stable@ so this headers fix gets picked up by distros.
>
> --- a/include/uapi/linux/target_core_user.h
> +++ b/include/uapi/linux/target_core_user.h
> @@ -6,10 +6,6 @@
> #include <linux/types.h>
> #include <linux/uio.h>
>
> -#ifndef __packed
> -#define __packed __attribute__((packed))
> -#endif
> -
> #define TCMU_VERSION "1.0"
>
> /*

Applied to target-pending/for-next.

Thanks!

--nab