This is a collection of patches to fix some build warnings in LSK.
Changes in v2: Updated commit message for patch 1 and 6 to include examples of the warnings they fix.
------------------------------------------------------------------------
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 Kümmel (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(-)
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 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"); }
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 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 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
Pulled.
Thanks Alex
On 04/15/2015 06:24 PM, Jon Medhurst wrote:
This is a collection of patches to fix some build warnings in LSK.
Changes in v2: Updated commit message for patch 1 and 6 to include examples of the warnings they fix.
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 Kümmel (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(-)
Thanks for reminder. I updated the lsk and linux-linaro-lsk-v3.10 branches too.
I also tried the 'git symbolic-ref', it works on local, but push to remote repo will make it point to a fixed ref. Also can not figure a workable way to have some symlink for remote branches. :(
BTW, Is there someone using 'lsk' branch? If no, could we remove this one? maintaining many same branch doesn't look cool.
Thanks Alex
On 04/15/2015 10:58 PM, Jon Medhurst (Tixy) wrote:
On Wed, 2015-04-15 at 20:12 +0800, Alex Shi wrote:
Pulled.
Thanks.
BTW, I notice that whilst the linux-linaro-lsk branch has these, 'linux-linaro-lsk-v3.10' and 'lsk' are still at the old commit. Are these other branches meant to be the same as 'linux-linaro-lsk'?
On 04/16/2015 04:45 PM, Jon Medhurst (Tixy) wrote:
On Thu, 2015-04-16 at 13:53 +0800, Alex Shi wrote:
Is there someone using 'lsk' branch? If no, could we remove this one? maintaining many same branch doesn't look cool.
I've no idea and the only way to know is to delete it and see who screams ;-)
That's a good idea. :D
On 16 April 2015 at 06:53, Alex Shi alex.shi@linaro.org wrote:
BTW,
Is there someone using 'lsk' branch? If no, could we remove this one? maintaining many same branch doesn't look cool.
I'm not aware of anyone - I didn't even know that they existed and I've never updated them.
On 04/16/2015 05:05 PM, Mark Brown wrote:
On 16 April 2015 at 06:53, Alex Shi <alex.shi@linaro.org mailto:alex.shi@linaro.org> wrote:
BTW, Is there someone using 'lsk' branch? If no, could we remove this one? maintaining many same branch doesn't look cool.
I'm not aware of anyone - I didn't even know that they existed and I've never updated them.
Hi, Kevin, Could we remove the lsk and lsk-android branch?
On Thu, Apr 16, 2015 at 4:51 AM, Alex Shi alex.shi@linaro.org wrote:
On 04/16/2015 05:05 PM, Mark Brown wrote:
On 16 April 2015 at 06:53, Alex Shi <alex.shi@linaro.org mailto:alex.shi@linaro.org> wrote:
BTW, Is there someone using 'lsk' branch? If no, could we remove this one? maintaining many same branch doesn't look cool.
I'm not aware of anyone - I didn't even know that they existed and I've never updated them.
Hi, Kevin, Could we remove the lsk and lsk-android branch?
Sure, there's lots of clutter in those branch names I've been trying to understand, so I'm all for cleaning them up. Let's start by removing those two. I've confirmed that at least there are no CI jobs using those.
I'd also like to remove all the non-versioned branches too. We're going to be adding another LSK version soon, and the non-versioned branches just add confusion. Before removing those, I need to have the CI guys update their jobs first.
Kevin
Thanks Alex
On 04/21/2015 01:01 AM, Kevin Hilman wrote:
On Thu, Apr 16, 2015 at 4:51 AM, Alex Shi alex.shi@linaro.org wrote:
On 04/16/2015 05:05 PM, Mark Brown wrote:
On 16 April 2015 at 06:53, Alex Shi <alex.shi@linaro.org mailto:alex.shi@linaro.org> wrote:
BTW, Is there someone using 'lsk' branch? If no, could we remove this one? maintaining many same branch doesn't look cool.
I'm not aware of anyone - I didn't even know that they existed and I've never updated them.
Hi, Kevin, Could we remove the lsk and lsk-android branch?
Sure, there's lots of clutter in those branch names I've been trying to understand, so I'm all for cleaning them up. Let's start by removing those two. I've confirmed that at least there are no CI jobs using those.
I'd also like to remove all the non-versioned branches too. We're going to be adding another LSK version soon, and the non-versioned branches just add confusion. Before removing those, I need to have the CI guys update their jobs first.
That is more simple and direct. Good!
Kevin
Alex Shi alex.shi@linaro.org writes:
On 04/16/2015 05:05 PM, Mark Brown wrote:
On 16 April 2015 at 06:53, Alex Shi <alex.shi@linaro.org mailto:alex.shi@linaro.org> wrote:
BTW, Is there someone using 'lsk' branch? If no, could we remove this one? maintaining many same branch doesn't look cool.
I'm not aware of anyone - I didn't even know that they existed and I've never updated them.
Hi, Kevin, Could we remove the lsk and lsk-android branch?
They're now gone.
Kevin
linaro-kernel@lists.linaro.org