Re: [PATCH 2/2] staging: sm750fb: propagate error codes from de_wait()

From: Denny Lin

Date: Thu Apr 09 2026 - 11:20:22 EST


Hi Greg,

> Why did you delete the comment?

The comment was removed as part of simplifying the code while
changing the error handling to propagate the return value from
de_wait(). I can restore or update it if needed.

> And when did de_wait() start returning correct values?

de_wait() starts returning a proper errno value in patch 1 of this
series, where the timeout return value is changed from -1 to
-ETIMEDOUT. This patch then propagates that error value.

Thanks,
Hungyu

On Thu, Apr 9, 2026 at 8:05 AM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Apr 09, 2026 at 02:41:19PM +0000, Hungyu Lin wrote:
> > The sm750 acceleration functions currently return -1 when
> > de_wait() fails, discarding the original error code.
> >
> > Since de_wait() now returns proper errno values, propagate
> > the error code instead of returning -1.
> >
> > Signed-off-by: Hungyu Lin <dennylin0707@xxxxxxxxx>
> > ---
> > drivers/staging/sm750fb/sm750_accel.c | 22 ++++++++++++----------
> > 1 file changed, 12 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
> > index 0f94d859e91c..891d12a5e2cc 100644
> > --- a/drivers/staging/sm750fb/sm750_accel.c
> > +++ b/drivers/staging/sm750fb/sm750_accel.c
> > @@ -90,14 +90,12 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
> > u32 color, u32 rop)
> > {
> > u32 de_ctrl;
> > + int ret;
> >
> > - if (accel->de_wait() != 0) {
> > - /*
> > - * int time wait and always busy,seems hardware
> > - * got something error
> > - */
>
> Why did you delete the comment?
>
> And when did de_wait() start returning correct values?
>
> thanks,
>
> greg k-h