From patchwork Sun Feb 4 17:31:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fabio M. De Francesco" X-Patchwork-Id: 19908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp533177dyb; Sun, 4 Feb 2024 13:10:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFt3eq2SqwvC02mhgDGjrKG1MRo323y0cr1fyCj3u2OYMfW7ZdWiP0pxKnrQ9WkImr3aNFb X-Received: by 2002:a05:6830:4413:b0:6dd:dd28:c711 with SMTP id q19-20020a056830441300b006dddd28c711mr9626537otv.36.1707081008734; Sun, 04 Feb 2024 13:10:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707081008; cv=pass; d=google.com; s=arc-20160816; b=gRM3Td5iio6BhoHqfyLUUo+v9dNz2dcZ5rvwMILSb6hhM8rCsY9JOZiJEKQtFswIuJ LeMRarjrUyqdEGGS0oeCCZsUWY2IQSO7EyPnUFixWxiCAqXVA64zrz0La8Heh61zaVwV Yemmm0BWeD0FgX4Oxtwatc0R7Op1DdteWbdOdB9/8O8hHmgZvtxZ9jbQ4WlahnnM9F+K Z8e6k0cKhz6m43eaoW1+CICNIs1aR9s1Q/OGTTUFVq2XGbwVDvFfXfGo+KPgbQOqAhAS noxLarMOAoNlutWwNqymi1Jfxa8SQnhx2Ob2GjdSIYnVsAEaF2bvNWRzD7k40SCcKJia za1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=H8A8mkMXIeg4pN9Qg3sM6CIXQyKa9cAcrXeNGwV/Dh4=; fh=cWSVWXRwneLmlikE09GNHgEE0JBLwrDO/gGgEmlrLeM=; b=yR1EqWmrmWkzXXjVmp8GH3iBJd0/DUnr673szOKOfnom6yXpIWYCutKIk8ucGqv8cI xZGUHB5wWP4mn6BhtPDL3UDFlQRl+VIgV+lrSwiUVXz93nG791cHG0EIU/JjR6PcVyAZ LUsIdvEUeTF9vSIwvAED+kemvVINqbUiZGj51Auf5VqqljSlE2YjYPMUhN/GLf2U1Yja NBNzVwy/wisYKmLIYrmt0x3QGPVkUYx/J0Bo4RxtHuzL9UevjmvSEUjnWFloJKBzox8b xoJMQieabigEB6XeYHtJod/JnpURFCbNdOwNHPb7m4Xj+d5FHMjOEhbRkQSkAMOU67zM 6EOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kpm1xIib; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-51827-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51827-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCVBVTi89k9KiU7Eo1d/DzJVJtw3/PPF8YAbNsq5UfIbimoESGu/6glYb5I5L2VoZq5Jq3vBtw2WxTHe18UoHY+DbacGBg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ee10-20020a0562140a4a00b0068081587ca4si6985249qvb.156.2024.02.04.13.10.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 13:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51827-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kpm1xIib; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-51827-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51827-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 38D381C21E3C for ; Sun, 4 Feb 2024 17:31:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A361D2511E; Sun, 4 Feb 2024 17:31:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kpm1xIib" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 EB0C02421F; Sun, 4 Feb 2024 17:31:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707067877; cv=none; b=mMmjt1c39wnguvEXMBruTju+8zYZ8aWn0rhDcHX5Q1u86e/qiN1euWNaKH2owgAtm+AU4x+b4YPQm9IHitInpVyof2hgPeR+VXxpTFLPPKmKtbj4aSEprpySFJU3KLclEndZzuNUwo6DEH1YwMw8G7qbR5sx+5yZ3tWWb92+Gs4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707067877; c=relaxed/simple; bh=SBchobUhFlbRKL9roZ8rvHypMRkQnDLsR7JiDyykqDo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DKvc2tf67oYkg1PRIMNcTsH+b9cKvsB+5a/6HJaGXmxoe6vtpsWUVOOea8/FHnmDsJQ84wKxx+w2UOyKQgEZg8BKWctZQJhkv5qFkbCFlrK2yKF0Ebd+kijxTIAimhPA3EUQ39bjj6Zl/AnynyJQ+OVwyYlJXVsbgIOFhUnsZQU= 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=kpm1xIib; arc=none smtp.client-ip=198.175.65.14 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707067876; x=1738603876; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SBchobUhFlbRKL9roZ8rvHypMRkQnDLsR7JiDyykqDo=; b=kpm1xIibuPXgHvc8fGrjbC4Nd9ccebJKExdGP/XjMwr+Sh5KXlWjIWRa pIcHtopk+h3tWUgtOio4f2oklNjaBdZza2gIqnoaVTe4olLRy5fOz4HG1 seRR6kJaKfFSlTE4sjatcSxICnuH0k/uT6aXxd5ux7rY0uupgsswUMLCE FvlACq/AA20o+n7uUb2q1+tshknHUL3Rc5FpVohON4jn4PG1d2GKc3kn9 5EAs4lS6docGBj0O+N3IHgkg01YP//ReZR2QfJUdqtKZzveYZKCIk22ge LE4YNTuE52j66DlmmUD+lXaC2u0JcJ2L1ZNrdT+tAGJPHIrIobnn3TWCy A==; X-IronPort-AV: E=McAfee;i="6600,9927,10973"; a="4225899" X-IronPort-AV: E=Sophos;i="6.05,242,1701158400"; d="scan'208";a="4225899" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2024 09:31:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,242,1701158400"; d="scan'208";a="31626380" Received: from fdefranc-mobl3.ger.corp.intel.com (HELO fdefranc-mobl3.intel.com) ([10.213.2.137]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2024 09:31:12 -0800 From: "Fabio M. De Francesco" To: Peter Zijlstra , Dan Williams , linux-kernel@vger.kernel.org Cc: Ingo Molnar , linux-cxl@vger.kernel.org, "Fabio M. De Francesco" , Ira Weiny Subject: [PATCH 0/2] Add cond_guard() to conditional guards Date: Sun, 4 Feb 2024 18:31:03 +0100 Message-ID: <20240204173105.935612-1-fabio.maria.de.francesco@linux.intel.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790004175892777573 X-GMAIL-MSGID: 1790004175892777573 Add cond_guard() macro to conditional guards and use it to replace an open-coded up_read() in show_targetN(). Cc: Peter Zijlstra Suggested-by: Dan Williams Suggested-by: Ira Weiny Fabio M. De Francesco (2): cleanup: Add cond_guard() to conditional guards cxl/region: Use cond_guard() in show_targetN() drivers/cxl/core/region.c | 16 ++++------------ include/linux/cleanup.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 12 deletions(-)