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 2C2B5CD1292 for ; Thu, 4 Apr 2024 17:44:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 889426B0088; Thu, 4 Apr 2024 13:44:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 839706B0095; Thu, 4 Apr 2024 13:44:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7008D6B0098; Thu, 4 Apr 2024 13:44:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4C25B6B0088 for ; Thu, 4 Apr 2024 13:44:57 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0C860160405 for ; Thu, 4 Apr 2024 17:44:57 +0000 (UTC) X-FDA: 81972575034.10.F53298D Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf24.hostedemail.com (Postfix) with ESMTP id 9812E180016 for ; Thu, 4 Apr 2024 17:44:53 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YdhWssl3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of "SRS0=jYJR=LJ=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=jYJR=LJ=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712252694; h=from:from:sender:reply-to: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:references:dkim-signature; bh=SmZqbuzgITkInVHoPS9738krpeHWUoYoWRPIVPCTLFU=; b=GLA9fm0tgxi+1aqsfE2ldhvK4ZhWrnLCXhcRsihdkaW8HczcD/iAFLJSbpIh8NWd21h7LK /zv/TYWjxi2gXZafFl2s6YOVJBnW8DVelWY5HgoC4BxsLeuF0aOxO9sx63gxoy4+6T5aKp c0qz4/NJrGmw3sEcVzYaFP2KP9bwg0I= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YdhWssl3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of "SRS0=jYJR=LJ=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=jYJR=LJ=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712252694; a=rsa-sha256; cv=none; b=IWAlnieFtQggoQhfgcw/qw2P51Vb2lypGg4inxufMMB+Yr4aTcwRkfMZ9kp8QtMAaac6U9 hgKdqff4BjVUGzlNiz5sjRaNNAvjs/UpBhc6E2svn2uRMpwiTr92aVQZFWnFVzLUAbhLLZ +51FhJAg9KewgqHsbekNg9g9d/CBkxQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 3D49CCE33AE; Thu, 4 Apr 2024 17:44:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A2C2C43390; Thu, 4 Apr 2024 17:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712252688; bh=SQzfOmQi0NdISwOHgs7DDT/pGQWd1G0jgvx1eXnXfiM=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=YdhWssl3Ew927YxdjcytJH490W4bhv16ZDFvbYBNq0SbKRr2vmaSphAekaNFqhIB4 xJp4rLtoPDEsd9q3FNIf8PXmvghmzS24hJtz0rpaa5gcUjAhiMHIy7r741tvHu9jI4 3HN+ee+TheC/S4Fuc2ni0lSlxOpapFwK5WOOuRKp+w3vOOOeF4KpzbQmAXU3QFD1UW 7JSZSrN5xe6O4qihuTrim0GkCWpkzuZ8Xc5IlzDX/xvUEf67OsX5uozYnFV9GGMob9 mfe4INdRmQ19txHBk1s90Y+5Epky5wH9tlZZ1tHtB6ztXOZdMEvP428DPge/UGrcWU Q9V7FYGsnAYnw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 341A5CE0D0C; Thu, 4 Apr 2024 10:44:48 -0700 (PDT) Date: Thu, 4 Apr 2024 10:44:48 -0700 From: "Paul E. McKenney" To: kernel test robot Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: Re: [linux-next:master 2524/3504] kernel/locking/rtmutex.c:218:9: error: incompatible pointer to integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned long') Message-ID: <302e5ce2-5a65-4e07-8ca8-cced83e9af5b@paulmck-laptop> Reply-To: paulmck@kernel.org References: <202404040526.GVzaL2io-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202404040526.GVzaL2io-lkp@intel.com> X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 9812E180016 X-Stat-Signature: t3a4q554598bj43gsqcuzx4hfum18bpa X-HE-Tag: 1712252693-720427 X-HE-Meta: U2FsdGVkX1+8z2PuuCirT383taPhk6CToSNZ/KRNy+B4anuueNCA2iFwpTQ1MMohXKW14MGWQjy4bc8MBYPVwcLZrmhSlfCcn2i1rD0w+MbLSNYeJDNyB0THlPUFNWTydE3LzY7tnZFvwNex/Y7yZsY8emiazRQyd4p4zTNOGO7m5NE6+XUMdHweH0zBypTb7aFwWwFDITTCHlMldoUhY+4u4fWIxYJw6VC1i6nkTgIbn05EsZU1oja/yVzEBvqJv1cHUA4WXdDxsnb3l1bq9u0M28Ofr4W5tkNh/kKREKct3xE+nphCrXaiJJhItQ6YcGmxE1oY1+eIj/+f5t0hAIDAWqFCoH8Zpv1LqkiJ+ZiXYUpzlI2e54LpgbCtLZNPEdr8kXuYv4SksMKCbGG/FgG30/bHgsE5YlnwGy/hgDYSpu1XvADn4rEch1BiM7k20MT71oP2sbEuuV6jmh2rpxLKWuuUz1NtGsBflSjAknVT8gmaqW8/1xT4BK0L8hVOtWqqKXdv5xITNGgJuhsMSAKKmV6UT4Gpsk+56wjwBOJ3hSGeHEasSjjDYQDj8UIX5VZWr2HHYd9n323P6o7Kt/Asljt6J6pntKnxf1HHOPGNogXzT4rsRUKCkhZkai8l9dAu9ZrOxdIzxaw8kv20czRWoDK+QoWz7iAINNKmDf2zl0fsDbOhNvIVgj1i0T1+R69s/IjK+bTVc0F95i6BmMdDb45AkedQ8mVO1Bp9seOt+3qfUu8Czpb8NDlrF5F41/EIBOnpBaW4562jFnqip9QO8srfcLR2I12//wa85qGMaVZWfOnPlug8mjBoS70bmlUd/d4L2nofI600CKWOkQdgydTPyhcUjS6ky59CvpsTyqIaeWJuXca0lnaxDJkgcwcmL3dVo1GronYxDha2FMuh0E/cZWMzFqDkXm7UrDykuDD+2wQl3xKfYP5WoHiF8b/gCtstrEBW1GuXZQh xrFJBeX4 0jQfZv/PTP8Sqhextg/TAk2zDgaUual/JrsandkFEuiopQbwwUMI9FflhcYHcpHyKRx9Xsr1OGIPvzxLQ6B+XbJOH+dhk97FauleJBk/AshW0pNni6YAliSPMSYGnCqFyFMC8diQuN4t0YqZVpvpU2oXqEnbzMyQxCcQh/C9ttSakkQpmtnIG4CxaPoivjt944Pq8JeL1TXxR1RMF77yAUlSIclU480sX41MhUl/VevSgQBf4neCy6mtKs8ryQtpXLNyWQa1yWYyNVJWI8a/4cVFoEOKqaP4q7mIAJGwbMGdsV69hVBpeoS0Wm+/Eedem04ZCX3+j1tL08oR/SlAV62Fz4y4GAbz9cvMctufisxsiqPLltCnghavBESKUrH7yrJRYHe8b6ljPum6Q/npUBC1eBhRJxPQLzz0xQSwn340bCLruBTtYS7/K+P9hK7zSkNy4Z9uqGIvvwxMSfUI3G/C/tNStRAmerJNQRomFJ2XF4jr5izYEzHtPXXk/JHersUY04kJjBgPkFso/mTpIFqcPK4htOHVq++Wyv7Rtg6OVlqPLSE4gRrtziWvZJAUc4mZRJ0tp2coHOZ9pej3XpjNorrt3hGSjjg2Eei/7E24HQuivhVZxrVWS1jgyba5NLyHmh0fEyvXBEl2CbYRiIPja9PutDfADkal/ftxKFbX8RogeLiEIDE9cO/FDD2oLd3K+W907nBUGMs7CBg/y3cJ2gPhDLf8ipea7ItBPZQrYfgbNJ9fb7kPQIs66LB8KJifQ6GcZiCcYuCbk1MwH0xD8xg== 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: On Thu, Apr 04, 2024 at 05:13:20AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 727900b675b749c40ba1f6669c7ae5eb7eb8e837 > commit: df35ee400e06b23ecd44fdb66451a5343932f834 [2524/3504] riscv: Emulate one-byte and two-byte cmpxchg > config: riscv-nommu_virt_defconfig (https://download.01.org/0day-ci/archive/20240404/202404040526.GVzaL2io-lkp@intel.com/config) > compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 546dc2245ffc4cccd0b05b58b7a5955e355a3b27) > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240404/202404040526.GVzaL2io-lkp@intel.com/reproduce) > > 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 > | Closes: https://lore.kernel.org/oe-kbuild-all/202404040526.GVzaL2io-lkp@intel.com/ I believe that this is fixed by the following updated commit in -rcu: 27011e7159ef ("riscv: Emulate one-byte cmpxchg") But please let me know if I am missing something. Thanx, Paul > All errors (new ones prefixed by >>): > > In file included from kernel/locking/rtmutex_api.c:9: > >> kernel/locking/rtmutex.c:218:9: error: incompatible pointer to integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 218 | return try_cmpxchg_acquire(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4889:2: note: expanded from macro 'try_cmpxchg_acquire' > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:210:9: note: expanded from macro 'raw_try_cmpxchg_acquire' > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:65:29: note: expanded from macro 'raw_cmpxchg_acquire' > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > | ^ > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from macro 'arch_cmpxchg_acquire' > 264 | (__typeof__(*(ptr))) __cmpxchg_acquire((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 265 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:225:48: note: expanded from macro '__cmpxchg_acquire' > 225 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ > | ^~~~~ > include/linux/cmpxchg-emu.h:13:52: note: passing argument to parameter 'old' here > 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); > | ^ > In file included from kernel/locking/rtmutex_api.c:9: > >> kernel/locking/rtmutex.c:218:9: error: incompatible pointer to integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 218 | return try_cmpxchg_acquire(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4889:2: note: expanded from macro 'try_cmpxchg_acquire' > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:210:9: note: expanded from macro 'raw_try_cmpxchg_acquire' > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:65:29: note: expanded from macro 'raw_cmpxchg_acquire' > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > | ^ > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from macro 'arch_cmpxchg_acquire' > 264 | (__typeof__(*(ptr))) __cmpxchg_acquire((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 265 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:225:55: note: expanded from macro '__cmpxchg_acquire' > 225 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ > | ^~~~~ > include/linux/cmpxchg-emu.h:13:67: note: passing argument to parameter 'new' here > 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); > | ^ > In file included from kernel/locking/rtmutex_api.c:9: > >> kernel/locking/rtmutex.c:218:9: error: incompatible integer to pointer conversion assigning to 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') from 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 218 | return try_cmpxchg_acquire(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4889:2: note: expanded from macro 'try_cmpxchg_acquire' > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:210:9: note: expanded from macro 'raw_try_cmpxchg_acquire' > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:65:29: note: expanded from macro 'raw_cmpxchg_acquire' > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > | ^ > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from macro 'arch_cmpxchg_acquire' > 264 | (__typeof__(*(ptr))) __cmpxchg_acquire((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 265 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:225:9: note: expanded from macro '__cmpxchg_acquire' > 225 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ > | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from kernel/locking/rtmutex_api.c:9: > >> kernel/locking/rtmutex.c:218:9: error: incompatible pointer to integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 218 | return try_cmpxchg_acquire(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4889:2: note: expanded from macro 'try_cmpxchg_acquire' > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:210:9: note: expanded from macro 'raw_try_cmpxchg_acquire' > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:65:29: note: expanded from macro 'raw_cmpxchg_acquire' > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > | ^ > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from macro 'arch_cmpxchg_acquire' > 264 | (__typeof__(*(ptr))) __cmpxchg_acquire((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 265 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:229:50: note: expanded from macro '__cmpxchg_acquire' > 229 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ > | ^~~~~ > include/linux/cmpxchg-emu.h:14:54: note: passing argument to parameter 'old' here > 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t old, uintptr_t new); > | ^ > In file included from kernel/locking/rtmutex_api.c:9: > >> kernel/locking/rtmutex.c:218:9: error: incompatible pointer to integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 218 | return try_cmpxchg_acquire(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4889:2: note: expanded from macro 'try_cmpxchg_acquire' > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:210:9: note: expanded from macro 'raw_try_cmpxchg_acquire' > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:65:29: note: expanded from macro 'raw_cmpxchg_acquire' > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > | ^ > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from macro 'arch_cmpxchg_acquire' > 264 | (__typeof__(*(ptr))) __cmpxchg_acquire((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 265 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:229:57: note: expanded from macro '__cmpxchg_acquire' > 229 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ > | ^~~~~ > include/linux/cmpxchg-emu.h:14:69: note: passing argument to parameter 'new' here > 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t old, uintptr_t new); > | ^ > In file included from kernel/locking/rtmutex_api.c:9: > >> kernel/locking/rtmutex.c:218:9: error: incompatible integer to pointer conversion assigning to 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') from 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 218 | return try_cmpxchg_acquire(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4889:2: note: expanded from macro 'try_cmpxchg_acquire' > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:210:9: note: expanded from macro 'raw_try_cmpxchg_acquire' > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:65:29: note: expanded from macro 'raw_cmpxchg_acquire' > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > | ^ > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from macro 'arch_cmpxchg_acquire' > 264 | (__typeof__(*(ptr))) __cmpxchg_acquire((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 265 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:229:9: note: expanded from macro '__cmpxchg_acquire' > 229 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ > | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from kernel/locking/rtmutex_api.c:9: > kernel/locking/rtmutex.c:230:9: error: incompatible pointer to integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 230 | return try_cmpxchg_release(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4899:2: note: expanded from macro 'try_cmpxchg_release' > 4899 | raw_try_cmpxchg_release(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:228:9: note: expanded from macro 'raw_try_cmpxchg_release' > 228 | ___r = raw_cmpxchg_release((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:77:29: note: expanded from macro 'raw_cmpxchg_release' > 77 | #define raw_cmpxchg_release arch_cmpxchg_release > | ^ > arch/riscv/include/asm/cmpxchg.h:316:23: note: expanded from macro 'arch_cmpxchg_release' > 316 | (__typeof__(*(ptr))) __cmpxchg_release((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 317 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:277:48: note: expanded from macro '__cmpxchg_release' > 277 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ > | ^~~~~ > include/linux/cmpxchg-emu.h:13:52: note: passing argument to parameter 'old' here > 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); > | ^ > In file included from kernel/locking/rtmutex_api.c:9: > kernel/locking/rtmutex.c:230:9: error: incompatible pointer to integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 230 | return try_cmpxchg_release(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4899:2: note: expanded from macro 'try_cmpxchg_release' > 4899 | raw_try_cmpxchg_release(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:228:9: note: expanded from macro 'raw_try_cmpxchg_release' > 228 | ___r = raw_cmpxchg_release((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:77:29: note: expanded from macro 'raw_cmpxchg_release' > 77 | #define raw_cmpxchg_release arch_cmpxchg_release > | ^ > arch/riscv/include/asm/cmpxchg.h:316:23: note: expanded from macro 'arch_cmpxchg_release' > 316 | (__typeof__(*(ptr))) __cmpxchg_release((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 317 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:277:55: note: expanded from macro '__cmpxchg_release' > 277 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ > | ^~~~~ > include/linux/cmpxchg-emu.h:13:67: note: passing argument to parameter 'new' here > 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); > | ^ > In file included from kernel/locking/rtmutex_api.c:9: > kernel/locking/rtmutex.c:230:9: error: incompatible integer to pointer conversion assigning to 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') from 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 230 | return try_cmpxchg_release(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4899:2: note: expanded from macro 'try_cmpxchg_release' > 4899 | raw_try_cmpxchg_release(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:228:9: note: expanded from macro 'raw_try_cmpxchg_release' > 228 | ___r = raw_cmpxchg_release((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:77:29: note: expanded from macro 'raw_cmpxchg_release' > 77 | #define raw_cmpxchg_release arch_cmpxchg_release > | ^ > arch/riscv/include/asm/cmpxchg.h:316:23: note: expanded from macro 'arch_cmpxchg_release' > 316 | (__typeof__(*(ptr))) __cmpxchg_release((ptr), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 317 | _o_, _n_, sizeof(*(ptr))); \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/cmpxchg.h:277:9: note: expanded from macro '__cmpxchg_release' > 277 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ > | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from kernel/locking/rtmutex_api.c:9: > kernel/locking/rtmutex.c:230:9: error: incompatible pointer to integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned long') [-Wint-conversion] > 230 | return try_cmpxchg_release(&lock->owner, &old, new); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-instrumented.h:4899:2: note: expanded from macro 'try_cmpxchg_release' > 4899 | raw_try_cmpxchg_release(__ai_ptr, __ai_oldp, __VA_ARGS__); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:228:9: note: expanded from macro 'raw_try_cmpxchg_release' > 228 | ___r = raw_cmpxchg_release((_ptr), ___o, (_new)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:77:29: note: expanded from macro 'raw_cmpxchg_release' > 77 | #define raw_cmpxchg_release arch_cmpxchg_release > > > vim +218 kernel/locking/rtmutex.c > > 23f78d4a03c53c kernel/rtmutex.c Ingo Molnar 2006-06-27 208 > bd197234b0a616 kernel/rtmutex.c Thomas Gleixner 2007-06-17 209 /* > cede88418b385b kernel/locking/rtmutex.c Sebastian Andrzej Siewior 2015-02-25 210 * We can speed up the acquire/release, if there's no debugging state to be > cede88418b385b kernel/locking/rtmutex.c Sebastian Andrzej Siewior 2015-02-25 211 * set up. > bd197234b0a616 kernel/rtmutex.c Thomas Gleixner 2007-06-17 212 */ > cede88418b385b kernel/locking/rtmutex.c Sebastian Andrzej Siewior 2015-02-25 213 #ifndef CONFIG_DEBUG_RT_MUTEXES > 830e6acc8a1caf kernel/locking/rtmutex.c Peter Zijlstra 2021-08-15 214 static __always_inline bool rt_mutex_cmpxchg_acquire(struct rt_mutex_base *lock, > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior 2021-08-15 215 struct task_struct *old, > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior 2021-08-15 216 struct task_struct *new) > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior 2021-08-15 217 { > 709e0b62869f62 kernel/locking/rtmutex.c Thomas Gleixner 2021-08-15 @218 return try_cmpxchg_acquire(&lock->owner, &old, new); > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior 2021-08-15 219 } > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior 2021-08-15 220 > > :::::: The code at line 218 was first introduced by commit > :::::: 709e0b62869f625afd18edd79f190c38cb39dfb2 locking/rtmutex: Switch to from cmpxchg_*() to try_cmpxchg_*() > > :::::: TO: Thomas Gleixner > :::::: CC: Ingo Molnar > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki