From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE726C021A0 for ; Wed, 12 Feb 2025 11:53:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 15185280002; Wed, 12 Feb 2025 06:53:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 101B6280001; Wed, 12 Feb 2025 06:53:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE495280002; Wed, 12 Feb 2025 06:53:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id D06C6280001 for ; Wed, 12 Feb 2025 06:53:37 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6181114175F for ; Wed, 12 Feb 2025 11:53:37 +0000 (UTC) X-FDA: 83111132874.22.3287450 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by imf22.hostedemail.com (Postfix) with ESMTP id 73500C0007 for ; Wed, 12 Feb 2025 11:53:35 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=KF27pNro; spf=pass (imf22.hostedemail.com: domain of dan.carpenter@linaro.org designates 209.85.208.53 as permitted sender) smtp.mailfrom=dan.carpenter@linaro.org; dmarc=pass (policy=none) header.from=linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739361215; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:dkim-signature; bh=ve4GUfiMGd+JubWtGmw2gMxfkFox9RovPabXzAhTLMg=; b=JEwHxZVkQbXrwb50IGfQfcKUPEALcHHJ7pZs0gHImFNiDzF3kQVQS+sWejkO4Q2SGhoM8j LcunfMsVO04orwn9Z7ZgqMcSr+0pJGQOvO7MiXKgpgGECWX0Zmbb/KYXjnoO3IG9thVnVS JhrDyy5ivVbxAeBh2oYNZMOkmeaCd68= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=KF27pNro; spf=pass (imf22.hostedemail.com: domain of dan.carpenter@linaro.org designates 209.85.208.53 as permitted sender) smtp.mailfrom=dan.carpenter@linaro.org; dmarc=pass (policy=none) header.from=linaro.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739361215; a=rsa-sha256; cv=none; b=Y2rpKAHeUAdNOLtf6i50t6kSlvxb2q52+T2+A/lkVN6YUg6+fc7aMKn3QFz2niQTZbDu+c tepFWxVCgjPxuaUf3BK6wxCfXChOwDH2uX4krVBvf3WDYof/mW2HHEF6xMAAoCC0AyUHLG qM+SmyHccUM5z4f3vxW97RPFqIRpDCA= Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5de4f4b0e31so8662701a12.0 for ; Wed, 12 Feb 2025 03:53:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739361214; x=1739966014; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ve4GUfiMGd+JubWtGmw2gMxfkFox9RovPabXzAhTLMg=; b=KF27pNroWFhgrh8tMxj+czm6GLhSqD7yHVWNLLPFJSI9zVX+D4u0JdUjErB3cbSkVr +kH+mpy84sqA92Nf4E6Z48qh4VhR6Y6r/iIWaQCn+GNi2thAytbp1tJT6ZAhjLXlfTFF Uvw4kBaePgR5Yvj2B8aSYVKzbTqpfF+OVOkkEB/lBfCaQEtEFReCQHwJ1erFMF3d2SZK 1krzEAI6H5PaPVdKc6zQsbx9BCnKf9dXiW2mBj4j1EpIPQ698wU3G0he5wqvZ+zAGM3n yVL7qsLbjp4cWbU/ylQy9ifE+cXfk/V08i9v8asomtiXoJl6S7nS6YNlLpng6awXxNL/ KDLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739361214; x=1739966014; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ve4GUfiMGd+JubWtGmw2gMxfkFox9RovPabXzAhTLMg=; b=lXenU05M7Bjkg4A0t9wpedC9ii0UsInmwFxqIIN1e1Wlwr3wUPqUEu7ShBxkwuf5nQ kYMd4tWgsN0HT5T0TCWgUjxqWWcAMhtqTF2bqBN01bkgJDbe8IYoOeDEtZdi/hKoV8Li mxr76Jthen6yE/F8a+kVOeRbhcf1NvnQX1oZUrVasjxJwg9lBH8LKc71K1pZO/wVBvEo vJohf2xLx+qjZwakfJuYv5AUMtUJWF6fCrpNxtRMPeJtTm+8QknSzqzwL8LPO6G3IUWe Ln0heJBjtoHoaqWgP8ebBDhx66970X7+FCM88jwEfOdoyNiIc0P5W/6YXCK3gyc9u2eH bMMw== X-Forwarded-Encrypted: i=1; AJvYcCUoa/Yj91Z04kMRJel+2h76Z8avV7cVrmBSKAnRdqew1xuWoHfwGRs7Vf1SyzVVS0Rqs2u4kR7Uyg==@kvack.org X-Gm-Message-State: AOJu0YwfJEzeLHVUPhgOGoaoJv+4X/yjhJPfFyrU0Xsj1lr78XHCiy+E b2vc9j24NNgDY4nr6CeR1eLP9eWICk3+vkbMrODjICW+vI2cv3Ga8OOpMrVh6ec= X-Gm-Gg: ASbGncvLiYZ+tz8eScqe6MhthaxIImj+sLHUQaCiq9fmSQ8agG3XdG8At+2ZP72r8jK euXwhO7ftMYGHOeO0imEISzrmHMAy3/0db1tgjKJZVhEfzs+uCaY5vq4Wdho4UwaFUGoNfGmCxy b6g+eI3BcxgSxtN8xdVZsN4JO+Ed6le4uZ6tLnA7Let6IcXjEh27231Eo10D1wy883UAG78+cNa mhf5M3iqqchE79K40B9CnWjMBD3AzjacdtfGfqLXZiRBI0o+Y3NKWf7f8EzfWxw3x1DqxTRwX7A rQkkQOVegJCwhVtOn/qB X-Google-Smtp-Source: AGHT+IEW37Ln8Rw9wZCx5hEW7SwbEBmh4Q/tDMUHGy/4+ny+FLprR4PjEwKabrQy3taBn4EwI9h/ug== X-Received: by 2002:a05:6402:4605:b0:5dc:8f03:bb5c with SMTP id 4fb4d7f45d1cf-5deadd9217bmr2454917a12.11.1739361213657; Wed, 12 Feb 2025 03:53:33 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with UTF8SMTPSA id 4fb4d7f45d1cf-5de46b7b480sm10008537a12.36.2025.02.12.03.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2025 03:53:33 -0800 (PST) Date: Wed, 12 Feb 2025 14:53:30 +0300 From: Dan Carpenter To: oe-kbuild@lists.linux.dev, Tamir Duberstein , David Gow , Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long , Andrew Morton , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, Tamir Duberstein Subject: Re: [PATCH] ww_mutex: convert self-test to KUnit Message-ID: <3dabe058-2308-4990-8e5d-0af1efd27431@stanley.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250210-ww_mutex-kunit-convert-v1-1-972f0201f71e@gmail.com> X-Rspamd-Queue-Id: 73500C0007 X-Stat-Signature: xmfajh53i543irzuj1oprdza8fba7eoo X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4Pqyn3UpVbdSFG//wgJ/sLp8WuWEK2JLPbKEmxY2c06QaniTdHsaMhUjuUAtcVFIGLeKatYj+p5n2R3Ujysb2BgGROnKfooSVgH1mD+ShBqj9QQ9C4EOFOXqy/DKWJG+Q9AnQGrLq/wrRnFbr3stqQqQbAmiCi3vhWNckyEuRkr5/hLG92HmAoVjmaHj33GHA3oR3LcMKi1u4/zLrBpViHwp2dLsSctnVN/tkIr48DyqqnJmdnfbQTROit8F/IGvJlnCWW/QdVUXYt9JhQQLwEdNgzHL76z+UVQG91bRjPPAfs0ebvcgZ16AuBTNZ1502S1VE6zy8hKM0rzlf9FW3ta23sAOqGKumKW6HtLUTbRhJ02P7vXdpBDI2Qb7T8MrbfPC+QDFFCaBSFTvGIVxnhD5A9LrQ6GPt4bT43vn/lI7Gmq1MBS+SVwr8WByij0tm+/NYAP6cF8KYClvA00mlY0WhKgmKUVpSCh+fph9rG5awr6K+R+2WUuwuB7yAzF0vpRk8Ku9jqNBbun1oOi1Lfn6+74Ka2wX1F0EM9Bnq1gB0581zX5NEhrCVwHrvA2n6Q/3hSUyaA X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi Tamir, kernel test robot noticed the following build warnings: url: https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/ww_mutex-convert-self-test-to-KUnit/20250211-000245 base: a64dcfb451e254085a7daee5fe51bf22959d52d3 patch link: https://lore.kernel.org/r/20250210-ww_mutex-kunit-convert-v1-1-972f0201f71e%40gmail.com patch subject: [PATCH] ww_mutex: convert self-test to KUnit config: i386-randconfig-141-20250212 (https://download.01.org/0day-ci/archive/20250212/202502121806.CS6r741y-lkp@intel.com/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202502121806.CS6r741y-lkp@intel.com/ smatch warnings: kernel/locking/ww_mutex_kunit.c:238 test_abba_gen_params() warn: shift has higher precedence than mask kernel/locking/ww_mutex_kunit.c:249 test_abba() warn: shift has higher precedence than mask vim +238 kernel/locking/ww_mutex_kunit.c 70207686e492fb kernel/locking/test-ww_mutex.c Chris Wilson 2016-12-01 231 daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 232 static const void *test_abba_gen_params(const void *prev, char *desc) daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 233 { daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 234 static unsigned int storage; daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 235 const unsigned int *next = gen_range(&storage, 0b00, 0b11, prev); daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 236 daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 237 if (next != NULL) { daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 @238 const bool trylock = *next & 0b01 >> 0; daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 239 const bool resolve = *next & 0b10 >> 1; The shifts here are weird... A zero shift is strange but even the 1 shift is odd. The current code is equivalent to: const bool resolve = *next & (0b10 >> 1); But changing it to: const bool resolve = (*next & 0b10) >> 1; Doesn't make sense either... Probably that makes less sense actually. What are you trying to communicate with this code? daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 240 daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 241 snprintf(desc, KUNIT_PARAM_DESC_SIZE, "trylock=%d,resolve=%d", trylock, resolve); daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 242 } daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 243 return next; daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 244 } daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 245 daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 246 static void test_abba(struct kunit *test) 70207686e492fb kernel/locking/test-ww_mutex.c Chris Wilson 2016-12-01 247 { daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 248 const unsigned int *param = test->param_value; daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 @249 const bool trylock = *param & 0b01 >> 0; daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 250 const bool resolve = *param & 0b10 >> 1; Same. 70207686e492fb kernel/locking/test-ww_mutex.c Chris Wilson 2016-12-01 251 struct test_abba abba; 70207686e492fb kernel/locking/test-ww_mutex.c Chris Wilson 2016-12-01 252 struct ww_acquire_ctx ctx; daf92a37bd1117 kernel/locking/ww_mutex_kunit.c Tamir Duberstein 2025-02-10 253 int err; 70207686e492fb kernel/locking/test-ww_mutex.c Chris Wilson 2016-12-01 254 70207686e492fb kernel/locking/test-ww_mutex.c Chris Wilson 2016-12-01 255 ww_mutex_init(&abba.a_mutex, &ww_class); 70207686e492fb kernel/locking/test-ww_mutex.c Chris Wilson 2016-12-01 256 ww_mutex_init(&abba.b_mutex, &ww_class); 70207686e492fb kernel/locking/test-ww_mutex.c Chris Wilson 2016-12-01 257 INIT_WORK_ONSTACK(&abba.work, test_abba_work); -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki