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: <YwToilxquEZGqzQD@smile.fi.intel.com>
Date:   Tue, 23 Aug 2022 17:47:38 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Henning Schild <henning.schild@...mens.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Pavel Machek <pavel@....cz>,
        Hans de Goede <hdegoede@...hat.com>,
        Mark Gross <markgross@...nel.org>, Lee Jones <lee@...nel.org>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-leds@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        Sheng-Yuan Huang <syhuang3@...oton.com>,
        Tasanakorn Phaipool <tasanakorn@...il.com>,
        simon.guinot@...uanux.org
Subject: Re: [PATCH v4 1/5] gpio-f7188x: Add GPIO support for Nuvoton NCT6116

On Tue, Aug 23, 2022 at 12:23:40PM +0200, Henning Schild wrote:
> Add GPIO support for Nuvoton NCT6116 chip. Nuvoton SuperIO chips are
> very similar to the ones from Fintek. In other subsystems they also
> share drivers and are called a family of drivers.
> 
> For the GPIO subsystem the only difference is that the direction bit is
> reversed and that there is only one data bit per pin. On the SuperIO
> level the logical device is another one.
> 
> On a chip level we do not have a manufacturer ID to check and also no
> revision.

...

> - * GPIO driver for Fintek Super-I/O F71869, F71869A, F71882, F71889 and F81866
> + * GPIO driver for Fintek and Nuvoton Super-I/O chips

I'm not sure it's good idea to drop it from here. It means reader has to get
this info in a hard way.

...

> +#define gpio_dir_invert(type)	((type) == nct6116d)
> +#define gpio_data_single(type)	((type) == nct6116d)

What's prevents us to add a proper prefix to these? I don't like the idea of
them having "gpio" prefix.

...

> +		pr_info(DRVNAME ": Unsupported device 0x%04x\n", devid);
> +			pr_debug(DRVNAME ": Not a Fintek device at 0x%08x\n", addr);
> +	pr_info(DRVNAME ": Found %s at %#x\n",
> +		pr_info(DRVNAME ":   revision %d\n",

Can we, please, utilize pr_fmt()?

> +			(int)superio_inb(addr, SIO_FINTEK_DEVREV));

Explicit casting in printf() means wrong specifier in 99% of cases.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ