Displaying 9 results from an estimated 9 matches for "list_for_each_entry_from_reverse".
2018 Mar 27
2
[PATCH] gpu: drm: nouveau: Use list_for_each_entry_from_reverse
It's better to use "list_for_each_entry_from_reverse" for iterating list
than "for loop" as it makes the code more clear to read.
This patch replace "for loop" with "list_for_each_entry_from_reverse"
and remove "cstate" variable as it is redundant in the code.
Signed-off-by: Arushi Singhal <arushisingh...
2018 Mar 27
0
[PATCH] gpu: drm: nouveau: Use list_for_each_entry_from_reverse
On 27 March 2018 at 19:11, Arushi Singhal
<arushisinghal19971997 at gmail.com> wrote:
> It's better to use "list_for_each_entry_from_reverse" for iterating list
> than "for loop" as it makes the code more clear to read.
> This patch replace "for loop" with "list_for_each_entry_from_reverse"
> and remove "cstate" variable as it is redundant in the code.
I would prefer to also see &quo...
2018 Mar 27
0
[PATCH v2] gpu: drm: nouveau: Use list_for_each_entry_from_reverse
It's better to use "list_for_each_entry_from_reverse" for iterating list
than "for loop" as it makes the code more clear to read.
This patch replace "for loop" with "list_for_each_entry_from_reverse"
and "start" variable with "cstate" which helps in refactoring
the code and also "cstate"...
2018 Mar 26
2
[PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry
On Mon, Mar 26, 2018 at 4:01 AM, Arushi Singhal
<arushisinghal19971997 at gmail.com> wrote:
> It's better to use list_entry instead of list_{next/prev}_entry
> as it makes the code more clear to read.
> This patch replace list_entry with list_{next/prev}_entry.
>
> Signed-off-by: Arushi Singhal <arushisinghal19971997 at gmail.com>
Acked-by: Ben Skeggs <bskeggs at
2018 Mar 26
0
[PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry
...;cstate->head != &pstate->list;
> > - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) {
> > + cstate = list_prev_entry(cstate, head)) {
This loop could be written as:
cstate = start; /* cstate looks redundant here, just use start? */
list_for_each_entry_from_reverse(cstate, &pstate->list, head)
> > if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp))
> > break;
> > }
> > --
> > 2.7.4
2017 Nov 17
35
[PATCH 00/32] Updated State of my clk patches
...lated variables and fields
clk: Add NVKM_CLK_PSTATE_BOOT
clk: Rename NVKM_CLK_CSTATE_HIGHEST to NVKM_CLK_CSTATE_AUTO
clk: Rename nvkm_clk.states to pstates
clk: Rename nvkm_pstate.list to cstates
clk: Remove dstate
clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
clk: Use list_for_each_entry_from_reverse in nvkm_cstate_find_best
clk: We should pass the pstate id around not the index in the list
clk: Hold information about the current cstate status
clk: Refactor the base and boost clock limits so that we can limit
pstates
therm: Move the temp readout into nvkm_therm_update
core/device:...
2023 Jun 29
3
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...en point
+ * @op: &drm_gpuva_op to assign in each iteration step
+ * @ops: &drm_gpuva_ops to walk
+ *
+ * This iterator walks over all ops within a given list of operations beginning
+ * from the given operation in reverse order.
+ */
+#define drm_gpuva_for_each_op_from_reverse(op, ops) \
+ list_for_each_entry_from_reverse(op, &(ops)->list, entry)
+
+/**
+ * drm_gpuva_first_op - returns the first &drm_gpuva_op from &drm_gpuva_ops
+ * @ops: the &drm_gpuva_ops to get the fist &drm_gpuva_op from
+ */
+#define drm_gpuva_first_op(ops) \
+ list_first_entry(&(ops)->list, struct drm_gpuva_op, en...
2023 Jul 13
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...en point
+ * @op: &drm_gpuva_op to assign in each iteration step
+ * @ops: &drm_gpuva_ops to walk
+ *
+ * This iterator walks over all ops within a given list of operations beginning
+ * from the given operation in reverse order.
+ */
+#define drm_gpuva_for_each_op_from_reverse(op, ops) \
+ list_for_each_entry_from_reverse(op, &(ops)->list, entry)
+
+/**
+ * drm_gpuva_first_op() - returns the first &drm_gpuva_op from &drm_gpuva_ops
+ * @ops: the &drm_gpuva_ops to get the fist &drm_gpuva_op from
+ */
+#define drm_gpuva_first_op(ops) \
+ list_first_entry(&(ops)->list, struct drm_gpuva_op,...
2023 Jul 20
2
[PATCH drm-misc-next v8 01/12] drm: manager to keep track of GPUs VA mappings
...en point
+ * @op: &drm_gpuva_op to assign in each iteration step
+ * @ops: &drm_gpuva_ops to walk
+ *
+ * This iterator walks over all ops within a given list of operations beginning
+ * from the given operation in reverse order.
+ */
+#define drm_gpuva_for_each_op_from_reverse(op, ops) \
+ list_for_each_entry_from_reverse(op, &(ops)->list, entry)
+
+/**
+ * drm_gpuva_first_op() - returns the first &drm_gpuva_op from &drm_gpuva_ops
+ * @ops: the &drm_gpuva_ops to get the fist &drm_gpuva_op from
+ */
+#define drm_gpuva_first_op(ops) \
+ list_first_entry(&(ops)->list, struct drm_gpuva_op,...