lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aIdTSrxDFSt98Tjl@shikoro>
Date: Mon, 28 Jul 2025 12:39:06 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: Wojciech Siudy <wojciech.siudy@...ia.com>
Cc: linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
	peda@...ntia.se, andi.shyti@...nel.org, mariusz.madej@...ia.com
Subject: Re: [PATCH v6 RESEND 2/2] i2c: muxes: pca954x: Reset if (de)select
 fails

Hi,

thanks for improving this driver!

> +static void pca954x_reset_mux(struct pca954x *data)
> +{
> +	dev_warn(&data->client->dev, "resetting the device\n");

To me, this is not the proper place for such a report. Can't the reset
framework be instrumented in some way?

> +	pca954x_reset_assert(data);
> +	udelay(1);
> +	pca954x_reset_deassert(data);
> +}
> +
>  static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan)
>  {
>  	struct pca954x *data = i2c_mux_priv(muxc);
> @@ -328,6 +348,8 @@ static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan)
>  		ret = pca954x_reg_write(muxc->parent, client, regval);
>  		data->last_chan = ret < 0 ? 0 : regval;
>  	}
> +	if (ret == -ETIMEDOUT && (data->reset_cont))

Braces around 'data...' not needed. Use '--strict' with checkpatch to
get notified.

> +		pca954x_reset_mux(data);
>  
>  	return ret;
>  }
> -		return pca954x_reg_write(muxc->parent, client,
> +		ret = pca954x_reg_write(muxc->parent, client,
>  					 data->last_chan);

Indentation of the above line needs to be adapted.

Rest looks good to me.

Happy hacking,

   Wolfram


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ