On Wed, Sep 20, 2023 at 04:19:53PM +0200, Marek Behún wrote: > On Tue, 19 Sep 2023 21:27:04 +0300 > Andy Shevchenko <andy@xxxxxxxxxx> wrote: > > On Tue, Sep 19, 2023 at 05:16:38PM +0200, Marek Behún wrote: > > > On Tue, 19 Sep 2023 15:29:08 +0300 > > > Andy Shevchenko <andy@xxxxxxxxxx> wrote: > > > > On Tue, Sep 19, 2023 at 12:38:10PM +0200, Marek Behún wrote: ... > > > > > + if (likely(ret == ARRAY_SIZE(msgs))) > > > > > > > > Why likely()? Please, justify. > > > > > > Becuase it is unlikely the I2C transaction will fail. In most cases, it > > > does not. > > > > Yes, but why likely() is needed? So, i.o.w. what's the benefit in _this_ case? > > Compiler optimization (one branch avoided). But I guess this isn't a > hot path, since I2C is insanely slow anyway. OK, I shall remove the > likely() usage. Have you seen the difference in the generated code, btw? I don't think it will get you one independently on the hot/slow path. -- With Best Regards, Andy Shevchenko