Re: [PATCH v2 20/28] net: wan: Add framer framework support

2023-08-08 Thread Christophe Leroy
Le 26/07/2023 à 17:02, Herve Codina a écrit : > A framer is a component in charge of an E1/T1 line interface. > Connected usually to a TDM bus, it converts TDM frames to/from E1/T1 > frames. It also provides information related to the E1/T1 line. > > The framer framework provides a set of APIs

Re: [PATCH v2 20/28] net: wan: Add framer framework support

2023-08-01 Thread Herve Codina
On Tue, 1 Aug 2023 11:56:12 +0200 Andrew Lunn wrote: > > +int framer_pm_runtime_get(struct framer *framer) > > +{ > > + int ret; > > + > > + if (!framer) > > + return 0; > > Can framer be a NULL pointer? This sort of test often covers up > bugs. So either let it dereference the

Re: [PATCH v2 20/28] net: wan: Add framer framework support

2023-08-01 Thread Andrew Lunn
> +int framer_pm_runtime_get(struct framer *framer) > +{ > + int ret; > + > + if (!framer) > + return 0; Can framer be a NULL pointer? This sort of test often covers up bugs. So either let it dereference the NULL pointer and opps, or return -EINVAL. Andrew

[PATCH v2 20/28] net: wan: Add framer framework support

2023-07-26 Thread Herve Codina
A framer is a component in charge of an E1/T1 line interface. Connected usually to a TDM bus, it converts TDM frames to/from E1/T1 frames. It also provides information related to the E1/T1 line. The framer framework provides a set of APIs for the framer drivers (framer provider) to create/destroy