diff for duplicates of <87ipvgo4c8.fsf@ti.com> diff --git a/a/1.txt b/N1/1.txt index 39d88a9..c60044a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -3,28 +3,28 @@ Jean Pihet <jean.pihet@newoldbits.com> writes: [...] >>> +exit_ok: ->>> + /* Find the strongest constraint for the given target */ ->>> + ret = 0; ->>> + if (ascending) { ->>> + list_for_each_entry(user, &(constraints_list)->node_list, ->>> + node.plist.node_list) { ->>> + /* Find the lowest (i.e. first) value for the target */ ->>> + if (user->target == target) { ->>> + ret = user->constraint_value; ->>> + break; ->>> + } ->>> + } ->>> + } else { ->>> + list_for_each_entry_reverse(user, ->>> + &(constraints_list)->node_list, ->>> + node.plist.node_list) { ->>> + /* Find the highest (i.e. last) value for the target */ ->>> + if (user->target == target) { ->>> + ret = user->constraint_value; ->>> + break; ->>> + } ->>> + } ->>> + } +>>> + ? ? /* Find the strongest constraint for the given target */ +>>> + ? ? ret = 0; +>>> + ? ? if (ascending) { +>>> + ? ? ? ? ? ? list_for_each_entry(user, &(constraints_list)->node_list, +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? node.plist.node_list) { +>>> + ? ? ? ? ? ? ? ? ? ? /* Find the lowest (i.e. first) value for the target */ +>>> + ? ? ? ? ? ? ? ? ? ? if (user->target == target) { +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ret = user->constraint_value; +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? break; +>>> + ? ? ? ? ? ? ? ? ? ? } +>>> + ? ? ? ? ? ? } +>>> + ? ? } else { +>>> + ? ? ? ? ? ? list_for_each_entry_reverse(user, +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? &(constraints_list)->node_list, +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? node.plist.node_list) { +>>> + ? ? ? ? ? ? ? ? ? ? /* Find the highest (i.e. last) value for the target */ +>>> + ? ? ? ? ? ? ? ? ? ? if (user->target == target) { +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ret = user->constraint_value; +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? break; +>>> + ? ? ? ? ? ? ? ? ? ? } +>>> + ? ? ? ? ? ? } +>>> + ? ? } >> >> Hmm, why can't you use plist_first() and plist_last() here? > Because the plist is sorted by the 'prio' field (which is 'value' in @@ -43,14 +43,14 @@ omap_device would have a plist for each class. >> >>> +exit_error: ->>> + mutex_unlock(&_constraints_mutex); +>>> + ? ? mutex_unlock(&_constraints_mutex); >>> + ->>> + return ret; +>>> + ? ? return ret; >>> +} >>> ->>> /* Public functions for use by core code */ +>>> ?/* Public functions for use by core code */ >>> ->>> /** +>>> ?/** >>> + * omap_device_set_dev_constraint - set/release a device constraint >>> + * @class: constraint class >>> + * @req_dev: constraint requester, used for tracking the constraints @@ -67,20 +67,20 @@ omap_device would have a plist for each class. >>> + * -EINVAL. >>> + */ >>> +int omap_device_set_dev_constraint(enum omap_pm_constraint_class class, ->>> + struct device *req_dev, ->>> + struct device *dev, long t) +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct device *req_dev, +>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct device *dev, long t) >>> +{ ->>> + struct omap_device *od; ->>> + struct omap_hwmod *oh; ->>> + struct platform_device *pdev; ->>> + struct powerdomain *pwrdm = NULL; ->>> + u32 ret = -EINVAL; +>>> + ? ? struct omap_device *od; +>>> + ? ? struct omap_hwmod *oh; +>>> + ? ? struct platform_device *pdev; +>>> + ? ? struct powerdomain *pwrdm = NULL; +>>> + ? ? u32 ret = -EINVAL; >>> + ->>> + /* Look for the platform device for dev */ ->>> + pdev = to_platform_device(dev); +>>> + ? ? /* Look for the platform device for dev */ +>>> + ? ? pdev = to_platform_device(dev); >>> + ->>> + /* Try to catch non platform devices. */ ->>> + if (pdev->name == NULL) { +>>> + ? ? /* Try to catch non platform devices. */ +>>> + ? ? if (pdev->name == NULL) { >> >> This should check for a valid omap_device, not platform_device. > This check remains but the check below is changed, see below. diff --git a/a/content_digest b/N1/content_digest index c9a0f97..02e0b76 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,14 +2,10 @@ "ref\01299779247-20511-5-git-send-email-j-pihet@ti.com\0" "ref\0874o71zdpu.fsf@ti.com\0" "ref\0AANLkTin4T1Tk88Ud-TSQ1SOEWuZnv-XXwm8V2wUSUvr_@mail.gmail.com\0" - "From\0Kevin Hilman <khilman@ti.com>\0" - "Subject\0Re: [PATCH v2 4/7] OMAP: PM CONSTRAINTS: implement the constraints management code\0" + "From\0khilman@ti.com (Kevin Hilman)\0" + "Subject\0[PATCH v2 4/7] OMAP: PM CONSTRAINTS: implement the constraints management code\0" "Date\0Fri, 18 Mar 2011 08:06:47 -0700\0" - "To\0Jean Pihet <jean.pihet@newoldbits.com>\0" - "Cc\0linux-omap@vger.kernel.org" - linux-arm-kernel@lists.infradead.org - paul@pwsan.com - " Jean Pihet <j-pihet@ti.com>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "Jean Pihet <jean.pihet@newoldbits.com> writes:\n" @@ -17,28 +13,28 @@ "[...]\n" "\n" ">>> +exit_ok:\n" - ">>> + \302\240 \302\240 /* Find the strongest constraint for the given target */\n" - ">>> + \302\240 \302\240 ret = 0;\n" - ">>> + \302\240 \302\240 if (ascending) {\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 list_for_each_entry(user, &(constraints_list)->node_list,\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 node.plist.node_list) {\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /* Find the lowest (i.e. first) value for the target */\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (user->target == target) {\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 ret = user->constraint_value;\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 break;\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 }\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 }\n" - ">>> + \302\240 \302\240 } else {\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 list_for_each_entry_reverse(user,\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 &(constraints_list)->node_list,\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 node.plist.node_list) {\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /* Find the highest (i.e. last) value for the target */\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (user->target == target) {\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 ret = user->constraint_value;\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 break;\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 }\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 }\n" - ">>> + \302\240 \302\240 }\n" + ">>> + ? ? /* Find the strongest constraint for the given target */\n" + ">>> + ? ? ret = 0;\n" + ">>> + ? ? if (ascending) {\n" + ">>> + ? ? ? ? ? ? list_for_each_entry(user, &(constraints_list)->node_list,\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? node.plist.node_list) {\n" + ">>> + ? ? ? ? ? ? ? ? ? ? /* Find the lowest (i.e. first) value for the target */\n" + ">>> + ? ? ? ? ? ? ? ? ? ? if (user->target == target) {\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ret = user->constraint_value;\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;\n" + ">>> + ? ? ? ? ? ? ? ? ? ? }\n" + ">>> + ? ? ? ? ? ? }\n" + ">>> + ? ? } else {\n" + ">>> + ? ? ? ? ? ? list_for_each_entry_reverse(user,\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? &(constraints_list)->node_list,\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? node.plist.node_list) {\n" + ">>> + ? ? ? ? ? ? ? ? ? ? /* Find the highest (i.e. last) value for the target */\n" + ">>> + ? ? ? ? ? ? ? ? ? ? if (user->target == target) {\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ret = user->constraint_value;\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;\n" + ">>> + ? ? ? ? ? ? ? ? ? ? }\n" + ">>> + ? ? ? ? ? ? }\n" + ">>> + ? ? }\n" ">>\n" ">> Hmm, why can't you use plist_first() and plist_last() here?\n" "> Because the plist is sorted by the 'prio' field (which is 'value' in\n" @@ -57,14 +53,14 @@ "\n" ">>\n" ">>> +exit_error:\n" - ">>> + \302\240 \302\240 mutex_unlock(&_constraints_mutex);\n" + ">>> + ? ? mutex_unlock(&_constraints_mutex);\n" ">>> +\n" - ">>> + \302\240 \302\240 return ret;\n" + ">>> + ? ? return ret;\n" ">>> +}\n" ">>>\n" - ">>> \302\240/* Public functions for use by core code */\n" + ">>> ?/* Public functions for use by core code */\n" ">>>\n" - ">>> \302\240/**\n" + ">>> ?/**\n" ">>> + * omap_device_set_dev_constraint - set/release a device constraint\n" ">>> + * @class: constraint class\n" ">>> + * @req_dev: constraint requester, used for tracking the constraints\n" @@ -81,20 +77,20 @@ ">>> + * -EINVAL.\n" ">>> + */\n" ">>> +int omap_device_set_dev_constraint(enum omap_pm_constraint_class class,\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240struct device *req_dev,\n" - ">>> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240struct device *dev, long t)\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct device *req_dev,\n" + ">>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct device *dev, long t)\n" ">>> +{\n" - ">>> + \302\240 \302\240 struct omap_device *od;\n" - ">>> + \302\240 \302\240 struct omap_hwmod *oh;\n" - ">>> + \302\240 \302\240 struct platform_device *pdev;\n" - ">>> + \302\240 \302\240 struct powerdomain *pwrdm = NULL;\n" - ">>> + \302\240 \302\240 u32 ret = -EINVAL;\n" + ">>> + ? ? struct omap_device *od;\n" + ">>> + ? ? struct omap_hwmod *oh;\n" + ">>> + ? ? struct platform_device *pdev;\n" + ">>> + ? ? struct powerdomain *pwrdm = NULL;\n" + ">>> + ? ? u32 ret = -EINVAL;\n" ">>> +\n" - ">>> + \302\240 \302\240 /* Look for the platform device for dev */\n" - ">>> + \302\240 \302\240 pdev = to_platform_device(dev);\n" + ">>> + ? ? /* Look for the platform device for dev */\n" + ">>> + ? ? pdev = to_platform_device(dev);\n" ">>> +\n" - ">>> + \302\240 \302\240 /* Try to catch non platform devices. */\n" - ">>> + \302\240 \302\240 if (pdev->name == NULL) {\n" + ">>> + ? ? /* Try to catch non platform devices. */\n" + ">>> + ? ? if (pdev->name == NULL) {\n" ">>\n" ">> This should check for a valid omap_device, not platform_device.\n" "> This check remains but the check below is changed, see below.\n" @@ -105,4 +101,4 @@ "\n" Kevin -9fbb94e52ff7faf8229056c4eb7cbb720b92c9da7b0f755fd5b6f88c02c89167 +7d1ab8595cfae47e49875093f0e4e5a0568371adad5625ba8a7e879ed3c45f7c
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.