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: <AANLkTikVtxYiSyqn-DbNsjukf+am9N2xU+xzWLFFhC0Y@mail.gmail.com>
Date:	Tue, 28 Sep 2010 10:55:26 -0400
From:	Mike Frysinger <vapier@...too.org>
To:	Masayuki Ohtak <masa-korg@....okisemi.com>
Cc:	meego-dev@...go.com, Andrew Morton <akpm@...ux-foundation.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	Alek Du <alek.du@...el.com>,
	Richard Röjfors <richard.rojfors@...ean-labs.com>,
	linux-kernel@...r.kernel.org, qi.wang@...el.com,
	andrew.chih.howe.khor@...el.com, kok.howg.ewe@...el.com,
	joel.clark@...el.com, yong.y.wang@...el.com,
	Tomoya MORINAGA <morinaga526@....okisemi.com>,
	margie.foster@...el.com
Subject: Re: [MeeGo-Dev][PATCH v2] Topcliff: Update PCH_GPIO driver to 2.6.35

On Tue, Sep 28, 2010 at 05:37, Masayuki Ohtak wrote:
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
>
>  comment "I2C GPIO expanders:"
>
> +config PCH_GPIO
> +       tristate "PCH GPIO"
> +       depends on PCI

this is connected to a PCI bus, not I2C, so it shouldnt be under the
I2C comment.  move it to a diff place in the file.

> --- a/drivers/gpio/Makefile
> +++ b/drivers/gpio/Makefile
> @@ -35,3 +35,4 @@ obj-$(CONFIG_GPIO_WM8994)     += wm8994-gpio.o
>  obj-$(CONFIG_GPIO_SCH)         += sch_gpio.o
>  obj-$(CONFIG_GPIO_RDC321X)     += rdc321x-gpio.o
>  obj-$(CONFIG_GPIO_JANZ_TTL)    += janz-ttl.o
> +obj-$(CONFIG_PCH_GPIO) += pch_gpio.o

there is a clear standard of naming things CONFIG_GPIO_XXX, so i'd
change your CONFIG_PCH_GPIO to CONFIG_GPIO_PCH

> +#include <linux/cdev.h>

you dont actually use cdev anywhere.  punt the header.

> +#define MODULE_NAME "pch_gpio"

KBUILD_MODNAME already exists

> +#define PCI_DEVICE_ID_PCH_GPIO 0x8803

considering you use this define in one place, i dont see why you need
a define at all.  just put the id in the one structure.

> +#ifdef CONFIG_PM
> +static s32 pch_gpio_suspend(struct pci_dev *pdev, pm_message_t state)
> +static s32 pch_gpio_resume(struct pci_dev *pdev)

suspend/resume funcs return "int", not "s32"

> +static struct pci_device_id pch_gpio_pcidev_id[] = {

should be const

> +static s32 __devinit pch_gpio_probe(struct pci_dev *pdev,
> +                                   const struct pci_device_id *id)

return value is "int", not "s32"

> +       chip = kzalloc(sizeof(struct pch_gpio_chip), GFP_KERNEL);

sizeof(*chip)


> +               printk(KERN_ERR "PCH gpio: Failed to register GPIO\n");

use dev_err()

> +static s32 __init pch_gpio_pci_init(void)
> +{
> +       return pci_register_driver(&pch_gpio_driver);
> +}
> +module_init(pch_gpio_pci_init);

module_init funcs return "int", not "s32"
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ