lkml.org 
[lkml]   [2020]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
> > > +	switch (ret) {
> > > + case SMCCC_RET_SUCCESS:
> > > + return 0;
> > > + case SMCCC_RET_NOT_SUPPORTED:
> > > + return -EOPNOTSUPP;
> > > + default:
> > > + return -EINVAL;
> > > + }
> > > }
> >
> > Hi Pali
> >
> > Maybe this should be a global helper translating SMCCC_RET_* into a
> > standard errno value?
> >
> > Andrew
>
> Hello Andrew!
>
> Well, I'm not sure if some standard global helper is the correct way for
> marvell comphy handler. It returns 0 for success and -1 on error when
> handler is not supported.

No, i was meaning just

switch (ret) {
case SMCCC_RET_SUCCESS:
return 0;
case SMCCC_RET_NOT_SUPPORTED:
return -EOPNOTSUPP;
default:
return -EINVAL;
}

There is nothing Marvell specific here.

Andrew

\
 
 \ /
  Last update: 2020-09-02 19:01    [W:1.104 / U:1.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site