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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 Mar 2021 19:24:50 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Yicong Yang <yangyicong@...ilicon.com>, wsa@...nel.org,
        andriy.shevchenko@...ux.intel.com, linux-i2c@...r.kernel.org,
        Sergey.Semin@...kalelectronics.ru, linux-kernel@...r.kernel.org
Cc:     treding@...dia.com, jarkko.nikula@...ux.intel.com,
        rmk+kernel@...linux.org.uk, song.bao.hua@...ilicon.com,
        john.garry@...wei.com, mika.westerberg@...ux.intel.com,
        prime.zeng@...wei.com, linuxarm@...wei.com
Subject: Re: [PATCH v5 3/5] i2c: add support for HiSilicon I2C controller

30.03.2021 17:19, Yicong Yang пишет:
...
> +struct hisi_i2c_controller {
> +	struct i2c_adapter adapter;
> +	void __iomem *iobase;
> +	struct device *dev;
> +	int irq;
> +
> +	/* Intermediates for recording the transfer process */
> +	struct completion *completion;
> +	struct i2c_msg *msgs;
> +	int msg_num;
> +	int msg_tx_idx;
> +	int buf_tx_idx;
> +	int msg_rx_idx;
> +	int buf_rx_idx;
> +	u16 tar_addr;
> +	u32 xfer_err;
> +
> +	/* I2C bus configuration */
> +	struct i2c_timings t;
> +	u64 clk_rate_khz;

Looks like the u64 is overkill here and it doesn't allow you to use
COMPILE_TEST because 32bit arches can divide u64 only using the
do_div(), please fix this.

...
> +static const struct acpi_device_id hisi_i2c_acpi_ids[] = {
> +	{ "HISI03D1", 0 },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, hisi_i2c_acpi_ids);

> +MODULE_ALIAS("platform:hisi-i2c");


Nit: I think the MODULE_ALIAS shouldn't be necessary for this driver
since it will be matched by the ACPI table. You should be able to remove
it safely.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ