From 02c8f54ff799ab4289677e0c584554b4d8a28917 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Wed, 15 Apr 2015 11:24:35 +0100 Subject: [PATCH 1/6] drm/cma: Fix printk formats in drm_gem_cma_describe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following warnings when building for arm64... drivers/gpu/drm/drm_gem_cma_helper.c: In function ‘drm_gem_cma_descr ibe’: drivers/gpu/drm/drm_gem_cma_helper.c:273:4: warning: format ‘%Zx’ expects argument of type ‘size_t’, but argument 6 has type ‘dma_addr_t’ [-Wformat=] off, cma_obj->paddr, cma_obj->vaddr, obj->size); ^ drivers/gpu/drm/drm_gem_cma_helper.c:273:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘size_t’ [-Wformat=] Signed-off-by: Jon Medhurst --- drivers/gpu/drm/drm_gem_cma_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c index 0a7e011509bd..c25b7a0eb0e3 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -262,9 +262,9 @@ void drm_gem_cma_describe(struct drm_gem_cma_object *cma_obj, struct seq_file *m if (obj->map_list.map) off = (uint64_t)obj->map_list.hash.key; - seq_printf(m, "%2d (%2d) %08llx %08Zx %p %d", + seq_printf(m, "%2d (%2d) %08llx %pad %p %zd", obj->name, obj->refcount.refcount.counter, - off, cma_obj->paddr, cma_obj->vaddr, obj->size); + off, &cma_obj->paddr, cma_obj->vaddr, obj->size); seq_printf(m, "\n"); } From b7a1b22726f0618b4e7adcdb12266ed898a550c9 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Wed, 15 Apr 2015 11:24:36 +0100 Subject: [PATCH 2/6] =?UTF-8?q?netfilter:=20nfnetlink=5Fqueue:=20Fix=20"di?= =?UTF-8?q?scards=20=E2=80=98const=E2=80=99=20qualifier"=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nfqnl_zcopy can now modify the 'from' sk_buff, so drop the const qualifier and fix build warnings like: net/netfilter/nfnetlink_queue_core.c: In function ‘nfqnl_zcopy’: net/netfilter/nfnetlink_queue_core.c:264:15: warning: passing argument 1 of ‘skb_orphan_frags’ discards ‘const’ qualifier from pointer target type if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) { Fixes: c5f0c0e75254 ("core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors") Signed-off-by: Jon Medhurst --- net/netfilter/nfnetlink_queue_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c index 2b8199f68785..5497f50af2f0 100644 --- a/net/netfilter/nfnetlink_queue_core.c +++ b/net/netfilter/nfnetlink_queue_core.c @@ -228,7 +228,7 @@ nfqnl_flush(struct nfqnl_instance *queue, nfqnl_cmpfn cmpfn, unsigned long data) } static int -nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen) +nfqnl_zcopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen) { int i, j = 0; int plen = 0; /* length of skb->head fragment */ From 1e8ac3b467f02f239d18135a91a67a00d971242b Mon Sep 17 00:00:00 2001 From: Tim Gardner Date: Wed, 15 Apr 2015 11:24:37 +0100 Subject: [PATCH 3/6] scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized In file included from scripts/sortextable.c:194:0: scripts/sortextable.c: In function `main': scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized] memset(relocs, 0, relocs_size); ^ scripts/sortextable.h:106:6: note: `relocs_size' was declared here int relocs_size; ^ In file included from scripts/sortextable.c:192:0: scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized] memset(relocs, 0, relocs_size); ^ scripts/sortextable.h:106:6: note: `relocs_size' was declared here int relocs_size; ^ gcc 4.9.1 Signed-off-by: Tim Gardner Reviewed-by: Jamie Iles Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds (cherry picked from commit 7cbc0ea79da2cbe70d8da9319895f07f872a3190) Signed-off-by: Jon Medhurst --- scripts/sortextable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sortextable.h b/scripts/sortextable.h index f5eb43d42926..3f064799a8c3 100644 --- a/scripts/sortextable.h +++ b/scripts/sortextable.h @@ -101,7 +101,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort) Elf_Sym *sort_needed_sym; Elf_Shdr *sort_needed_sec; Elf_Rel *relocs = NULL; - int relocs_size; + int relocs_size = 0; uint32_t *sort_done_location; const char *secstrtab; const char *strtab; From b04591efd29ae924814d0559476ac421db86d9dd Mon Sep 17 00:00:00 2001 From: Martin Walch Date: Wed, 15 Apr 2015 11:24:38 +0100 Subject: [PATCH 4/6] kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len The struct gstr has a capacity that may differ from the actual string length. However, a string manipulation in the function search_conf made the assumption that it is the same, which led to messing up some search results, especially when the content of the gstr in use had not yet reached at least 63 chars. Signed-off-by: Martin Walch Acked-by: Wang YanQing Acked-by: Benjamin Poirier Reviewed-by: "Yann E. MORIN" Signed-off-by: "Yann E. MORIN" (cherry picked from commit 503c823048e81cc85c0e9d8c297cc70203e335e5) Signed-off-by: Jon Medhurst --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index fd3f0180e08f..24ad40942586 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -564,7 +564,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, for (j = 4; --i >= 0; j += 2) { menu = submenu[i]; if (head && location && menu == location) - jump->offset = r->len - 1; + jump->offset = strlen(r->s); str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); if (menu->sym) { From ef684a4f49f387885ee22ae93ff6b3e1fa2b41b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Wed, 15 Apr 2015 11:24:39 +0100 Subject: [PATCH 5/6] =?UTF-8?q?kconfig:=20Fix=20warning=20"=E2=80=98jump?= =?UTF-8?q?=E2=80=99=20may=20be=20used=20uninitialized"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Warning: In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c: In function ‘get_symbol_str’: scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] jump->offset = strlen(r->s); Simplifies the test logic because (head && local) means (jump != 0) and makes GCC happy when checking if the jump pointer was initialized. Signed-off-by: Peter Kümmel Signed-off-by: Michal Marek (cherry picked from commit 2d560306096739e2251329ab5c16059311a151b0) Signed-off-by: Jon Medhurst --- scripts/kconfig/menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 24ad40942586..d908e5496532 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -525,7 +525,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, { int i, j; struct menu *submenu[8], *menu, *location = NULL; - struct jump_key *jump; + struct jump_key *jump = NULL; str_printf(r, _("Prompt: %s\n"), _(prop->text)); menu = prop->menu->parent; @@ -563,7 +563,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, str_printf(r, _(" Location:\n")); for (j = 4; --i >= 0; j += 2) { menu = submenu[i]; - if (head && location && menu == location) + if (jump && menu == location) jump->offset = strlen(r->s); str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); From d266af7f712dc494727b6a18e26fb123911884d5 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Wed, 15 Apr 2015 11:24:40 +0100 Subject: [PATCH 6/6] configs: Remove duplicate CONFIG_FUNCTION_TRACER To avoid the following warning when running merge_config.sh with this config fragment... ./.tmp.config.37TtCkZvtp:92:warning: override: reassigning to symbol FUNCTION_TRACER Signed-off-by: Jon Medhurst --- linaro/configs/linaro-base.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/linaro/configs/linaro-base.conf b/linaro/configs/linaro-base.conf index 15f6ea784f63..c2a5143518fb 100644 --- a/linaro/configs/linaro-base.conf +++ b/linaro/configs/linaro-base.conf @@ -98,7 +98,6 @@ CONFIG_KGDB=y CONFIG_KGDB_TESTS=y CONFIG_OF_IDLE_STATES=y CONFIG_FTRACE=y -CONFIG_FUNCTION_TRACER=y CONFIG_FTRACE_SYSCALLS=y CONFIG_STACK_TRACER=y CONFIG_FUNCTION_PROFILER=y