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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vdj81u8sXfsgBPYumFKWqsatJGHeME4rTtWM9NME6g0ZA@mail.gmail.com>
Date: Fri, 11 Apr 2025 22:21:36 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: remi.buisson@....com
Cc: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>, 
	Nuno Sá <nuno.sa@...log.com>, 
	Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, linux-kernel@...r.kernel.org, 
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 2/8] iio: imu: inv_icm45600: add I2C driver for
 inv_icm45600 driver

On Fri, Apr 11, 2025 at 4:28 PM Remi Buisson via B4 Relay
<devnull+remi.buisson.tdk.com@...nel.org> wrote:
>
> From: Remi Buisson <remi.buisson@....com>
>
> Add I2C driver for InvenSense ICM-456xxx devices.

...

> +/*
> + * Copyright (C) 2025 InvenSense, Inc.
> + */

One line (instead of 3), please! This will slightly help with these
rather longer files.

...

> +#include <linux/device.h>
> +#include <linux/i2c.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/property.h>
> +#include <linux/regmap.h>

Here and in the rest of the files the list of the header inclusions is
(semi-)random. You shouldn't use kernel.h and other "proxy" headers in
the code, please follow IWYU principle.

...

> +               return -ENOTSUPP;

This is wrong. Please check what other drivers return in such cases.

...

> +       regmap = devm_regmap_init_i2c(client, &inv_icm45600_regmap_config);
> +       if (IS_ERR(regmap))
> +               return PTR_ERR(regmap);

err.h is missing.

...

> +/*
> + * device id table is used to identify what device can be
> + * supported by this driver

Please, respect English grammar and punctuation in all multi-line comments.

> + */

...

> +               .data = (void *)INV_CHIP_ICM45688P,

Just no. Please, use real pointers.

...

I'm not going to review anything else, the above already deserves a new version.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ