From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8700191F9B for ; Tue, 10 Sep 2024 16:01:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725984110; cv=none; b=Gowg37MUuOnvc+OA7stu55EyRL74tfvRLUsXWAuDY8kGSv1v0BbJMuLCNHZhflZpjnEpPXcEYTcWeGTM6gcJpLmDpAiLxYdGmDWGQFpZFCnXgiBTVgRsIHMloa/bKMLJdMJnQv3LTGuRVQJmGJzlcsThR91lXnYSeyGhw/26pas= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725984110; c=relaxed/simple; bh=MQgPafDHjLHaX5gKO9KL1IlRjgS9muJNkIylVhQgN5I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gN3PccaQ5/b10QXAq6Tk2lXN8jwMCdZG6iUK+NzmV9jKvuHJEbQzHmmT4dhE0M/Q1+tFq7GXVHbqatl2HNnhasOa8CR0BOeNLhFFPY4/JEgmUuD1CycsMSTcKQIZuF7czZHftNOlfbC1SDkRDKd3K1+CzkhqDFfAPee5tp450P8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HlRwcI7y; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HlRwcI7y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725984108; x=1757520108; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=MQgPafDHjLHaX5gKO9KL1IlRjgS9muJNkIylVhQgN5I=; b=HlRwcI7yw1YKZbvzgX1Tj0eZMmyZh+Y0bpZkwTsLxliEor5ksbM0Hhu8 nXQLmkM8h40vxqvhFmEDn9nqXDc/u/+sF4LOBP/BvSSqd61yOA5ShWYCc yadIhI3/mW4wxgwa29Yl1vUss4tjAl/bazGFAwPBeFHNmv8PhaG8VRgeB jKY5ZX9a7o5k+frOiyD+0mMhFR9Q8bUpcmUp8gGW9SqkV1W3Rj/ZQ29Qa DpRgtQkoyLhuPAZQADKA3rxwtfH/WM4doiHbiVhSxrZvxx7lKmbRjIvQm r8bmeV8NMTH6BwrCOFEq9YESaIqTR5MGfIL8/xlwlAyaGSsA19MmXu0cm Q==; X-CSE-ConnectionGUID: 5in4gK6IRvmc3NkkeVxCMQ== X-CSE-MsgGUID: tjUB0WgYRsqVfESp9b9/cA== X-IronPort-AV: E=McAfee;i="6700,10204,11191"; a="35409393" X-IronPort-AV: E=Sophos;i="6.10,217,1719903600"; d="scan'208";a="35409393" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2024 09:01:48 -0700 X-CSE-ConnectionGUID: BUvuTxknQXeTFlj1hWLUJQ== X-CSE-MsgGUID: VXRhtHmDSM2DsFvkPdW7LA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,217,1719903600"; d="scan'208";a="97898098" Received: from smile.fi.intel.com ([10.237.72.54]) by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2024 09:01:45 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1so3JG-00000007Fbm-2XJr; Tue, 10 Sep 2024 19:01:42 +0300 Date: Tue, 10 Sep 2024 19:01:42 +0300 From: Andy Shevchenko To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Subject: Re: [PATCH] locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS Message-ID: References: <20240909182905.161156-1-longman@redhat.com> <5142d007-dc8b-4eea-b708-4ec2df08f90a@redhat.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5142d007-dc8b-4eea-b708-4ec2df08f90a@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Tue, Sep 10, 2024 at 11:47:17AM -0400, Waiman Long wrote: > On 9/10/24 04:16, Andy Shevchenko wrote: > > On Tue, Sep 10, 2024 at 11:15:54AM +0300, Andy Shevchenko wrote: > > > On Mon, Sep 09, 2024 at 02:29:05PM -0400, Waiman Long wrote: > > > > Both is_rwsem_reader_owned() and rwsem_owner() are currently only used when > > > > CONFIG_DEBUG_RWSEMS is defined. This causes a compilation error with clang > > > > when `make W=1` and CONFIG_WERROR=y: > > > > > > > > kernel/locking/rwsem.c:187:20: error: unused function 'is_rwsem_reader_owned' [-Werror,-Wunused-function] > > > > 187 | static inline bool is_rwsem_reader_owned(struct rw_semaphore *sem) > > > > | ^~~~~~~~~~~~~~~~~~~~~ > > > > kernel/locking/rwsem.c:271:35: error: unused function 'rwsem_owner' [-Werror,-Wunused-function] > > > > 271 | static inline struct task_struct *rwsem_owner(struct rw_semaphore *sem) > > > > | ^~~~~~~~~~~ > > > > > > > > Fix this by moving these two functions under the CONFIG_DEBUG_RWSEMS define. > > > At least this solves my issue, > > > Reviewed-by: Andy Shevchenko > > ...and > > > > Tested-by: Andy Shevchenko > > Thanks for the testing. > > No functional change is intended for this patch. Ingo & Peter, can this > patch lands in v6.12 or has to wait until v6.13? I see it already in PeterZ's tree. -- With Best Regards, Andy Shevchenko