Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1186314 > unrolled thread
| Started by | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| First post | 2015-07-17 01:10 +0200 |
| Last post | 2015-07-17 01:10 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: linux-next: build warning after merge of the akpm-current tree Andrew Morton <akpm@linux-foundation.org> - 2015-07-17 01:10 +0200
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Date | 2015-07-17 01:10 +0200 |
| Subject | Re: linux-next: build warning after merge of the akpm-current tree |
| Message-ID | <pN0rT-4gn-17@gated-at.bofh.it> |
On Thu, 16 Jul 2015 15:26:00 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm-current tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>
> lib/genalloc.c: In function 'gen_pool_get':
> /scratch/sfr/next/lib/genalloc.c:599:6: warning: passing argument 4 of 'devres_find' discards 'const' qualifier from pointer target type
> p = devres_find(dev, devm_gen_pool_release, devm_gen_pool_match, name);
> ^
> In file included from /scratch/sfr/next/include/linux/node.h:17:0,
> from /scratch/sfr/next/include/linux/cpu.h:16,
> from /scratch/sfr/next/include/linux/of_device.h:4,
> from /scratch/sfr/next/lib/genalloc.c:37:
> /scratch/sfr/next/include/linux/device.h:620:14: note: expected 'void *' but argument is of type 'const char *'
> extern void *devres_find(struct device *dev, dr_release_t release,
> ^
>
> Caused by commit
>
> e89a70fd54f2 ("genalloc: add support of multiple gen_pools per device")
urgh. devres_find()'s `void *match' argument should always have been const.
I started to fix that but the fix spreads like a virus - by the time I had a
700 line diff I gave up.
So I guess we cast away the constness at the caller, like all the other
callers do :(
--- a/lib/genalloc.c~genalloc-add-support-of-multiple-gen_pools-per-device-fix
+++ a/lib/genalloc.c
@@ -596,7 +596,8 @@ struct gen_pool *gen_pool_get(struct dev
{
struct gen_pool **p;
- p = devres_find(dev, devm_gen_pool_release, devm_gen_pool_match, name);
+ p = devres_find(dev, devm_gen_pool_release, devm_gen_pool_match,
+ (void *)name);
if (!p)
return NULL;
return *p;
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web