From patchwork Fri Feb 23 15:54:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 775550 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 E0C6383CD2; Fri, 23 Feb 2024 15:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703870; cv=none; b=YyfHCcMzNYWFGCYsJ2rJy6+VuBVAQ4nAjARXOx7HcUp9RV8QSGDYsGBoNyL2f7X3uZ3bbhLM4Hl0gvcLTqJNy/VbAtc7Jd5G6UIrM7pLUoQlQJTn4xPS4ZByJm53k/igdcVuIgriqDLZXtEmfFs8nvB6t7iRRRAJv+P67jpDpfM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703870; c=relaxed/simple; bh=+YtkShM4oId0r6yrcwRkYoBoBjAp016GnUVoy6Y019w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Eaa8Ct6NdNXerpolkZCbmC9bx5AyZxcIGTehm5FGnh1XMFwxYq2AwhklTNbmryMszU9vk2aVEkEtijBPMWvAHnAGeOza0jP7EqqsVuw2bKIq8gmO+4BGiKEJ6z1bjjnC9T83XlegwDXjlYN5zx02N/FVItr4Og1O6BSGEgm+ozU= 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=eIXyDoh+; arc=none smtp.client-ip=192.198.163.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="eIXyDoh+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708703869; x=1740239869; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+YtkShM4oId0r6yrcwRkYoBoBjAp016GnUVoy6Y019w=; b=eIXyDoh+eRtfyTIAj41njgR1bvwgKYjGaOVqIoDPtH78w4eTa+F/tIJB 3va+s2fy11Ak6OQbUEfpiFWDLXvX2dBghQnZSANR8ey7H8GcYB/8cgzgC PYv1UlTXlJvtZS3C3i5+DDM+TKark2fR1Y4bSj4X5NDScSJ6oDxHFiZlb x/BZS1NZmEKBXPYyZ+nAjk9B0nPbG8Bff9YLIVUIJNj4r7DRl/JnMGwWq ADMacYd/Vblv7/+0g0Z2k1ZJ5Pt8X0Qg0xTL4Grm7hhiCQ/tDuInbHPHT wYRpleaNWTuLy1yc4X0N8SePzfgiXI7HDqebFezXCkYnchL1MXoGDrwWA A==; X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="3187547" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="3187547" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 07:57:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="937025348" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="937025348" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2024 07:57:41 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0A7431A5; Fri, 23 Feb 2024 17:57:40 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Christophe JAILLET , Sakari Ailus , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Len Brown , Saravana Kannan Subject: [PATCH v2 1/4] driver core: Drop unneeded 'extern' keyword in fwnode.h Date: Fri, 23 Feb 2024 17:54:36 +0200 Message-ID: <20240223155731.858412-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240223155731.858412-1-andriy.shevchenko@linux.intel.com> References: <20240223155731.858412-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 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 Fri Feb 23 15:54:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 775551 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 9D94882C94; Fri, 23 Feb 2024 15:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703868; cv=none; b=aF3EI00sD3Deq0hEigsrYuSdykV3BlcBcANZ4AvyIVXqUM2gzlfkaBVKnG/7FBVEsDJZhoY+3YAc+YhCZHDr//FcEuAMCkrGgz5VoJr3BPTThzqNci0imla61FXoqif+xBicwaUBfvhmOvThztWfwswQDFkmxJbg1XZQ87oalwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703868; c=relaxed/simple; bh=gqrb+PGYOs5LLfSJLIoNp2Y40YeJ+CmorKnMSDQ5124=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hj4dFTk1hxFdE5xMpKqqqnJRg/qSNNM/O9FOTWmag+lW72NlQxnEjGWQzTgqzP8mhz0WAzwZ+V0GmUvSLAC8oQMDihD5AsG5qdiDowiOxQ222KKMG/XJswRFhm+ph7hmvsyFxEIk/OXRFZItgDujV8cCeazFf1cEETfKn8AIS9E= 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=e1BXG7/B; arc=none smtp.client-ip=192.198.163.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="e1BXG7/B" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708703867; x=1740239867; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gqrb+PGYOs5LLfSJLIoNp2Y40YeJ+CmorKnMSDQ5124=; b=e1BXG7/BR0FwHA5zlSBrY6vGKPhCYvjUd3rT544mRebBn2ZjwXccK952 B1g+eyCIvpfU6kuWgGshKs2AG7NXBL3jenQS6/yv3uW+tqyVOT3xKivFn 5n++o03lWq7T6rwarwV41Pk0KjETrNtw0G+2l106qV3AYSY1Abed2K9zp RPTo3Jh2a7xs85ok4VAMiMxaW/K64x9oQGcjz9CDVolo8oosIvCPalfoe wNi+v9Nd1lQsN8uR+WA23i8OW1t1wqYNKoQ42i3hYXyGdDYiob0whsZQd RXirpt/DS6l2NIEclZ7byGlFaBF8JnMn/AWVorXD8z+hnKzLE6Pww1K+O A==; X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="3187534" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="3187534" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 07:57:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="937025346" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="937025346" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2024 07:57:41 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1F1E34F1; Fri, 23 Feb 2024 17:57:40 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Christophe JAILLET , Sakari Ailus , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Len Brown Subject: [PATCH v2 2/4] driver core: Move fw_devlink stuff to where it belongs Date: Fri, 23 Feb 2024 17:54:37 +0200 Message-ID: <20240223155731.858412-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240223155731.858412-1-andriy.shevchenko@linux.intel.com> References: <20240223155731.858412-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 that belong specifically to the fw_devlink APIs - are exposed to others without need - prevents device property code to be cleaned up in the future Resolve this mess by moving fw_devlink code to where it belongs and hide from others. Reviewed-by: Sakari Ailus 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 a1b01ab42052..afa1bf2b3c5a 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 e6516d0b7d52..284ff79ebf03 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -156,11 +156,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 Fri Feb 23 15:54:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 775179 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 F369584A29; Fri, 23 Feb 2024 15:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703871; cv=none; b=heaAJHtNfsIMsWnjuJwik1M6OrfFwAp2omapsGNJoYNeuxpXk/t1him5AOyNy1WCe8TAQfRLX7emkgu1tz9oQtCNrRpkg/w8vzpHErsi5T61oFCqCUMyk/I3oplxMF8/KIzkx4VXHafKEDqN0q2k4UUTNukv1PgqUki/03an7BY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703871; c=relaxed/simple; bh=E4o0k4MiZVoO6lfp4ioi+ARzdEWQo43M1LChrrkEdsI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a0RAqgOaDv+OTKOHHoLjLH01Af4gYmtcWbchrJGPhDTrlg3Nic0BRCAzqYQefz3HvsfmwLYHEu1+Ppwgnv8Bxw+BJq2UU0Er3KlBelMtsUo8sjZmsz62gO1RSiIIt0G1PJf0+y9UyEhuN4N45cxFdBCWPJ6tfpepqrnPmpWOKno= 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=IBu47pUz; arc=none smtp.client-ip=192.198.163.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IBu47pUz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708703870; x=1740239870; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E4o0k4MiZVoO6lfp4ioi+ARzdEWQo43M1LChrrkEdsI=; b=IBu47pUzTDvsNqThtr5BzLBxD+oWz3fWIcXu2UQMV9ns8xgaXoxgdAPO OwWmxZZJAbR6QOXOCeQY44PyDjSz+mf9faDXLPCPYmBxz+Y7iDVmEV+cc KyDLvmWBfMgZOgTaqmNbto/wLOqRiSNkQ9jXHUBoZ2rZTCLgghWMOjWub b3xORlsymuUM7eYEx/HybeMGbusUNCYp4kG8F4JK7LIpJzYEX6PCoiX6O Bn7f8Dbnoe3/eAefpo78DmtzDn+cv2oJEXOjLLs32aJOSLg0GKNnp5AEQ Wbihql8FR59kD5+p8lsJBahvzHQfOIkRgF4pruMeUz0tdzRe49/1J4ZFr g==; X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="3187528" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="3187528" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 07:57:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="937025347" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="937025347" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2024 07:57:41 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 252FD4A5; Fri, 23 Feb 2024 17:57:40 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Christophe JAILLET , Sakari Ailus , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Len Brown Subject: [PATCH v2 3/4] device property: Move enum dev_dma_attr to fwnode.h Date: Fri, 23 Feb 2024 17:54:38 +0200 Message-ID: <20240223155731.858412-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240223155731.858412-1-andriy.shevchenko@linux.intel.com> References: <20240223155731.858412-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 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 284ff79ebf03..1f0135e24d00 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -27,12 +27,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 Fri Feb 23 15:54:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 775180 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 5EF1A82D6F; Fri, 23 Feb 2024 15:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703869; cv=none; b=DNzEdqL97oc97DqhhjA9LWiwEkXUTbEMnQsKrhpIyk87gWJHoOwhuG+PjgMXwnv10uansY8sVw0sx5pDLSKqU6l8gbtHaYuBI3yIuT/Cg+XU3S2jfzjSuqRFSDyjMbTbOR2skw+ILgPYgVo2pKyLtYRFVdZCQkDjfJR9iW8CZNM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703869; c=relaxed/simple; bh=JS1+T8ufpQOpwZXWCdmrwy3mHVd5UFm/zVDUtcRHl10=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AATQ9B43h4PaIVLj6g2LvCuzYS37GD8ZugqnPvznhGw6f//gFq3d5C2kZ/o15vLwI55fVrIhXWLy12UjGryYgm5u97C3pCtz+LzaX7rfc2iIfamVb51y8bqdY0FnUTYRIk6MXN8EksQOB7Icb/MMWpg6csfGlgekU3dAPg9jS3Y= 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=GytQummD; arc=none smtp.client-ip=192.198.163.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GytQummD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708703868; x=1740239868; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JS1+T8ufpQOpwZXWCdmrwy3mHVd5UFm/zVDUtcRHl10=; b=GytQummD9E/tbOD+x75dqnx2WYcOWDpKsgnyvwdBxjI6UXy+aFWLvtZT ghnVu0ZdaRMemg1CglJQRMs9GEE1+Id3f9HF68BmT3vHanGVdSaoQzMi3 E3J9KqVF+Z9Rq/wIlgtWJD5EHK5a6ddtwfCSL54+gAezpQqB5QlddC4Uv UDvyRMWVez+Nzxc2mO1m9yIHnwr7rDi09lRpHeY7IrqmKirSdumvKaYN+ pvv+EqxVtQ2mfgrtKes3jbxyvIJ7R8OQlaIa56BTuUBc/PjnmJ4MNhhVK uBC43/rk1bWrCY2a7Kkv9v7IkZ7F8Ri/3Oa0sLNjpE1yURx7nr1TmCfXx w==; X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="3187540" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="3187540" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 07:57:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="937025349" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="937025349" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2024 07:57:41 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 39E4680C; Fri, 23 Feb 2024 17:57:40 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Christophe JAILLET , Sakari Ailus , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Len Brown Subject: [PATCH v2 4/4] device property: Don't use "proxy" headers Date: Fri, 23 Feb 2024 17:54:39 +0200 Message-ID: <20240223155731.858412-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240223155731.858412-1-andriy.shevchenko@linux.intel.com> References: <20240223155731.858412-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 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 afa1bf2b3c5a..7324a704a9a1 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 1f0135e24d00..3a1045eb786c 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -11,6 +11,7 @@ #define _LINUX_PROPERTY_H_ #include +#include #include #include #include