mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: akpm@linux-foundation.org, peterz@infradead.org,
	caraitto@google.com, willemb@google.com, adobriyan@gmail.com,
	mingo@kernel.org, rakib.mullick@gmail.com,
	amritha.nambiar@intel.com, mhkelley@outlook.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpumask: provide a dummy cpumask_next_wrap
Date: Mon, 13 Aug 2018 15:57:39 -0700 (PDT)	[thread overview]
Message-ID: <20180813.155739.520994642189876587.davem@davemloft.net> (raw)
In-Reply-To: <20180813215546.3828228-1-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 13 Aug 2018 23:55:16 +0200

> The virtio_net driver has become the first one to call cpumask_next_wrap()
> even if CONFIG_SMP is disabled, leading to a build error:
> 
> drivers/net/virtio_net.c: In function 'virtnet_set_affinity':
> drivers/net/virtio_net.c:1916:10: error: implicit declaration of function 'cpumask_next_wrap'; did you mean 'cpumask_next_and'? [-Werror=implicit-function-declaration]
>     cpu = cpumask_next_wrap(cpu, cpu_online_mask,
> 
> Add a stub function along the lines of cpumask_first(), cpumask_next() etc.
> I'm not entirely sure what should be returned in this case, but at
> least for virtio_net, anything should work.
> 
> Fixes: 2ca653d607ce ("virtio_net: Stripe queue affinities across cores.")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

This should already be fixed in my tree, and:

> +static inline int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap)
> +{
> +	return n;
> +}

this doesn't handle the "n==0 && wrap" case properly, in that situation you should
return '1'.

      parent reply	other threads:[~2018-08-13 22:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13 21:55 Arnd Bergmann
2018-08-13 22:01 ` Caleb Raitto
2018-08-13 22:05   ` Arnd Bergmann
2018-08-13 22:57 ` David Miller [this message]

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=20180813.155739.520994642189876587.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=amritha.nambiar@intel.com \
    --cc=arnd@arndb.de \
    --cc=caraitto@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhkelley@outlook.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rakib.mullick@gmail.com \
    --cc=willemb@google.com \
    /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®