From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Alasdair Kergon <agk@redhat.com>, Joe Thornber <ejt@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
dm-devel@redhat.com, sparclinux@vger.kernel.org,
linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] dm cache: Avoid conflicting remove_mapping() in mq policy
Date: Fri, 16 Aug 2013 01:31:18 -0700 [thread overview]
Message-ID: <520DE356.9060506@roeck-us.net> (raw)
In-Reply-To: <1374825451-30463-1-git-send-email-geert@linux-m68k.org>
On 07/26/2013 12:57 AM, Geert Uytterhoeven wrote:
> On sparc32, which includes <linux/swap.h> from <asm/pgtable_32.h>:
>
> drivers/md/dm-cache-policy-mq.c:962:13: error: conflicting types for 'remove_mapping'
> include/linux/swap.h:285:12: note: previous declaration of 'remove_mapping' was here
>
> As mq_remove_mapping() already exists, and the local remove_mapping() is
> used only once, inline it manually to avoid the conflict.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Is this patch going anyhere ? The problem breaks the sparc32:allmodconfig build,
so it would be useful to get it fixed.
Thanks,
Guenter
> ---
> I think this is also needed on hexagon, which includes <linux/swap.h> from
> <asm/pgtable.h>.
>
> drivers/md/dm-cache-policy-mq.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
> index dc112a7..4296155 100644
> --- a/drivers/md/dm-cache-policy-mq.c
> +++ b/drivers/md/dm-cache-policy-mq.c
> @@ -959,23 +959,21 @@ out:
> return r;
> }
>
> -static void remove_mapping(struct mq_policy *mq, dm_oblock_t oblock)
> +static void mq_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock)
> {
> - struct entry *e = hash_lookup(mq, oblock);
> + struct mq_policy *mq = to_mq_policy(p);
> + struct entry *e;
> +
> + mutex_lock(&mq->lock);
> +
> + e = hash_lookup(mq, oblock);
>
> BUG_ON(!e || !e->in_cache);
>
> del(mq, e);
> e->in_cache = false;
> push(mq, e);
> -}
>
> -static void mq_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock)
> -{
> - struct mq_policy *mq = to_mq_policy(p);
> -
> - mutex_lock(&mq->lock);
> - remove_mapping(mq, oblock);
> mutex_unlock(&mq->lock);
> }
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Alasdair Kergon <agk@redhat.com>, Joe Thornber <ejt@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
dm-devel@redhat.com, sparclinux@vger.kernel.org,
linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] dm cache: Avoid conflicting remove_mapping() in mq policy
Date: Fri, 16 Aug 2013 08:31:18 +0000 [thread overview]
Message-ID: <520DE356.9060506@roeck-us.net> (raw)
In-Reply-To: <1374825451-30463-1-git-send-email-geert@linux-m68k.org>
On 07/26/2013 12:57 AM, Geert Uytterhoeven wrote:
> On sparc32, which includes <linux/swap.h> from <asm/pgtable_32.h>:
>
> drivers/md/dm-cache-policy-mq.c:962:13: error: conflicting types for 'remove_mapping'
> include/linux/swap.h:285:12: note: previous declaration of 'remove_mapping' was here
>
> As mq_remove_mapping() already exists, and the local remove_mapping() is
> used only once, inline it manually to avoid the conflict.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Is this patch going anyhere ? The problem breaks the sparc32:allmodconfig build,
so it would be useful to get it fixed.
Thanks,
Guenter
> ---
> I think this is also needed on hexagon, which includes <linux/swap.h> from
> <asm/pgtable.h>.
>
> drivers/md/dm-cache-policy-mq.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
> index dc112a7..4296155 100644
> --- a/drivers/md/dm-cache-policy-mq.c
> +++ b/drivers/md/dm-cache-policy-mq.c
> @@ -959,23 +959,21 @@ out:
> return r;
> }
>
> -static void remove_mapping(struct mq_policy *mq, dm_oblock_t oblock)
> +static void mq_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock)
> {
> - struct entry *e = hash_lookup(mq, oblock);
> + struct mq_policy *mq = to_mq_policy(p);
> + struct entry *e;
> +
> + mutex_lock(&mq->lock);
> +
> + e = hash_lookup(mq, oblock);
>
> BUG_ON(!e || !e->in_cache);
>
> del(mq, e);
> e->in_cache = false;
> push(mq, e);
> -}
>
> -static void mq_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock)
> -{
> - struct mq_policy *mq = to_mq_policy(p);
> -
> - mutex_lock(&mq->lock);
> - remove_mapping(mq, oblock);
> mutex_unlock(&mq->lock);
> }
>
>
next prev parent reply other threads:[~2013-08-16 8:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 7:57 [PATCH] dm cache: Avoid conflicting remove_mapping() in mq policy Geert Uytterhoeven
2013-07-26 7:57 ` Geert Uytterhoeven
2013-08-16 8:31 ` Guenter Roeck [this message]
2013-08-16 8:31 ` Guenter Roeck
2013-08-16 11:38 ` Alasdair G Kergon
2013-08-16 11:38 ` Alasdair G Kergon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=520DE356.9060506@roeck-us.net \
--to=linux@roeck-us.net \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=ejt@redhat.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@redhat.com \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.