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]
Date:	Thu, 7 May 2009 15:47:24 +0530
From:	Trilok Soni <soni.trilok@...il.com>
To:	Kim Kyuwon <chammoru@...il.com>
Cc:	Kim Kyuwon <q1.kim@...sung.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	linux-i2c@...r.kernel.org, Jean Delvare <khali@...ux-fr.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Input: add MAX7359 key switch controller driver

Hi Kim,

>>
>> Could you please restrict the commit text line to 80/72 columns? It
>> will look good.
>
> Is this restriction for commit text mandatory? It seems like I got an
> email from Andrew Morton that my patch was wordwraped even commit
> text.

This helps reader of the commit text to not give much stretch on his eyes :)

>>
>>> +
>>> +static int __devinit max7359_probe(struct i2c_client *client,
>>> +                                       const struct i2c_device_id *id)
>>
>> You may want to remove __devinit as it is i2c client driver . I have
>> added linux-i2c for i2c specific review.
>
> Actually I don't want to remove it :), Is there any reason why you think so?

Sorry I have mistaken it as __init. This is fine.

>
>>> +static int max7359_suspend(struct i2c_client *client, pm_message_t mesg)
>>> +{
>>> +       /* If no keys are pressed, enter sleep mode for 8192 ms */
>>> +       max7359_write_reg(client, MAX7359_REG_SLEEP, 0x01);
>>> +
>>> +       return 0;
>>> +}
>>> +
>>> +static int max7359_resume(struct i2c_client *client)
>>> +{
>>> +       /* Restore the default setting (autosleep for 256 ms) */
>>> +       max7359_write_reg(client, MAX7359_REG_SLEEP, 0x07);
>>> +
>>> +       return 0;
>>> +}
>>
>> Protect these two function with #ifdef CONFIG_PM please.
>
> This is what I really wanted to ask. I'm trying not to use '#ifdef'.
> By the way, why most of drivers use protect suspend/resume functions
> with #ifdef? Just for saving code size?

suspend and resume is only important if the user of this driver has
CONFIG_PM enabled in it's
defconfig, right? So, if CONFIG_PM is not defined suspend/resume
should equal to NULL.

>>
>>
>>> +};
>>> +
>>> +
>>> +MODULE_AUTHOR("Kim Kyuwon <q1.kim@...sung.com>");
>>> +MODULE_DESCRIPTION("MAX7359 Key Switch Controller Driver");
>>> +MODULE_LICENSE("GPL v2");
>>
>> MODULE_ALIAS ??
>
> In 'include/linux/module.h'
>
>  96 /* For userspace: you can also call me... */
>  97 #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
>
> From comment above, I think MODULE_ALIAS is optional. Do you still
> think MODULE_ALIAS needs?
>

Yes, it is not __must__.

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
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