From patchwork Thu Feb 29 16:23:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 776904 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 C0B4A4AEE5; Thu, 29 Feb 2024 16:27:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224079; cv=none; b=KX8pY2H9xYod3fqQV1HOdID8mPczH9aj5e/tDbh/n0M72f+kUdI477XAwM1nYTfXgE2+a1onRrLQy26H4df+bHvPA2M4IHLq7or8dAAg0mqIQuO8WkctYTVt11K3wqueW0h8Asr3zJkQmwRoOfF+sKPLx85b3AlcBvU79JkHVBo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224079; c=relaxed/simple; bh=BW1c/RkhUJtoUJ2pTjmMw2HsXxDX+1fRKgzP9b4AcP8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M/9NaJqhPWk3anO8UuFUM2VRv1m2LAyoJDeB7YOn0myyugfe9XFd9Z4YtiPr+24sBbmgdLOpRHSRohOyBks8yL92QsR5kE1PM4G5qDDs9B6lGhPyfMnFboNHkvikIV41D+crhtZAo/kS6dmsUon4kvQsYcbs9kKcnNPKHnukY8U= 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=SutE6Hel; arc=none smtp.client-ip=192.198.163.13 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="SutE6Hel" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709224078; x=1740760078; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BW1c/RkhUJtoUJ2pTjmMw2HsXxDX+1fRKgzP9b4AcP8=; b=SutE6HelF80K0FRn3UqyDOn5VqCnICsSi/Bon+85irDR61pPQhhRRmic Xj7a4gxx5F25U5TJaUEraxdXjI8DuZBHbcU10V2XF9r+/ji/Z2pRCL7aa Y52EDgRKHvp9yJgmgpv4Ux9oTIrIIMwZ+jmOUeQPO+M1/Vh9iq2Ppqip2 Lisf0VBVZoHiSWP/gCn+GueBSlhMvqUUgzTFxyeldSKBZZDqMGiKDtGNa tbb1ptbjzWwElR9hbARoLpFAxTe7khH8e4VdiCmm7na/FlWaeaTVOzM8s 2G1IN0qOUGYdM0sHvPsWwwQBY/m5gqVIQUkIkaAowuwO36ICJgHD//LPo g==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="6660713" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="6660713" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 08:27:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="937036136" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="937036136" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 29 Feb 2024 08:27:45 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9055619F; Thu, 29 Feb 2024 18:27:44 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Sakari Ailus , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Len Brown , Jonathan Cameron , Lars-Peter Clausen , Saravana Kannan Subject: [PATCH v3 1/4] driver core: Drop unneeded 'extern' keyword in fwnode.h Date: Thu, 29 Feb 2024 18:23:43 +0200 Message-ID: <20240229162741.3854912-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240229162741.3854912-1-andriy.shevchenko@linux.intel.com> References: <20240229162741.3854912-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 We do not use 'extern' keyword with functions. Remove the last one mistakenly added to fwnode.h. Reviewed-by: Sakari Ailus Acked-by: Saravana Kannan Acked-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko --- include/linux/fwnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 2a72f55d26eb..2d23a14857c7 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -209,9 +209,9 @@ static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode, fwnode->flags &= ~FWNODE_FLAG_INITIALIZED; } -extern bool fw_devlink_is_strict(void); int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup); void fwnode_links_purge(struct fwnode_handle *fwnode); void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode); +bool fw_devlink_is_strict(void); #endif From patchwork Thu Feb 29 16:23:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 777541 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 913E34AEC8; Thu, 29 Feb 2024 16:27:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224078; cv=none; b=J/WzwuCmrFng/7eUO2y79pMScFpcWZwc7HjDp24kXxZT4cundvi7mg74TLgMkURu7mUQYv3mA1gnF04Be1CI9Jjlw1mgR5bOAI1rU2x/LcZcjfgKZp13jNNqHeKcFrGpatBacSBY7Ghn2BMCyLgiPhodzUGW09OYpFSSrknm3gs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224078; c=relaxed/simple; bh=FWCxX58oaTp/I5tWymdZXgSX0/MgNSs17Vpy+x3zz+0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kx1hYF8rxB1zBjfoUHgPogyn2haoiybX29rHgFx2+bIpNF3xX1gqCP255YNHC15X9TPrW1nmX2rkSIUULOeW+MklGow5mP9te7b9alOoT3qPBzEhMQNe6d/+5emxrdR/MZb7pRTBdCiGzWJAQKNz0HQ5PwYfAuJnF+dqjygYS+s= 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=mLIYjEPx; arc=none smtp.client-ip=192.198.163.13 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="mLIYjEPx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709224076; x=1740760076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FWCxX58oaTp/I5tWymdZXgSX0/MgNSs17Vpy+x3zz+0=; b=mLIYjEPx7Lm9tqa7f8tPQNBAxUhupAkG/Vr03l2/D7nYI+2Q1h2OyBdL Dhfcm+lJjoewkKgbmuLGOBcUmfZK+05VVjxtKM1t8jVmOixnxZ5XAkylL EZMYeWNeD7gBZMGxAZSe8BKANnSDOcvfkhw4Imlr43M/dJcXRteYZUDHK v69w73caJePznmaNOTLqH0ITuPtU2ojgf9MGaSPDYuj16jM8VNnvCLW6H kgMVnoUIUWPdX5QHI8SyECyNz9veIp9J6F1bSpH8U6cPbvEP7eBiPPDNJ w0YejxSAzDXdVxFQbjgfOlLv/+CfBWnCvx+JlBRJ6jBOuYIcBt3nSEUlL w==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="6660694" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="6660694" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 08:27:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="937036139" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="937036139" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 29 Feb 2024 08:27:45 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A0C48476; Thu, 29 Feb 2024 18:27:44 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Sakari Ailus , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Len Brown , Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH v3 2/4] driver core: Move fw_devlink stuff to where it belongs Date: Thu, 29 Feb 2024 18:23:44 +0200 Message-ID: <20240229162741.3854912-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240229162741.3854912-1-andriy.shevchenko@linux.intel.com> References: <20240229162741.3854912-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 A few APIs, i.e. fwnode_is_ancestor_of(), fwnode_get_next_parent_dev(), and get_dev_from_fwnode(), that belong specifically to the fw_devlink APIs, may be static, but they are not. Resolve this mess by moving them to the driver/base/core where the all users are being resided and make static. No functional changes intended. Reviewed-by: Sakari Ailus Acked-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko --- drivers/base/core.c | 58 ++++++++++++++++++++++++++++++++++++++++ drivers/base/property.c | 56 -------------------------------------- include/linux/fwnode.h | 1 - include/linux/property.h | 2 -- 4 files changed, 58 insertions(+), 59 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 9828da9b933c..35ccd8bb2c9b 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1871,6 +1871,7 @@ static void fw_devlink_unblock_consumers(struct device *dev) device_links_write_unlock(); } +#define get_dev_from_fwnode(fwnode) get_device((fwnode)->dev) static bool fwnode_init_without_drv(struct fwnode_handle *fwnode) { @@ -1901,6 +1902,63 @@ static bool fwnode_ancestor_init_without_drv(struct fwnode_handle *fwnode) return false; } +/** + * fwnode_is_ancestor_of - Test if @ancestor is ancestor of @child + * @ancestor: Firmware which is tested for being an ancestor + * @child: Firmware which is tested for being the child + * + * A node is considered an ancestor of itself too. + * + * Return: true if @ancestor is an ancestor of @child. Otherwise, returns false. + */ +static bool fwnode_is_ancestor_of(const struct fwnode_handle *ancestor, + const struct fwnode_handle *child) +{ + struct fwnode_handle *parent; + + if (IS_ERR_OR_NULL(ancestor)) + return false; + + if (child == ancestor) + return true; + + fwnode_for_each_parent_node(child, parent) { + if (parent == ancestor) { + fwnode_handle_put(parent); + return true; + } + } + return false; +} + +/** + * fwnode_get_next_parent_dev - Find device of closest ancestor fwnode + * @fwnode: firmware node + * + * Given a firmware node (@fwnode), this function finds its closest ancestor + * firmware node that has a corresponding struct device and returns that struct + * device. + * + * The caller is responsible for calling put_device() on the returned device + * pointer. + * + * Return: a pointer to the device of the @fwnode's closest ancestor. + */ +static struct device *fwnode_get_next_parent_dev(const struct fwnode_handle *fwnode) +{ + struct fwnode_handle *parent; + struct device *dev; + + fwnode_for_each_parent_node(fwnode, parent) { + dev = get_dev_from_fwnode(parent); + if (dev) { + fwnode_handle_put(parent); + return dev; + } + } + return NULL; +} + /** * __fw_devlink_relax_cycles - Relax and mark dependency cycles. * @con: Potential consumer device. diff --git a/drivers/base/property.c b/drivers/base/property.c index 53e42031c646..d983a4dea105 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -699,34 +699,6 @@ struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode) } EXPORT_SYMBOL_GPL(fwnode_get_next_parent); -/** - * fwnode_get_next_parent_dev - Find device of closest ancestor fwnode - * @fwnode: firmware node - * - * Given a firmware node (@fwnode), this function finds its closest ancestor - * firmware node that has a corresponding struct device and returns that struct - * device. - * - * The caller is responsible for calling put_device() on the returned device - * pointer. - * - * Return: a pointer to the device of the @fwnode's closest ancestor. - */ -struct device *fwnode_get_next_parent_dev(const struct fwnode_handle *fwnode) -{ - struct fwnode_handle *parent; - struct device *dev; - - fwnode_for_each_parent_node(fwnode, parent) { - dev = get_dev_from_fwnode(parent); - if (dev) { - fwnode_handle_put(parent); - return dev; - } - } - return NULL; -} - /** * fwnode_count_parents - Return the number of parents a node has * @fwnode: The node the parents of which are to be counted @@ -773,34 +745,6 @@ struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode, } EXPORT_SYMBOL_GPL(fwnode_get_nth_parent); -/** - * fwnode_is_ancestor_of - Test if @ancestor is ancestor of @child - * @ancestor: Firmware which is tested for being an ancestor - * @child: Firmware which is tested for being the child - * - * A node is considered an ancestor of itself too. - * - * Return: true if @ancestor is an ancestor of @child. Otherwise, returns false. - */ -bool fwnode_is_ancestor_of(const struct fwnode_handle *ancestor, const struct fwnode_handle *child) -{ - struct fwnode_handle *parent; - - if (IS_ERR_OR_NULL(ancestor)) - return false; - - if (child == ancestor) - return true; - - fwnode_for_each_parent_node(child, parent) { - if (parent == ancestor) { - fwnode_handle_put(parent); - return true; - } - } - return false; -} - /** * fwnode_get_next_child_node - Return the next child node handle for a node * @fwnode: Firmware node to find the next child node for. diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 2d23a14857c7..416cbe72f0c7 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -187,7 +187,6 @@ struct fwnode_operations { if (fwnode_has_op(fwnode, op)) \ (fwnode)->ops->op(fwnode, ## __VA_ARGS__); \ } while (false) -#define get_dev_from_fwnode(fwnode) get_device((fwnode)->dev) static inline void fwnode_init(struct fwnode_handle *fwnode, const struct fwnode_operations *ops) diff --git a/include/linux/property.h b/include/linux/property.h index eefd662a2f9d..420420a1d8ad 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -157,11 +157,9 @@ struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode); for (parent = fwnode_get_parent(fwnode); parent; \ parent = fwnode_get_next_parent(parent)) -struct device *fwnode_get_next_parent_dev(const struct fwnode_handle *fwnode); unsigned int fwnode_count_parents(const struct fwnode_handle *fwn); struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwn, unsigned int depth); -bool fwnode_is_ancestor_of(const struct fwnode_handle *ancestor, const struct fwnode_handle *child); struct fwnode_handle *fwnode_get_next_child_node( const struct fwnode_handle *fwnode, struct fwnode_handle *child); struct fwnode_handle *fwnode_get_next_available_child_node( From patchwork Thu Feb 29 16:23:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 776906 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 1DAB1160640; Thu, 29 Feb 2024 16:27:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224073; cv=none; b=C5PCKnILoDWSnFAVHYXY4Eb5Q2C+Er/DmIdAQCAmxVrUgJrIl2EVKqvC0E4x1bxGrTgIEqlLKLdh9k2mDKNr+S2pp6DUacZPE1dtfp1XfXN6FWNLh923Qmso5UKe3TF19mVxNzR5niE1FoHdruCiY4aYFdTb9NVDilbBkL7+vio= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224073; c=relaxed/simple; bh=oWNkaLsVsQ3UsF0BA0iw8F4jI5iyxmqhy991ZBrnwKQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IpRyH2CEBDZ8tyNYzaF+9f4/8M/5L/6rgKrj0zcvfLj8E2+8Af4U1j1lilE5KFlNCO3F5+ssyiAs1vTv6eldiJr5Hqpuzt7/WbWpFFccZGBxqMVk4GXmZC6IuTR/dDvwL84SVGFWOWRW1ptui45aLeTm35RURPWk8plZe7UR63c= 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=FiGW+x2s; arc=none smtp.client-ip=192.198.163.13 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="FiGW+x2s" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709224071; x=1740760071; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oWNkaLsVsQ3UsF0BA0iw8F4jI5iyxmqhy991ZBrnwKQ=; b=FiGW+x2sPE24FPxuCMP+1dywEgqGOF8MQzUdxYwe2o0AbadXqErVjjQO 0i+qKRpRNwg65F1mwI0dbkF2k8OGi7+NE5NsrIJHqNRihC2k6QsZ8RAI3 Zu7Vw+/Cdgxzn+bRR2ixoxmn5QiJI/LjRWEcE3fK/mmEc1TkOVXGFHDBy 1zGnD6LoCJXI6gKSIjjh52z7qI1OCzWpEHG7nUsyCKEYl+DC9COFPefBp EE1wHPmzbUQeyJP7/WyNFJF89qaLD7wy/hc8+MC0Qcd1ts7+C3F4VYRwF EJpB01UliTX9one1pa92/3gw9RMGuDpdZQUNO5d+zcu8k60oG8JoTukJE A==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="6660689" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="6660689" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 08:27:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="937036138" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="937036138" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 29 Feb 2024 08:27:45 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A67883BC; Thu, 29 Feb 2024 18:27:44 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Sakari Ailus , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Len Brown , Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH v3 3/4] device property: Move enum dev_dma_attr to fwnode.h Date: Thu, 29 Feb 2024 18:23:45 +0200 Message-ID: <20240229162741.3854912-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240229162741.3854912-1-andriy.shevchenko@linux.intel.com> References: <20240229162741.3854912-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The struct fwnode_operations defines one of the callback to return enum dev_dma_attr. But this currently is defined in property.h. Move it to the correct location. Fixes: 8c756a0a2de1 ("device property: Convert device_{dma_supported,get_dma_attr} to fwnode") Reviewed-by: Sakari Ailus Acked-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko --- include/linux/fwnode.h | 6 ++++++ include/linux/property.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 416cbe72f0c7..4228c45d5ccc 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -14,6 +14,12 @@ #include #include +enum dev_dma_attr { + DEV_DMA_NOT_SUPPORTED, + DEV_DMA_NON_COHERENT, + DEV_DMA_COHERENT, +}; + struct fwnode_operations; struct device; diff --git a/include/linux/property.h b/include/linux/property.h index 420420a1d8ad..5761878d42c7 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -28,12 +28,6 @@ enum dev_prop_type { DEV_PROP_REF, }; -enum dev_dma_attr { - DEV_DMA_NOT_SUPPORTED, - DEV_DMA_NON_COHERENT, - DEV_DMA_COHERENT, -}; - const struct fwnode_handle *__dev_fwnode_const(const struct device *dev); struct fwnode_handle *__dev_fwnode(struct device *dev); #define dev_fwnode(dev) \ From patchwork Thu Feb 29 16:23:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 776905 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 EF8CA160657; Thu, 29 Feb 2024 16:27:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224077; cv=none; b=ocZ9hH0129KY62tnz4Hhzn7jDtXJTd5rg1n66AL1sIOG6Nb45BELjJshb+Gq3YbXDDSlsHr4D3jtQCIfxZtrlnJGTmPHTXL99sSs9IY2fw0Hbpv6lyrnA4WPBU1AvXxPzcNyEeV1owugLJakoeGWFJrisMhkjAovWHsbT57+2ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224077; c=relaxed/simple; bh=FZ4hzcjZ3N2IVSb6CQTAkW7bY97q2ac7mesHQV4f33s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H22IJbaS9p8DbmJ/GNrdHPmbgVmZE7IkIYrFhssPD22dwF1fADwcTznP08iMNC1OupL3Su/kzcd0F/PlfaseYyty7mjfsTuzXBz7wDyHA/PtkClb9aIM0icb+3G6JP5mfWyCzYkhf0RFRkVTEX+saM4DnzXvVLrX0P0wJp/8z8s= 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=hPUpE9ty; arc=none smtp.client-ip=192.198.163.13 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="hPUpE9ty" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709224075; x=1740760075; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FZ4hzcjZ3N2IVSb6CQTAkW7bY97q2ac7mesHQV4f33s=; b=hPUpE9tyZf54LEKYI69bmcQZi1kTQDHVxQ2Gd9GnzokOvdmwpdg/zrNf HF26moOhPO/GqjMAeHCxIzdg8rU7+Ypu00XYxiMwBcZWtNbsnTPSL61yo D4DTKevR0v6tMwpO9KwMAanLefTuvx4sez6tO8yvclENTQCyXcu4eQs2h vnes3gcheYwjWwkM73Z1+Iq0v2Wl55AUGgDDKIs2sR/f9eJargUynG4Ra oZIKnbdUD2m4pqK0RWVuXL2TkziX3XYH2Aqwj2LCG8P/jMqw+PdgHSSHO qmROu/9VpBLmxDfdzKmqyNmPK9cjNcHgrDeVq4lUqDepHZmDVbscuiZXK Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="6660709" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="6660709" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 08:27:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="937036137" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="937036137" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 29 Feb 2024 08:27:45 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id BB8384E9; Thu, 29 Feb 2024 18:27:44 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Sakari Ailus , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Len Brown , Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH v3 4/4] device property: Don't use "proxy" headers Date: Thu, 29 Feb 2024 18:23:46 +0200 Message-ID: <20240229162741.3854912-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240229162741.3854912-1-andriy.shevchenko@linux.intel.com> References: <20240229162741.3854912-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update header inclusions to follow IWYU (Include What You Use) principle. Reviewed-by: Sakari Ailus Acked-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko --- drivers/base/property.c | 11 ++++++----- drivers/base/swnode.c | 13 ++++++++++++- include/linux/fwnode.h | 4 ++-- include/linux/property.h | 1 + 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/drivers/base/property.c b/drivers/base/property.c index d983a4dea105..6a3a434d0d6f 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -7,15 +7,16 @@ * Mika Westerberg */ -#include +#include +#include #include -#include +#include #include -#include -#include -#include #include #include +#include +#include +#include struct fwnode_handle *__dev_fwnode(struct device *dev) { diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index 36512fb75a20..eb6eb25b343b 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -6,10 +6,21 @@ * Author: Heikki Krogerus */ +#include #include -#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include #include "base.h" diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 4228c45d5ccc..80f3cd91b471 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -9,10 +9,10 @@ #ifndef _LINUX_FWNODE_H_ #define _LINUX_FWNODE_H_ -#include -#include #include #include +#include +#include enum dev_dma_attr { DEV_DMA_NOT_SUPPORTED, diff --git a/include/linux/property.h b/include/linux/property.h index 5761878d42c7..61fc20e5f81f 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -11,6 +11,7 @@ #define _LINUX_PROPERTY_H_ #include +#include #include #include #include