[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE-0n514jMG3ckYF58koSamHDYiuoxry7cyuoNMGjygwQOCb9g@mail.gmail.com>
Date: Tue, 5 Sep 2023 17:56:15 -0500
From: Stephen Boyd <swboyd@...omium.org>
To: Hans de Goede <hdegoede@...hat.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
Mark Gross <markgross@...nel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
platform-driver-x86@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Prashant Malani <pmalani@...omium.org>
Subject: Re: [PATCH 2/3] platform/x86: intel_scu_ipc: Check status upon
timeout in ipc_wait_for_interrupt()
Quoting Kuppuswamy Sathyanarayanan (2023-08-31 07:27:35)
>
>
> Since you are not using the return value, I would not use time_left. I think the
> following version is easy to read. But it is up to you.
>
> wait_for_completion_timeout(&scu->cmd_complete, IPC_TIMEOUT)
>
> status = ipc_read_status(scu);
>
> if (status & IPC_STATUS_BUSY)
> return -ETIMEDOUT;
>
> if (status & IPC_STATUS_ERR)
> return -EIO;
>
> return 0;
>
> With above fixed, you can add
Thanks! That's a lot better.
Powered by blists - more mailing lists