Re: [PATCH 5.10 006/173] ipmi:ssif: resend_msg() cannot fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 04, 2023 at 01:22:01PM +0200, Pavel Machek wrote:
> Hi!
> 
> > The resend_msg() function cannot fail, but there was error handling
> > around using it.  Rework the handling of the error, and fix the out of
> > retries debug reporting that was wrong around this, too.
> 
> > @@ -909,31 +909,17 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result,
> >  	if (result < 0) {
> >  		ssif_info->retries_left--;
> >  		if (ssif_info->retries_left > 0) {
> > -			if (!start_resend(ssif_info)) {
> > -				ssif_inc_stat(ssif_info, send_retries);
> > -				return;
> > -			}
> > -			/* request failed, just return the error. */
> > -			ssif_inc_stat(ssif_info, send_errors);
> > -
> > -			if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
> > -				dev_dbg(&ssif_info->client->dev,
> > -					"%s: Out of retries\n", __func__);
> > -			msg_done_handler(ssif_info, -EIO, NULL, 0);
> > +			start_resend(ssif_info);
> >  			return;
> >  		}
> 
> ssif_inc_stat(ssif_info, send_errors); disappeared here, is that
> intentional?

Actually, ssif_inc_stat(ssif_info, send_retries); is the thing that
disappeared, since start_resend() cannot fail.  Thanks, I'll get in a
fix for that.

-corey

> 
> Best regards,
> 								Pavel
> -- 
> DENX Software Engineering GmbH,        Managing Director: Erika Unter
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux