From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x225zYG1dyJ2uksvJBhCHsKYRucgngbCiqMDi9HrFOHMb0BDvyz+2zRj2U8s6snIHyTC4V9fX ARC-Seal: i=1; a=rsa-sha256; t=1516688879; cv=none; d=google.com; s=arc-20160816; b=sfD1lANmy6azF/+WRFN9qWADyvJReTOnl6/3nGA71iQLATIe5BhtDjKnp9DwvrE/+s ghbuFdTyN63eYdnb+WuclcQm9tn4rxZNI1GLoUOEUmhed4UswW5J++ADz6Mtygu+3UZy atnDXH26tw+wgA+PEnPZzylr70AmEdG2lLfYLatH73GJmBevZL6VJLLA9yIMg/TnFOl0 nVUvG2pOUdfd74+RNnwYaK6cVDiG3X3UaMW9cP6DnYy7ElL7Ki5BtKL2/o6BtwhbFJkP 9eu/zHmK6Ak8pNLEQWD1VUVguWHiOSSUfDBtvvDxvmXo/TKZPta1UR9zzWSmJIK/3XUC TvFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:cc:references:in-reply-to:subject:cc:date :to:from:arc-authentication-results; bh=v5SOqoVXIMMtEwJXQU/Ez6zJXAjeCufX44YMcyyraXA=; b=x+1+NCJu+F29mmqdi44ud5ZbLxnwf03HfMcTOnLJJz7rIPxHAKFImFDkYQ8zYWB+9R dUfQSISo2Igu313nYC5GmpcPFLKKV9E45oMcjD0JQ3zhnNL8w0V2mVpnVMdEarJVAC13 EY1pZqN0UYCfkbg/jdYLQXYMO2WwpL/TMjGoeleLeVEyGtMifHtOjwNmxwzGHSMYvfeQ DuAbrrPnJQ373o862OiHttywhh1CzwXwbWaME9vcOBLKfzK6TW4oqCGhAEOBTxynCoEb nNdvgup1Jsm2shlC8vVT/nb9U52sOf0vqJaQsTGztf7UhiNkgzT6+eaSkYIdvWmXDCAP 6Jxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of neilb@suse.com designates 195.135.220.15 as permitted sender) smtp.mailfrom=neilb@suse.com Authentication-Results: mx.google.com; spf=pass (google.com: domain of neilb@suse.com designates 195.135.220.15 as permitted sender) smtp.mailfrom=neilb@suse.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" From: NeilBrown To: Oleg Drokin , James Simmons , Andreas Dilger , Greg Kroah-Hartman Date: Tue, 23 Jan 2018 17:27:47 +1100 Cc: lkml , lustre Subject: [PATCH] staging: lustre: lnet/selftest: fix compile error on UP build In-Reply-To: <151564360053.21794.4058863911958997341.stgit@noble> References: <151564345630.21794.1667069238139184132.stgit@noble> <151564360053.21794.4058863911958997341.stgit@noble> cc: kbuild test robot Message-ID: <87tvvd84yk.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590363558606001259?= X-GMAIL-MSGID: =?utf-8?q?1590363558606001259?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable When compiled without CONFIG_SMP, we get a compile error as ->ctb_parts is not defined. There is already a function, cfs_cpt_cpumask(), which will get the cpumask we need, and which handles the UP case by returning a NULL pointer. So use that and handle NULL. Also avoid the #ifdef by allocating a cpumask_var and copying into it, rather than sharing the mask. Reported-by: kbuild test robot Fixes: 6106c0f82481 ("staging: lustre: lnet: convert selftest to use workqu= eues") Signed-off-by: NeilBrown ctb_parts[i].cpt_cpumask; =2D #else =2D cpumask_copy(attrs.cpumask, lnet_cpt_table()->ctb_parts[i].cpt_cpumask= ); =2D #endif =2D attrs.no_numa =3D false; =2D apply_workqueue_attrs(lst_test_wq[i], &attrs); + + if (mask && alloc_cpumask_var(&attrs.cpumask, GFP_KERNEL)) { + cpumask_copy(attrs.cpumask, *mask); + apply_workqueue_attrs(lst_test_wq[i], &attrs); + free_cpumask_var(attrs.cpumask); + } } =20 rc =3D srpc_startup(); =2D-=20 2.14.0.rc0.dirty --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlpm1eMACgkQOeye3VZi gbnE6w//ZIs/Z8ot33IFXryg7WCiRTuhJMMfPSTJHqbrapAJajMHWsbT2hsawjaR Qi0z8QA40ClaX7xyoZCoOcBgNKQR7L1ghxw93GVC095MdKcNFB/it2totxsQQmOG CCRi3XBOqGUGbq6cTFT98x3AMFoWbWMDKTusYAv95wY90qD+6paOdUo9QpUlNjo4 PN3ObrX30MSumTAMmh/p+Vi/ct8Oa/CIsMg4pTzYrgZXN8F0Hwqv755KFPsQhGQR M6xIeZBdh0/s2WkUpuFkWEuMfZCIGOGuw2cAAkJlxpXNcoSbGZSHw2c5ixM5LrhT K+pmUfaGu7N6wRtjY+7xUxStV6SWEPIZ8cpAkt5Yv7OCICanDyNAFUVz6t5NE9Cu VLE1IDBCg0MFw8tpMqmky19OXeD7N6P5J6pkhJ5bs/w5vs6QLdIOhI01yEktIgAB A5L1t9hbvkcr8/+XjAI/vsdVCkjbLx7y7z4bZirPGI1qkH5SH8fFW37V9Kd4dxm7 wQ1Re0WolKlZ6+gpk9KovgSjbclgyJ12D3xdWoS+vcPpRHXFMbtriPnpXjaQYXsm Ssd9vV8J7vwnUPs3Cb60N8KvRufi4TdEtR2ie5YZyY2hrXCTmWZv2if6mIn3oDvW QWQ5ja8RCbNJomXOOSmAvPTiw+yR+mFTTkfwHR3KpmMGPdL3fFg= =rMna -----END PGP SIGNATURE----- --=-=-=--