[Intel-gfx] [PATCH v3 02/15] mei: add support to GSC extended header

Winkler, Tomas tomas.winkler at intel.com
Fri Sep 9 06:21:10 UTC 2022


> > >
> > > On Fri, Aug 19, 2022 at 03:53:22PM -0700, Daniele Ceraolo Spurio wrote:
> > > > --- a/drivers/misc/mei/hw-me.c
> > > > +++ b/drivers/misc/mei/hw-me.c
> > > > @@ -590,7 +590,10 @@ static int mei_me_hbuf_write(struct
> > > > mei_device
> > > *dev,
> > > >  	u32 dw_cnt;
> > > >  	int empty_slots;
> > > >
> > > > -	if (WARN_ON(!hdr || !data || hdr_len & 0x3))
> > > > +	if (WARN_ON(!hdr || hdr_len & 0x3))
> > > > +		return -EINVAL;
> > > > +
> > > > +	if (WARN_ON(!data && data_len))
> > >
> > > Do not add more WARN_ON() calls, please just handle this properly
> > > and do not reboot people's machines for a coding error :(
> >
> > As far as I understand WARN_ON()  will produce solely a backtrace ,
> 
> Except when you have panic_on_warn() enabled in your systems, as many
> do :(
Was not aware, thanks for bringing to my attention. 

> > This particular condition should never ever happen in theory,
> 
> Then don't check it!
In theory :)
> > anyhow we can use dev_err() here as well.
>
> That would be best.
That how it was resolved in the V4 series that Daniele has sent,  will be glad if you can review.
Thanks
Tomas



More information about the Intel-gfx mailing list