This is a collection of patches to fix build some warnings in LSK.
Note, Patch 4 is a bug fix that I backported to get the other kconfig warning fix to apply cleanly, so perhaps it shouldn't be included and the other patch 5 modified insted?
Jon Medhurst (3): drm/cma: Fix printk formats in drm_gem_cma_describe netfilter: nfnetlink_queue: Fix "discards 'const' qualifier" warning configs: Remove duplicate CONFIG_FUNCTION_TRACER
Martin Walch (1): kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len
Peter Kmmel (1): kconfig: Fix warning "'jump' may be used uninitialized"
Tim Gardner (1): scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized
drivers/gpu/drm/drm_gem_cma_helper.c | 4 ++-- linaro/configs/linaro-base.conf | 1 - net/netfilter/nfnetlink_queue_core.c | 2 +- scripts/kconfig/menu.c | 6 +++--- scripts/sortextable.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) drivers/gpu/drm/drm_gem_cma_helper.c | 4 ++-- linaro/configs/linaro-base.conf | 1 - net/netfilter/nfnetlink_queue_core.c | 2 +- scripts/kconfig/menu.c | 6 +++--- scripts/sortextable.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-)
Signed-off-by: Jon Medhurst tixy@linaro.org --- 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 0a7e011..c25b7a0 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"); }
Hi, Tixy,
Would you like to give the compile warning in commit message?
On Wed, 2015-04-15 at 15:45 +0800, Alex Shi wrote:
Would you like to give the compile warning in commit message?
Sure, will do, and for the other patch(es). I knew that was best practice but for some reason didn't do that for all patches.
Yes. And all patches look fine. Will you pick up all patches or let my merge them into LSK directly?
Thanks Alex
On 04/15/2015 03:55 PM, Jon Medhurst (Tixy) wrote:
On Wed, 2015-04-15 at 15:45 +0800, Alex Shi wrote:
Would you like to give the compile warning in commit message?
Sure, will do, and for the other patch(es). I knew that was best practice but for some reason didn't do that for all patches.
On Wed, 2015-04-15 at 16:03 +0800, Alex Shi wrote:
Yes. And all patches look fine. Will you pick up all patches or let my merge them into LSK directly?
I assume you are talking to me there. I'm already carrying these patches in the ARM LT Juno tree based off LSK, my intention of posting them here was in the hope that they would be added to LSK, so all users of LSK benefit.
On 04/15/2015 04:58 PM, Jon Medhurst (Tixy) wrote:
On Wed, 2015-04-15 at 16:03 +0800, Alex Shi wrote:
Yes. And all patches look fine. Will you pick up all patches or let my merge them into LSK directly?
I assume you are talking to me there. I'm already carrying these patches in the ARM LT Juno tree based off LSK, my intention of posting them here was in the hope that they would be added to LSK, so all users of LSK benefit.
Yes. Ok I will pick up them in lsk.
On Wed, 2015-04-15 at 17:00 +0800, Alex Shi wrote:
On 04/15/2015 04:58 PM, Jon Medhurst (Tixy) wrote:
On Wed, 2015-04-15 at 16:03 +0800, Alex Shi wrote:
Yes. And all patches look fine. Will you pick up all patches or let my merge them into LSK directly?
I assume you are talking to me there. I'm already carrying these patches in the ARM LT Juno tree based off LSK, my intention of posting them here was in the hope that they would be added to LSK, so all users of LSK benefit.
Yes. Ok I will pick up them in lsk.
Just about to post a V2 patchset with updated commit messages.
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 tixy@linaro.org --- 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 2b8199f..5497f50 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: Tim Gardner tim.gardner@canonical.com
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 tim.gardner@canonical.com Reviewed-by: Jamie Iles jamie.iles@oracle.com
Signed-off-by: Andrew Morton akpm@linux-foundation.org Signed-off-by: Linus Torvalds torvalds@linux-foundation.org (cherry picked from commit 7cbc0ea79da2cbe70d8da9319895f07f872a3190) Signed-off-by: Jon Medhurst tixy@linaro.org --- scripts/sortextable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/sortextable.h b/scripts/sortextable.h index f5eb43d..3f06479 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: Martin Walch walch.martin@web.de
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 walch.martin@web.de Acked-by: Wang YanQing udknight@gmail.com Acked-by: Benjamin Poirier bpoirier@suse.de Reviewed-by: "Yann E. MORIN" yann.morin.1998@free.fr Signed-off-by: "Yann E. MORIN" yann.morin.1998@free.fr (cherry picked from commit 503c823048e81cc85c0e9d8c297cc70203e335e5) Signed-off-by: Jon Medhurst tixy@linaro.org --- 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 fd3f018..24ad409 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: Peter Kümmel syntheticpp@gmx.net
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 syntheticpp@gmx.net Signed-off-by: Michal Marek mmarek@suse.cz (cherry picked from commit 2d560306096739e2251329ab5c16059311a151b0) Signed-off-by: Jon Medhurst tixy@linaro.org --- 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 24ad409..d908e54 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)));
to avoid warning when running merge_config.sh
Signed-off-by: Jon Medhurst tixy@linaro.org --- 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 15f6ea7..c2a5143 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
Could you give the warning message in commit message?
Thanks Alex
On 04/14/2015 06:49 PM, Jon Medhurst wrote:
to avoid warning when running merge_config.sh
Signed-off-by: Jon Medhurst tixy@linaro.org
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 15f6ea7..c2a5143 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
On 04/14/2015 06:48 PM, Jon Medhurst wrote:
This is a collection of patches to fix build some warnings in LSK.
Note, Patch 4 is a bug fix that I backported to get the other kconfig warning fix to apply cleanly, so perhaps it shouldn't be included and the other patch 5 modified insted?
It is ok to them separate.
Jon Medhurst (3): drm/cma: Fix printk formats in drm_gem_cma_describe netfilter: nfnetlink_queue: Fix "discards 'const' qualifier" warning configs: Remove duplicate CONFIG_FUNCTION_TRACER
Martin Walch (1): kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len
Peter Kmmel (1): kconfig: Fix warning "'jump' may be used uninitialized"
Tim Gardner (1): scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized
drivers/gpu/drm/drm_gem_cma_helper.c | 4 ++-- linaro/configs/linaro-base.conf | 1 - net/netfilter/nfnetlink_queue_core.c | 2 +- scripts/kconfig/menu.c | 6 +++--- scripts/sortextable.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) drivers/gpu/drm/drm_gem_cma_helper.c | 4 ++-- linaro/configs/linaro-base.conf | 1 - net/netfilter/nfnetlink_queue_core.c | 2 +- scripts/kconfig/menu.c | 6 +++--- scripts/sortextable.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-)
linaro-kernel@lists.linaro.org