The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Hongbo Yao <yaohongbo@huawei.com>
To: <paulmck@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <yaohongbo@huawei.com>,
	<chenzhou10@huawei.com>, <dave@stgolabs.net>,
	<josh@joshtriplett.org>
Subject: [PATCH RESEND -next] torture: avoid build error without CONFIG_RCU_TORTURE_TEST
Date: Thu, 13 Feb 2020 19:53:13 +0800	[thread overview]
Message-ID: <20200213115313.4794-1-yaohongbo@huawei.com> (raw)

If TORTURE_TEST=y(selected by TORTURE_LOCK_TEST) and RCU_TORTURE_TEST=n,
the following error is seen while building kernel/torture.c

kernel/torture.c: In function torture_onoff:
kernel/torture.c:239:3: error: implicit declaration of function
rcutorture_sched_setaffinity; did you mean __NR_ia32_sched_setaffinity?
[-Werror=implicit-function-declaration]
   rcutorture_sched_setaffinity(current->pid, cpumask_of(0));

Using sched_setaffnity() instead of rcutorture_sched_setaffinity() to
avoid the error.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: bc3db9afb849 ("EXP: rcutorture hack to force CPU hotplug onto CPU 0")
Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
---
 kernel/torture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/torture.c b/kernel/torture.c
index b29adec50e01..834214cbd1cd 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -236,7 +236,7 @@ torture_onoff(void *arg)
 			schedule_timeout_interruptible(HZ / 10);
 			continue;
 		}
-		rcutorture_sched_setaffinity(current->pid, cpumask_of(0));
+		sched_setaffinity(current->pid, cpumask_of(0));
 		cpu = (torture_random(&rand) >> 4) % (maxcpu + 1);
 		if (!torture_offline(cpu,
 				     &n_offline_attempts, &n_offline_successes,
-- 
2.17.1


             reply	other threads:[~2020-02-13 11:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 11:53 Hongbo Yao [this message]
2020-02-13 13:05 ` [PATCH RESEND -next] torture: avoid build error without CONFIG_RCU_TORTURE_TEST Paul E. McKenney

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=20200213115313.4794-1-yaohongbo@huawei.com \
    --to=yaohongbo@huawei.com \
    --cc=chenzhou10@huawei.com \
    --cc=dave@stgolabs.net \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox