mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Jan Kara <jack@suse.com>, Jeff Layton <jlayton@poochiereds.net>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Tejun Heo <tj@kernel.org>,
	Christoph Lameter <cl@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andi Kleen <andi@firstfloor.org>,
	Dave Chinner <dchinner@redhat.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Waiman Long <Waiman.Long@hpe.com>
Subject: Re: [PATCH v6 4/6] lib/dlock-list: Make sibling CPUs share the same linked list
Date: Thu, 5 Oct 2017 14:01:27 -0400	[thread overview]
Message-ID: <cf2ccfc1-a902-29a4-3acf-4025e5172dab@redhat.com> (raw)
In-Reply-To: <20171005174004.GB5131@linux-80c1.suse>

On 10/05/2017 01:40 PM, Davidlohr Bueso wrote:
> This is still spitting:
>
> lib/dlock-list.c: In function ‘cpu2idx_init’:
> lib/dlock-list.c:75:16: error: incompatible types when assigning to
> type ‘cpumask_var_t’ from type ‘struct cpumask *’
>   sibling_mask = topology_sibling_cpumask(cpu);
>                ^
> lib/dlock-list.c:76:7: warning: the address of ‘sibling_mask’ will
> always evaluate as ‘true’ [-Waddress]
>   if (sibling_mask) {
>       ^


Thanks for reporting this problem. Dealing with cpumask is always
tricky. Could you try the following patch to see if it could fix the
problem.

Thanks,
Longman

----------------------------------------------------

diff --git a/lib/dlock-list.c b/lib/dlock-list.c
index f0df7d5..3afd76d 100644
--- a/lib/dlock-list.c
+++ b/lib/dlock-list.c
@@ -60,7 +60,7 @@
 static int __init cpu2idx_init(void)
 {
        int idx, cpu;
-       cpumask_var_t sibling_mask;
+       struct cpumask *sibling_mask;
        static struct cpumask mask __initdata;
 
        cpumask_clear(&mask);
@@ -74,11 +74,9 @@ static int __init cpu2idx_init(void)
                cpumask_set_cpu(cpu, &mask);
 
                sibling_mask = topology_sibling_cpumask(cpu);
-               if (sibling_mask) {
-                       for_each_cpu(scpu, sibling_mask) {
-                               per_cpu(cpu2idx, scpu) = idx;
-                               cpumask_set_cpu(scpu, &mask);
-                       }
+               for_each_cpu(scpu, sibling_mask) {
+                       per_cpu(cpu2idx, scpu) = idx;
+                       cpumask_set_cpu(scpu, &mask);
                }
                idx++;
        }

  reply	other threads:[~2017-10-05 18:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 21:20 [PATCH v6 0/6] vfs: Use dlock list for SB's s_inodes list Waiman Long
2017-10-04 21:20 ` [PATCH v6 1/6] lib/dlock-list: Distributed and lock-protected lists Waiman Long
2017-10-04 21:20 ` [PATCH v6 2/6] vfs: Remove unnecessary list_for_each_entry_safe() variants Waiman Long
2017-10-04 21:20 ` [PATCH v6 3/6] vfs: Use dlock list for superblock's inode list Waiman Long
2017-10-04 21:20 ` [PATCH v6 4/6] lib/dlock-list: Make sibling CPUs share the same linked list Waiman Long
2017-10-05  8:59   ` Jan Kara
2017-10-05 14:57     ` Waiman Long
2017-10-09  7:26       ` Jan Kara
2017-10-05 17:40   ` Davidlohr Bueso
2017-10-05 18:01     ` Waiman Long [this message]
2017-10-07 13:44   ` kbuild test robot
2017-10-07 14:38   ` kbuild test robot
2017-10-04 21:20 ` [PATCH v6 5/6] lib/dlock-list: Enable faster lookup with hashing Waiman Long
2017-10-05  9:14   ` Jan Kara
2017-10-05 11:06     ` Davidlohr Bueso
2017-10-04 21:20 ` [PATCH v6 6/6] lib/dlock-list: Provide IRQ-safe APIs Waiman Long
2017-10-04 22:46   ` Davidlohr Bueso
2017-10-05 13:40     ` Waiman Long

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=cf2ccfc1-a902-29a4-3acf-4025e5172dab@redhat.com \
    --to=longman@redhat.com \
    --cc=Waiman.Long@hpe.com \
    --cc=andi@firstfloor.org \
    --cc=bfields@fieldses.org \
    --cc=boqun.feng@gmail.com \
    --cc=cl@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=dchinner@redhat.com \
    --cc=jack@suse.com \
    --cc=jlayton@poochiereds.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tj@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®