On Tue, Jan 29, 2019 at 06:48:45PM +0000, James Morse wrote:
> +static int ghes_in_nmi_spool_from_list(struct list_head *rcu_list)
> +{
> +     int err, ret = -ENOENT;
> +     struct ghes *ghes;
> +
> +     rcu_read_lock();
> +     list_for_each_entry_rcu(ghes, rcu_list, list) {
> +             err = ghes_in_nmi_queue_one_entry(ghes);
> +             if (!err)
> +                     ret = 0;

Do I understand this correctly that we want to do "ret = 0" for at least
one record which ghes_in_nmi_queue_one_entry() has succeeded queueing?

For those for which it has returned -ENOENT, estatus has been cleared,
nothing has been queued so we don't have to do anything for that
particular entry...

Btw, you don't really need the err variable:

                if (!ghes_in_nmi_queue_one_entry(ghes))
                        ret = 0;

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Reply via email to