lkml.org 
[lkml]   [2022]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3 5/9] i2c-mlxbf.c: support lock mechanism
Date

> + /* Try to acquire the smbus gw lock before any reads of the GW register since
> + * a read sets the lock.
> + */

Please use kernel multiline comment style.

Done.
> @@ -792,6 +824,8 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv,
> priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_FSM);
> }

Dunno if this is taste, but I think it is easier to follow the locking when we have central acquire and release points for it. So, I'd suggest to add something like

out_unlock:

here and then goto to this place from the other locations.

What do you think?

Sure!
>
> + mlxbf_i2c_smbus_master_unlock(priv);
> +
> return ret;

\
 
 \ /
  Last update: 2022-09-19 14:51    [W:0.072 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site