Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp109117lqe; Tue, 9 Apr 2024 16:43:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWqKLj9KhBOJg4YGpxaS1/W4uV1Gyl8+KrosdS/+6mYwqUibQC1ADpY0hiezIodmllFo4tEKBIFtTsWcVuDt2RDPrfnW6WUrzz1jrHGBw== X-Google-Smtp-Source: AGHT+IEXDbXwH5QFLusMdD2bv0j5d+jw8RVlmbXSDdJ3cAD0dgJjWjHOmoEyI0+TYr2duLrxLf9M X-Received: by 2002:a17:903:185:b0:1e4:b16e:7f10 with SMTP id z5-20020a170903018500b001e4b16e7f10mr1294784plg.33.1712706221404; Tue, 09 Apr 2024 16:43:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712706221; cv=pass; d=google.com; s=arc-20160816; b=1Gy/ysaSJqTck32ODrjImZ9Vd91Ue63TFlN8aI/Fb4eOlYRSXwuaT/ZcSdXVP0MoN+ 8rmUeZp/xo80tAGyxMfF2n0v6K44VA0lNkX5vsKpwwLcy42f533dejLaWBzn5HISSFO7 So0xjGXOV6MZDspQYiyodZiJP20dexrJOzGCbzAqErJTJTr7+TU+5d0En9ky7E0Em/P1 DcZ3r7F+uIhelGSSk5fsupsH4epx2qSj6Kkph+MliDZrjWhxIlH+w3WQ9okZAG2e0Xmt jBhsxQVS7HjxyTSb0GCdGMibk1Pix4ac8JeBqmCiz3FJmSTx8bwyGgSGi/7gW0zEm3kK dFvg== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HlRJn2pUM53IPpfaPnh/VctXU06xkC02a0QRCkdjJ+o=; fh=ff/2rgOSjULH/L3z/Y+PR5zkUTuzVJ4XEK4mTDNeRIg=; b=KpYiR8tfh7KoPnsmV0nhs9YaXl4sLD0xluqB7l+vK2LzB1uDQcO/qawU92jhF+nhE5 6YR9N5u5Iy13I+xYOZcZ2IGgpk2eAOjwrpQ01gDjo0qC2qoGORHst1vh5FHWx61LFGt5 iKkylPw/ws2r94aQ1lr/B1l5IXB+BkYREE+76GdiAwK0MlzoAdXogobnQJ22D49kl1+V EgNvRm3LO48+EIxx1mFKtT+V75/iJU+4Wkoiilj3k6p/PGoX3DNd7xyJ5s3mYmcskkBI yyKollgNERkpylVxgeWsWm3elf0NZQYaSig0UDyVfgZar+nxgY+WcvqsLaHxNhNQkXEK zFYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lfrx7O2q; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-137712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137712-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q9-20020a170902a3c900b001e47f894beesi2979425plb.251.2024.04.09.16.43.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 16:43:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lfrx7O2q; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-137712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137712-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C8D99B22CDD for ; Tue, 9 Apr 2024 23:43:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5BAB15A4B6; Tue, 9 Apr 2024 23:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Lfrx7O2q" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 272E9159584; Tue, 9 Apr 2024 23:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712706120; cv=none; b=TDRlkGpxtp9JGrk8j9x38Kbffz0FMjKBKLS74tLNyg5P/Md2jxtAg9jeI6oXlykg93p0rccqChJrCBZv/5oKCrcCFIiv/cOO+Pe7pshwNebY18O3hh3PkzgN0/e4KyS9B3TWvQtavaqxZ3s3znP2H1pg+ue3zRh1NMsMX3WgJ8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712706120; c=relaxed/simple; bh=mQhWXKPhUS8SNMgiD/05CRPzutPNt0WnvhIEFUacyp0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lTcH4ngpSeIA24GcWK/0EzsYYwAJWlkC5MSaiaOjdepBIRNwB18pW4Ih4kbwHdV4bGzbpEzb656V9eI1xjRN6+wZPYNbZmsn/Y1zCh0/E+FS1znAmQmJJ6JzpEoUlMFUX5rLpiz8dt7pudMv/LoXLp0s57J+bCDk6uDutQcCxLc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Lfrx7O2q; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712706119; x=1744242119; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mQhWXKPhUS8SNMgiD/05CRPzutPNt0WnvhIEFUacyp0=; b=Lfrx7O2qwH6RnT1ydsV0G6egAKdI1EMGkgUC7joi5Pk1LqohfGUWNeOH l26eSIO8Ap+T/TDDtRbFPr2LUXhPyAD5xuTrvuujnk/lJ1Qrydnrl2/ZK fr/1swjyz+zGpmgFwghIZ196kdutgyBbbSFfZOHHlgVC98i4NUUqFVxZ6 H8Oo0GYG9R+56nfeV0CsrLvmaSjXKVOi0uICLN4Y7Pj5USDT9sWlxTf6r Lep2vvB7p/OIoWacLkc3AKFWrxuYQvs80wbATbexSvgjrHD1vD0GVCN1A FzUhoU7JJlP+AJl+MPaDJFRxe1YDzm5ESq8rdMUdkN594QbjlnJ1kco9r Q==; X-CSE-ConnectionGUID: h/G2L276QTqZWcxl5nr++w== X-CSE-MsgGUID: 5JET+GnTQBeBhAuor9PaRg== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="33455118" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="33455118" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 16:41:59 -0700 X-CSE-ConnectionGUID: MQTPzM6oS+mtCptV+q+HFQ== X-CSE-MsgGUID: RVmBPh18SC6H/M6ApUF+gA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="20261817" Received: from sj-4150-psse-sw-opae-dev3.sj.intel.com ([10.233.115.74]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 16:41:59 -0700 From: Peter Colberg To: Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Russ Weight , Marco Pagani , Matthew Gerlach , Peter Colberg Subject: [RFC PATCH v2 7/9] fpga: dfl: migrate DFL support header to dfl_feature_dev_data Date: Tue, 9 Apr 2024 19:39:40 -0400 Message-ID: <20240409233942.828440-8-peter.colberg@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240409233942.828440-1-peter.colberg@intel.com> References: <20240409233942.828440-1-peter.colberg@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This change separates out most of the symbol name changes required by this patch series for the file: drivers/fpga/dfl.h. This is done to split a single monolithic change into multiple, smaller patches at the request of the maintainer. Signed-off-by: Peter Colberg --- v2: - Split monolithic patch into series at request of maintainer --- drivers/fpga/dfl.h | 46 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/fpga/dfl.h b/drivers/fpga/dfl.h index d724614796cb..b700f5bb7be7 100644 --- a/drivers/fpga/dfl.h +++ b/drivers/fpga/dfl.h @@ -333,55 +333,51 @@ struct dfl_feature_platform_data { }; static inline -int dfl_feature_dev_use_begin(struct dfl_feature_platform_data *pdata, +int dfl_feature_dev_use_begin(struct dfl_feature_dev_data *fdata, bool excl) { - if (pdata->excl_open) + if (fdata->excl_open) return -EBUSY; if (excl) { - if (pdata->open_count) + if (fdata->open_count) return -EBUSY; - pdata->excl_open = true; + fdata->excl_open = true; } - pdata->open_count++; + fdata->open_count++; return 0; } static inline -void dfl_feature_dev_use_end(struct dfl_feature_platform_data *pdata) +void dfl_feature_dev_use_end(struct dfl_feature_dev_data *fdata) { - pdata->excl_open = false; + fdata->excl_open = false; - if (WARN_ON(pdata->open_count <= 0)) + if (WARN_ON(fdata->open_count <= 0)) return; - pdata->open_count--; + fdata->open_count--; } static inline -int dfl_feature_dev_use_count(struct dfl_feature_platform_data *pdata) +int dfl_feature_dev_use_count(struct dfl_feature_dev_data *fdata) { - return pdata->open_count; + return fdata->open_count; } -#define dfl_fpga_fdata_set_private dfl_fpga_pdata_set_private - static inline -void dfl_fpga_pdata_set_private(struct dfl_feature_platform_data *pdata, +void dfl_fpga_fdata_set_private(struct dfl_feature_dev_data *fdata, void *private) { - pdata->private = private; + fdata->private = private; } -#define dfl_fpga_fdata_get_private dfl_fpga_pdata_get_private - static inline -void *dfl_fpga_pdata_get_private(struct dfl_feature_platform_data *pdata) +void *dfl_fpga_fdata_get_private(struct dfl_feature_dev_data *fdata) { - return pdata->private; + return fdata->private; } struct dfl_feature_ops { @@ -414,9 +410,9 @@ struct platform_device *dfl_fpga_inode_to_feature_dev(struct inode *inode) return pdata->dev; } -#define dfl_fpga_dev_for_each_feature(pdata, feature) \ - for ((feature) = (pdata)->features; \ - (feature) < (pdata)->features + (pdata)->num; (feature)++) +#define dfl_fpga_dev_for_each_feature(fdata, feature) \ + for ((feature) = (fdata)->features; \ + (feature) < (fdata)->features + (fdata)->num; (feature)++) static inline struct dfl_feature *dfl_get_feature_by_id(struct device *dev, u16 id) @@ -445,12 +441,10 @@ void __iomem *dfl_get_feature_ioaddr_by_id(struct device *dev, u16 id) #define to_dfl_feature_dev_data dev_get_platdata -#define dfl_fpga_fdata_to_parent dfl_fpga_pdata_to_parent - static inline -struct device *dfl_fpga_pdata_to_parent(struct dfl_feature_platform_data *pdata) +struct device *dfl_fpga_fdata_to_parent(struct dfl_feature_dev_data *fdata) { - return pdata->dev->dev.parent->parent; + return fdata->dev->dev.parent->parent; } static inline bool dfl_feature_is_fme(void __iomem *base) -- 2.44.0