* + include-linux-propertyh-fix-build-issues-with-gcc-444.patch added to -mm tree
@ 2015-12-11 0:54 akpm
[not found] ` <1449830574.30729.106.camel@linux.intel.com>
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2015-12-11 0:54 UTC (permalink / raw)
To: akpm, andriy.shevchenko, heikki.krogerus, kevin, mika.westerberg,
rafael.j.wysocki, mm-commits
The patch titled
Subject: include/linux/property.h: fix build issues with gcc-4.4.4
has been added to the -mm tree. Its filename is
include-linux-propertyh-fix-build-issues-with-gcc-444.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/include-linux-propertyh-fix-build-issues-with-gcc-444.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/include-linux-propertyh-fix-build-issues-with-gcc-444.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: include/linux/property.h: fix build issues with gcc-4.4.4
gcc-4.4.4 has problems with initialization of anonymous unions:
drivers/mfd/intel-lpss-acpi.c:30: error: unknown field 'value' specified in initializer
work around this by crafting the initializers in a manner which the
compiler can handle.
Cc: Kevin Fenzi <kevin@scrye.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/property.h | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff -puN include/linux/property.h~include-linux-propertyh-fix-build-issues-with-gcc-444 include/linux/property.h
--- a/include/linux/property.h~include-linux-propertyh-fix-build-issues-with-gcc-444
+++ a/include/linux/property.h
@@ -175,12 +175,19 @@ struct property_entry {
};
};
+/*
+ * Note: the below four initializers for the anonymous union are carefully
+ * crafted to avoid gcc-4.4.4's problems with initialization of anon unions
+ * and structs.
+ */
+
#define PROPERTY_ENTRY_INTEGER_ARRAY(_name_, _type_, _val_) \
{ \
.name = _name_, \
.length = ARRAY_SIZE(_val_) * sizeof(_type_), \
.is_array = true, \
- .pointer._type_##_data = _val_, \
+ .is_string = false, \
+ { .pointer = _type_##_data = _val_ } }, \
}
#define PROPERTY_ENTRY_U8_ARRAY(_name_, _val_) \
@@ -198,14 +205,15 @@ struct property_entry {
.length = ARRAY_SIZE(_val_) * sizeof(const char *), \
.is_array = true, \
.is_string = true, \
- .pointer.str = _val_, \
+ { .pointer = { .str = _val_ } }, \
}
#define PROPERTY_ENTRY_INTEGER(_name_, _type_, _val_) \
{ \
.name = _name_, \
.length = sizeof(_type_), \
- .value._type_##_data = _val_, \
+ .is_string = false, \
+ { .value = { ._type_##_data = _val_ } }, \
}
#define PROPERTY_ENTRY_U8(_name_, _val_) \
@@ -222,7 +230,7 @@ struct property_entry {
.name = _name_, \
.length = sizeof(_val_), \
.is_string = true, \
- .value.str = _val_, \
+ { .value = {.str = _val_} }, \
}
#define PROPERTY_ENTRY_BOOL(_name_) \
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
arch-alpha-kernel-systblss-remove-debug-check.patch
drivers-gpu-drm-i915-intel_spritec-fix-build.patch
drivers-gpu-drm-i915-intel_tvc-fix-build.patch
oom-kill-init-lead-panic-fix.patch
ocfs2-fix-ip_unaligned_aio-deadlock-with-dio-work-queue-fix.patch
include-linux-dcacheh-remove-semicolons-from-hash_len_declare.patch
mm.patch
account-certain-kmem-allocations-to-memcg-checkpatch-fixes.patch
mm-mmapc-remove-redundant-local-variables-for-may_expand_vm-fix.patch
include-define-__phys_to_pfn-as-phys_pfn-fix.patch
mempolicy-convert-the-shared_policy-lock-to-a-rwlock-fix.patch
mempolicy-convert-the-shared_policy-lock-to-a-rwlock-fix-2.patch
mm-zonelist-enumerate-zonelists-array-index-checkpatch-fixes.patch
mm-zonelist-enumerate-zonelists-array-index-fix.patch
mm-get-rid-of-__alloc_pages_high_priority-checkpatch-fixes.patch
fs-block_devc-bdev_write_page-use-blk_queue_enter-gfp_noio.patch
arm64-mm-support-arch_mmap_rnd_bits-fix.patch
ksm-introduce-ksm_max_page_sharing-per-page-deduplication-limit-fix.patch
page-flags-define-pg_locked-behavior-on-compound-pages-fix.patch
mm-rework-mapcount-accounting-to-enable-4k-mapping-of-thps-fix.patch
mm-hwpoison-adjust-for-new-thp-refcounting-fix.patch
mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting-checkpatch-fixes.patch
mm-printk-introduce-new-format-string-for-flags-fix-2.patch
mm-support-madvisemadv_free-fix-2-fix.patch
arch-uapi-asm-mmanh-let-madv_free-have-same-value-for-all-architectures-fix.patch
arch-uapi-asm-mmanh-let-madv_free-have-same-value-for-all-architectures-fix-fix-2.patch
arch-uapi-asm-mmanh-let-madv_free-have-same-value-for-all-architectures-fix-fix-2-fix-3.patch
lib-vsprintfc-expand-field_width-to-24-bits-fix.patch
lib-test_printfc-test-dentry-printing-fix.patch
printk-help-pr_debug-and-pr_devel-to-optimize-out-arguments-fix.patch
printk-nmi-warn-when-some-message-has-been-lost-in-nmi-context-fix.patch
ptrace-task_stopped_codeptrace-=-true-cant-see-task_stopped-task-fix.patch
ptrace-use-fsuid-fsgid-effective-creds-for-fs-access-checks-fix.patch
ubsan-run-time-undefined-behavior-sanity-checker-fix.patch
ubsan-run-time-undefined-behavior-sanity-checker-fix-3.patch
linux-next-rejects.patch
include-linux-propertyh-fix-build-issues-with-gcc-444.patch
include-linux-propertyh-fix-build-with-gcc-444.patch
fs-adfs-adfsh-tidy-up-comments.patch
do_shared_fault-check-that-mmap_sem-is-held.patch
kernel-forkc-export-kernel_thread-to-modules.patch
slab-leaks3-default-y.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: + include-linux-propertyh-fix-build-issues-with-gcc-444.patch added to -mm tree
[not found] ` <1449830574.30729.106.camel@linux.intel.com>
@ 2015-12-11 17:58 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2015-12-11 17:58 UTC (permalink / raw)
To: Andy Shevchenko
Cc: heikki.krogerus, kevin, mika.westerberg, rafael.j.wysocki,
mm-commits
On Fri, 11 Dec 2015 12:42:54 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > __#define PROPERTY_ENTRY_INTEGER_ARRAY(_name_, _type_, _val_) \
> > __{ \
> > __ .name = _name_,
> > \
> > __ .length = ARRAY_SIZE(_val_) * sizeof(_type_),
> > \
> > __ .is_array = true, \
> > - .pointer._type_##_data = _val_,
> > \
> > + .is_string = false, \
> > + { .pointer = _type_##_data = _val_ } },
>
> This line looks suspicious now. Shouldn't be
>
> { .pointer = { ._type_##_data = _val_ } },
yup, thanks. Stupid macros.
It tooks me ages to work out this workaround. The secret is to have
the immediately preceding field (is_string) explicitly menationed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-11 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 0:54 + include-linux-propertyh-fix-build-issues-with-gcc-444.patch added to -mm tree akpm
[not found] ` <1449830574.30729.106.camel@linux.intel.com>
2015-12-11 17:58 ` Andrew Morton
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.