LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Checkpatch problem with Kconfig help symbol ?
@ 2011-01-19 12:42 Tapio Vihuri
  2011-01-20  8:06 ` WANG Cong
  2011-01-25  1:32 ` checkpatch file name stripped mode Milton Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Tapio Vihuri @ 2011-01-19 12:42 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: linux-kernel

Hi

Is this false positive ?

WARNING: please write a paragraph that describes the config symbol fully
#60: FILE: drivers/input/misc/Kconfig:159:
+       help


Interesting enough, also:

./scripts/checkpatch.pl --file drivers/input/misc/Kconfig
WARNING: please write a paragraph that describes the config symbol fully
#430: FILE: input/misc/Kconfig:430:
+       help


But this is different line.

Kernel was linux-2.6.37-rc8 at:
a25cecc Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze




Below is the patch:

>From 2a76d8865858b0a70d7748b6fcbab66126918eef Mon Sep 17 00:00:00 2001
From: Tapio Vihuri <tapio.vihuri@nokia.com>
Date: Tue, 18 Jan 2011 16:15:44 +0200
Subject: [PATCH v4 2/3] ECI: introducing ECI controller driver

ECI controller is kind of bridge between host CPU I2C and ECI accessory
ECI communication.

Signed-off-by: Tapio Vihuri <tapio.vihuri@nokia.com>
---
 drivers/input/misc/Kconfig         |   41 +++
 drivers/input/misc/Makefile        |    1 +
 drivers/input/misc/eci_at20_ctrl.c |  533
++++++++++++++++++++++++++++++++++++
 include/linux/input/eci.h          |   24 ++-
 4 files changed, 598 insertions(+), 1 deletions(-)
 create mode 100644 drivers/input/misc/eci_at20_ctrl.c

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 56cdc62..fa64398 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -114,6 +114,23 @@ config INPUT_APANEL
 	 To compile this driver as a module, choose M here: the module will
 	 be called apanel.
 
+menuconfig ECI
+	bool "ECI support"
+	help
+	  ECI (Enhancement Control Interface) accessory support
+
+	  The Enhancement Control Interface functionality
+	  ECI is better known as Multimedia Headset for Nokia phones.
+	  If headset has many buttons, like play, vol+, vol- etc. then
+	  it is propably ECI accessory.
+	  Among several buttons ECI accessory contains memory for storing
+	  several parameters.
+
+	  Enable ECI support in terminal so that ECI input driver is able
+	  to communicate with ECI accessory
+
+if ECI
+
 config INPUT_ECI
 	tristate "AV ECI (Enhancement Control Interface) input driver"
 	select INPUT_SPARSEKMAP
@@ -129,10 +146,34 @@ config INPUT_ECI
 	  - reading ECI configuration memory
 	  - ECI buttons as input events
 
+	  ECI input driver needs some ECI controller driver, select
+	  suitable controlelr driver(s) below.
+
 	  Say 'y' here to statically link this module into the kernel or 'm'
 	  to build it as a dynamically loadable module. The module will be
 	  called eci.ko
 
+config ECI_CTRL_DEBUG
+	bool "ECI controller debug"
+	depends on INPUT_ECI_AT20
+	help
+	  Say Y here to enable debugging messages for ECI controller driver.
+
+config INPUT_ECI_AT20
+	tristate "ECI controller driver"
+	select INPUT_ECI
+	depends on X86_MRST && INPUT_MISC
+	help
+	  This selects a driver for the ECI controller
+
+	  ECI controller is kind of bridge between host CPU I2C and
+	  ECI accessory ECI communication.
+
+	  Say 'y' here to statically link this module into the kernel or 'm'
+	  to build it as a dynamically loadable module. The module will be
+	  called eci_at20_ctrl.ko
+endif # ECI
+
 config INPUT_IXP4XX_BEEPER
 	tristate "IXP4XX Beeper support"
 	depends on ARCH_IXP4XX
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index fa99597..5e3dd7c 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_COBALT_BTNS)		+= cobalt_btns.o
 obj-$(CONFIG_INPUT_DM355EVM)		+= dm355evm_keys.o
 obj-$(CONFIG_HP_SDC_RTC)		+= hp_sdc_rtc.o
 obj-$(CONFIG_INPUT_ECI)			+= eci.o
+obj-$(CONFIG_INPUT_ECI_AT20)		+= eci_at20_ctrl.o
 obj-$(CONFIG_INPUT_IXP4XX_BEEPER)	+= ixp4xx-beeper.o
 obj-$(CONFIG_INPUT_KEYSPAN_REMOTE)	+= keyspan_remote.o
 obj-$(CONFIG_INPUT_M68K_BEEP)		+= m68kspkr.o
diff --git a/drivers/input/misc/eci_at20_ctrl.c
b/drivers/input/misc/eci_at20_ctrl.c
new file mode 100644
index 0000000..51b1f62
--- /dev/null
+++ b/drivers/input/misc/eci_at20_ctrl.c
@@ -0,0 +1,533 @@
+/*
+ * This file is part of ECI (Enhancement Control Interface) controller
+ * driver
+ *
+ * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * Contact: Tapio Vihuri <tapio.vihuri@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * ECI stands for (Enhancement Control Interface).
+ *
+ * ECI is better known as Multimedia Headset for Nokia phones.
+ * If headset has many buttons, like play, vol+, vol- etc. then it is
propably
+ * ECI accessory.
+ *
+ * ECI controller is kind of bridge between host CPU I2C and ECI
accessory
+ * ECI communication.
+ */
+
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/gpio.h>
+#include <linux/interrupt.h>
+#include <linux/slab.h>
+#include <linux/i2c.h>
+#include <linux/delay.h>
+#include <linux/debugfs.h>
+#include <linux/input/eci.h>
+
+#define DRIVER_NAME	"eci_ctrl"
+
+#define ECIBUS_STATUS_DATA_READY	0x01
+#define ECIBUS_STATUS_ACCESSORY_INT	0x02
+
+#define ECIBUS_WAIT_IRQ		100	/* msec */
+#define ECI_RST_MIN		62
+#define ECI_RST_WAIT		10	/* msec */
+
+#if defined(CONFIG_ECI_CTRL_DEBUG)
+#define DEBUG
+#endif
+
+struct eci_ctrl_data {
+	struct device		*dev;
+	struct eci_cb		*eci_callback;
+	int			eci_ctrl_rst_gpio;
+	int			eci_ctrl_sw_ctrl_gpio;
+	int			eci_ctrl_int_gpio;
+	wait_queue_head_t	wait;
+	bool			wait_eci_buttons;
+	bool			wait_data;
+};
+
+static struct eci_ctrl_data *the_ed;
+
+#ifdef CONFIG_DEBUG_FS
+static int eci_ctrl_read_reg(u8 reg);
+static int eci_ctrl_write_reg(u8 reg, u8 param);
+
+static struct dentry *eci_ctrl_debugfs_dir;
+
+static ssize_t reset_read(struct file *file, char __user *user_buf,
+		size_t count, loff_t *ppos)
+{
+	struct eci_ctrl_data *ed = file->private_data;
+	char buf[80];
+	int len = 0;
+	int ret;
+
+	if (*ppos == 0) {
+		ret = !!gpio_get_value(ed->eci_ctrl_rst_gpio);
+		len = snprintf(buf, sizeof(buf), "%d\n", ret);
+	}
+	ret = simple_read_from_buffer(user_buf, count, ppos, buf, len);
+
+	return ret;
+}
+
+static ssize_t reset_write(struct file *file, const char __user
*user_buf,
+		size_t count, loff_t *ppos)
+{
+	/* Assosiated in default_open() */
+	struct eci_ctrl_data *ed = file->private_data;
+	char buf[32];
+	int buf_size;
+
+	buf_size = min(count, (sizeof(buf)-1));
+	if (copy_from_user(buf, user_buf, buf_size))
+		return -EFAULT;
+
+	if (!memcmp(buf, "0", 1))
+		gpio_set_value(ed->eci_ctrl_rst_gpio, 0);
+	else if (!memcmp(buf, "1", 1))
+		gpio_set_value(ed->eci_ctrl_rst_gpio, 1);
+
+	return count;
+}
+
+static int default_open(struct inode *inode, struct file *file)
+{
+	/* Assosiated in debugfs_create_file() */
+	if (inode->i_private)
+		file->private_data = inode->i_private;
+
+	return 0;
+}
+
+static const struct file_operations reset_fops = {
+	.open		= default_open,
+	.read		= reset_read,
+	.write		= reset_write,
+};
+
+static void eci_ctrl_uninitialize_debugfs(void)
+{
+	if (eci_ctrl_debugfs_dir)
+		debugfs_remove_recursive(eci_ctrl_debugfs_dir);
+}
+
+static long eci_ctrl_initialize_debugfs(struct eci_ctrl_data *ed)
+{
+	void *ok;
+
+	/* /sys/kernel/debug/eci_ctrl */
+	eci_ctrl_debugfs_dir = debugfs_create_dir(ed->dev->driver->name,
NULL);
+	if (!eci_ctrl_debugfs_dir)
+		return -ENOENT;
+
+	/* Struct ed assosiated to inode->i_private */
+	ok = debugfs_create_file("reset", S_IRUGO | S_IWUSR,
+			eci_ctrl_debugfs_dir, ed, &reset_fops);
+	if (!ok)
+		goto fail;
+
+	return 0;
+fail:
+	eci_ctrl_uninitialize_debugfs();
+	return -ENOENT;
+}
+#else
+#define eci_ctrl_initialize_debugfs(ed)	1
+#define eci_ctrl_uninitialize_debugfs()
+#endif
+
+/* For eci_ctrl controller internal registers */
+static int eci_ctrl_read_reg(u8 reg)
+{
+	struct i2c_client *client = to_i2c_client(the_ed->dev);
+
+	if (reg <= ECICMD_RESERVED)
+		return -EINVAL;
+
+	return i2c_smbus_read_byte_data(client, reg);
+}
+
+static int eci_ctrl_write_reg(u8 reg, u8 param)
+{
+	struct i2c_client *client = to_i2c_client(the_ed->dev);
+
+	if (reg <= ECICMD_RESERVED)
+		return -EINVAL;
+
+	return i2c_smbus_write_byte_data(client, reg, param);
+}
+
+/* Reset and learn ECI accessory, ie. get speed */
+static int eci_acc_reset(void)
+{
+	s32 ret;
+
+	eci_ctrl_write_reg(ECIREG_RST_LEARN, 0);
+
+	msleep(ECI_RST_WAIT);
+
+	ret = eci_ctrl_read_reg(ECIREG_RST_LEARN);
+	if (ret < ECI_RST_MIN)
+		return -EIO;
+
+	return 0;
+}
+/* Read always four bytes, as stated in ECI specification */
+static int eci_acc_read_direct(u8 addr, char *buf)
+{
+	s32 ret;
+	int i;
+
+	/* Initiate ECI accessory memory read */
+	the_ed->wait_data = false;
+	if (!eci_ctrl_write_reg(ECIREG_READ_COUNT, 4))
+		if (eci_ctrl_write_reg(ECIREG_READ_DIRECT, addr))
+			return -EIO;
+
+	if (!wait_event_timeout(the_ed->wait, the_ed->wait_data == true,
+				msecs_to_jiffies(ECIBUS_WAIT_IRQ)))
+		return -EIO;
+
+	for (i = 0; i < 4; i++) {
+		ret = eci_ctrl_read_reg(ECIREG_READ_DIRECT + i);
+		if (ret < 0)
+			return ret;
+		buf[i] = ret;
+		usleep_range(2000, 10000);
+	}
+	return 0;
+}
+
+/* Trigger ECI accessory register data write (from accessory) */
+static int eci_fire_acc_read_reg(u8 reg, int count)
+{
+	struct i2c_client *client = to_i2c_client(the_ed->dev);
+
+	if (!eci_ctrl_write_reg(ECIREG_READ_COUNT, count))
+		return i2c_smbus_read_byte_data(client, reg);
+	else
+		return -EIO;
+}
+
+/* For ECI accessory internal registers */
+static int eci_acc_read_reg(u8 reg, u8 *buf, int count)
+{
+	s32 ret;
+	int i;
+
+	if (reg > ECICMD_RESERVED)
+		return -EINVAL;
+
+	the_ed->wait_data = false;
+	if (eci_fire_acc_read_reg(reg, count))
+		return -EIO;
+
+	if (!wait_event_timeout(the_ed->wait, the_ed->wait_data == true,
+				msecs_to_jiffies(ECIBUS_WAIT_IRQ)))
+		return -EIO;
+
+	for (i = 0; i < count; i++) {
+		ret = eci_ctrl_read_reg(ECIREG_READ_DIRECT + i);
+		if (ret < 0)
+			return ret;
+
+		buf[i] = ret;
+	}
+
+	return 0;
+}
+
+/* ECI accessory register write */
+static int eci_acc_write_reg(u8 reg, u8 param)
+{
+	struct i2c_client *client = to_i2c_client(the_ed->dev);
+
+	if (reg > ECICMD_RESERVED)
+		return -EINVAL;
+
+	return i2c_smbus_write_byte_data(client, reg, param);
+}
+
+
+/*
+ * Struct eci_data is ECI input driver (dealing ECI accessories) data.
+ * Struct eci_ctrl_data is this driver data, dealing just ECI
communication.
+ * Global eci_register() pairs structs so that we can call ECI input
driver
+ * event function with eci_data
+ */
+static void eci_ctrl_emit_buttons(struct eci_ctrl_data *ed, bool
force_up)
+{
+	struct eci_data *eci = ed->eci_callback->priv;
+	struct eci_buttons_data *b = &eci->buttons_data;
+
+	if (force_up)
+		b->buttons = b->buttons_up_mask;
+
+	ed->eci_callback->event(ECI_EVENT_BUTTON, eci);
+}
+
+static void eci_ctrl_get_buttons(u8 *buf, u8 count)
+{
+	int i, ret;
+
+	if (count > 4) {
+		dev_err(the_ed->dev, "Maximum four bytes allowed\n");
+		return;
+	}
+
+	for (i = 0; i <= count; i++) {
+		ret = eci_ctrl_read_reg(ECIREG_READ_DIRECT + i);
+		buf[i] = ret;
+	}
+}
+
+static irqreturn_t eci_ctrl_irq_handler(int irq, void *_ed)
+{
+	struct eci_ctrl_data *ed = _ed;
+	struct eci_data *eci = ed->eci_callback->priv;
+	struct eci_buttons_data *b = &eci->buttons_data;
+	int status;
+	char buf[4];
+
+	/* Clears eci_ctrl DATA interrupt */
+	status = eci_ctrl_read_reg(ECIREG_STATUS);
+
+	if (status & ECIBUS_STATUS_DATA_READY) {
+		/*
+		 * Buttons are special case as we want be fast with them
+		 * and this way we cope with nested button and data interrupts
+		 * The number of bytes needed to read is parsed in ECI
+		 * input driver, based on data in ECI accessory.
+		 * Maximum four bytes.
+		 */
+		if (ed->wait_eci_buttons) {
+			eci_ctrl_get_buttons(buf, eci->port_reg_count);
+			b->buttons = cpu_to_le32(*(u32 *)buf);
+			eci_ctrl_emit_buttons(ed, ECI_REAL_BUTTONS);
+			ed->wait_eci_buttons = false;
+		}
+		/* Complete ECI data reading */
+		ed->wait_data = true;
+		wake_up(&ed->wait);
+	}
+
+	/* Accessory interrupt, ie. button pressed */
+	if (status & ECIBUS_STATUS_ACCESSORY_INT) {
+		if (eci->mem_ok) {
+			eci_fire_acc_read_reg(ECICMD_PORT_DATA_0, 2);
+			ed->wait_eci_buttons = true;
+		}
+	}
+
+	return IRQ_HANDLED;
+}
+
+static struct eci_hw_ops eci_ctrl_hw_ops = {
+	.acc_reset              = eci_acc_reset,
+	.acc_read_direct        = eci_acc_read_direct,
+	.acc_read_reg           = eci_acc_read_reg,
+	.acc_write_reg          = eci_acc_write_reg,
+};
+
+static struct eci_ctrl_data *eci_ctrl_probe(struct device *dev)
+{
+	struct eci_ctrl_data *ed;
+	struct eci_ctrl_platform_data *pdata = dev->platform_data;
+	int ret;
+
+	if (!pdata) {
+		dev_err(dev, "platform_data not available\n");
+		return ERR_PTR(-EINVAL);
+	}
+
+	ed = kzalloc(sizeof(*ed), GFP_KERNEL);
+	if (!ed)
+		return ERR_PTR(-ENOMEM);
+
+	ed->dev = dev;
+	ed->eci_ctrl_rst_gpio = pdata->eci_ctrl_rst_gpio;
+	ed->eci_ctrl_sw_ctrl_gpio = pdata->eci_ctrl_sw_ctrl_gpio;
+	ed->eci_ctrl_int_gpio = pdata->eci_ctrl_int_gpio;
+
+	if (ed->eci_ctrl_rst_gpio == 0 || ed->eci_ctrl_sw_ctrl_gpio == 0 ||
+			ed->eci_ctrl_int_gpio == 0) {
+		ret = -ENXIO;
+		goto gpio_err;
+	}
+
+	the_ed = ed;
+
+	ret = eci_ctrl_initialize_debugfs(ed);
+	if (ret)
+		dev_err(dev, "could not create debugfs entries\n");
+
+	ret = gpio_request(ed->eci_ctrl_rst_gpio, "ECI_RSTn");
+	if (ret) {
+		dev_err(dev, "could not request ECI_RSTn gpio %d\n",
+				ed->eci_ctrl_rst_gpio);
+		goto rst_gpio_err;
+	}
+
+	gpio_direction_output(ed->eci_ctrl_rst_gpio, 0);
+	gpio_set_value(ed->eci_ctrl_rst_gpio, 1);
+
+	ret = gpio_request(ed->eci_ctrl_sw_ctrl_gpio, "ECI_SW_CTRL");
+	if (ret) {
+		dev_err(dev, "could not request ECI_SW_CTRL gpio %d\n",
+				ed->eci_ctrl_sw_ctrl_gpio);
+		goto sw_ctrl_gpio_err;
+	}
+
+	gpio_direction_input(ed->eci_ctrl_sw_ctrl_gpio);
+
+	ret = gpio_request(ed->eci_ctrl_int_gpio, "ECI_INT");
+	if (ret) {
+		dev_err(dev, "could not request ECI_INT gpio %d\n",
+				ed->eci_ctrl_int_gpio);
+		goto int_gpio_err;
+	}
+
+	gpio_direction_input(ed->eci_ctrl_int_gpio);
+
+	ret = request_threaded_irq(gpio_to_irq(ed->eci_ctrl_int_gpio), NULL,
+			eci_ctrl_irq_handler, IRQF_TRIGGER_RISING,
+			"ECI_INT", ed);
+	if (ret) {
+		dev_err(dev, "could not request irq %d\n",
+				gpio_to_irq(ed->eci_ctrl_int_gpio));
+		goto int_irq_err;
+	}
+
+	/* Register itself to the ECI accessory driver */
+	ed->eci_callback = eci_register(&eci_ctrl_hw_ops);
+	if (IS_ERR(ed->eci_callback)) {
+		ret = PTR_ERR(ed->eci_callback);
+		goto eci_register_err;
+	}
+
+	init_waitqueue_head(&ed->wait);
+
+	return ed;
+
+eci_register_err:
+	free_irq(gpio_to_irq(ed->eci_ctrl_int_gpio), ed);
+int_irq_err:
+	gpio_free(ed->eci_ctrl_int_gpio);
+int_gpio_err:
+	gpio_free(ed->eci_ctrl_sw_ctrl_gpio);
+sw_ctrl_gpio_err:
+	gpio_set_value(ed->eci_ctrl_rst_gpio, 0);
+	gpio_free(ed->eci_ctrl_rst_gpio);
+rst_gpio_err:
+	eci_ctrl_uninitialize_debugfs();
+gpio_err:
+	kfree(ed);
+
+	return ERR_PTR(ret);
+}
+
+static int __devinit eci_ctrl_i2c_probe(struct i2c_client *client,
+					const struct i2c_device_id *id)
+{
+	struct eci_ctrl_data *ed;
+
+	if (!i2c_check_functionality(client->adapter,
+				     I2C_FUNC_SMBUS_BYTE_DATA)) {
+		dev_err(&client->dev, "SMBUS byte data not supported\n");
+		return -EIO;
+	}
+
+	ed = eci_ctrl_probe(&client->dev);
+
+	if (IS_ERR(ed))
+		return PTR_ERR(ed);
+
+	i2c_set_clientdata(client, ed);
+
+	return 0;
+}
+
+static int __exit eci_ctrl_remove(struct i2c_client *client)
+{
+	struct eci_ctrl_data *ed = i2c_get_clientdata(client);
+
+	gpio_set_value(ed->eci_ctrl_rst_gpio, 0);
+	gpio_free(ed->eci_ctrl_rst_gpio);
+
+	gpio_free(ed->eci_ctrl_sw_ctrl_gpio);
+
+	free_irq(gpio_to_irq(ed->eci_ctrl_int_gpio), ed);
+	gpio_free(ed->eci_ctrl_int_gpio);
+
+	eci_ctrl_uninitialize_debugfs();
+
+	kfree(ed);
+
+	return 0;
+}
+
+#ifdef	CONFIG_PM
+
+static int eci_ctrl_suspend(struct i2c_client *client, pm_message_t
message)
+{
+	return -ENOSYS;
+}
+#else
+#define	eci_ctrl_suspend	NULL
+#endif
+
+static const struct i2c_device_id eci_id[] = {
+	{ DRIVER_NAME, 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, eci_id);
+
+static struct i2c_driver eci_i2c_driver = {
+	.driver = {
+		.name	= DRIVER_NAME,
+		.owner	= THIS_MODULE,
+	},
+	.probe		= eci_ctrl_i2c_probe,
+	.remove		= __exit_p(eci_ctrl_remove),
+	.suspend	= eci_ctrl_suspend,
+	.id_table	= eci_id,
+};
+
+static int __init eci_ctrl_init(void)
+{
+	return i2c_add_driver(&eci_i2c_driver);
+}
+module_init(eci_ctrl_init);
+
+static void __exit eci_ctrl_exit(void)
+{
+	i2c_del_driver(&eci_i2c_driver);
+}
+module_exit(eci_ctrl_exit);
+
+MODULE_DESCRIPTION("ECI accessory controller driver");
+MODULE_AUTHOR("Nokia Corporation");
+MODULE_ALIAS("i2c:eci_at20_ctrl");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/input/eci.h b/include/linux/input/eci.h
index 0e22404..868d2fb 100644
--- a/include/linux/input/eci.h
+++ b/include/linux/input/eci.h
@@ -1,7 +1,7 @@
 /*
  * This file is part of ECI (Enhancement Control Interface) driver
  *
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
  *
  * Contact: Tapio Vihuri <tapio.vihuri@nokia.com>
  *
@@ -35,6 +35,21 @@
 #define ECI_REAL_BUTTONS	0
 #define ECI_FORCE_BUTTONS_UP	1
 
+/*
+ * VPROG2CNT - VPROG2 Control Register
+ * 2.5V | normal | normal
+ * 10   | 111    | 111
+ * 2.5V | off    | off
+ * 10   | 100    | 100
+ */
+#define AvP_MSIC_VPROG2		0xd7
+#define AvP_MSIC_VPROG2_2V5_ON	0xbf
+#define AvP_MSIC_VPROG2_2V5_OFF 0xa4
+
+#define GPIO_ECI_RSTn		126	/* GP_CORE_030 + 96 */
+#define GPIO_ECI_SW_CTRL	178	/* GP_CORE_082 + 96 */
+#define GPIO_ECI_INT		16	/* GP_AON_016 */
+
 /* fixed in ECI HW, do not change */
 enum {
 	ECICMD_HWID,
@@ -154,4 +169,11 @@ struct eci_data {
 };
 
 struct eci_cb *eci_register(struct eci_hw_ops *eci_ops);
+
+/* eci controller data */
+struct eci_ctrl_platform_data {
+	int		eci_ctrl_rst_gpio;
+	int		eci_ctrl_sw_ctrl_gpio;
+	int		eci_ctrl_int_gpio;
+};
 #endif
-- 
1.6.5


BR,
Tapio


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-19 12:42 Checkpatch problem with Kconfig help symbol ? Tapio Vihuri
@ 2011-01-20  8:06 ` WANG Cong
  2011-01-20  9:38   ` Michal Marek
  2011-01-25  1:32 ` checkpatch file name stripped mode Milton Miller
  1 sibling, 1 reply; 12+ messages in thread
From: WANG Cong @ 2011-01-20  8:06 UTC (permalink / raw)
  To: linux-kernel

On Wed, 19 Jan 2011 14:42:48 +0200, Tapio Vihuri wrote:

> Hi
> 
> Is this false positive ?
> 
> WARNING: please write a paragraph that describes the config symbol fully
> #60: FILE: drivers/input/misc/Kconfig:159: +       help
> 
> 
> Interesting enough, also:
> 
> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig WARNING:
> please write a paragraph that describes the config symbol fully #430:
> FILE: input/misc/Kconfig:430:
> +       help
> 
> 
> But this is different line.
> 

Seems yes, the Kconfig part of your patch looks fine.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-20  8:06 ` WANG Cong
@ 2011-01-20  9:38   ` Michal Marek
  2011-01-21  7:19     ` Tapio Vihuri
  0 siblings, 1 reply; 12+ messages in thread
From: Michal Marek @ 2011-01-20  9:38 UTC (permalink / raw)
  To: WANG Cong; +Cc: linux-kernel, Andy Whitcroft, tapio.vihuri

On 20.1.2011 09:06, WANG Cong wrote:
> On Wed, 19 Jan 2011 14:42:48 +0200, Tapio Vihuri wrote:
> 
>> Hi
>>
>> Is this false positive ?
>>
>> WARNING: please write a paragraph that describes the config symbol fully
>> #60: FILE: drivers/input/misc/Kconfig:159: +       help
>>
>>
>> Interesting enough, also:
>>
>> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig WARNING:
>> please write a paragraph that describes the config symbol fully #430:
>> FILE: input/misc/Kconfig:430:
>> +       help
>>
>>
>> But this is different line.
>>
> 
> Seems yes, the Kconfig part of your patch looks fine.

The check is complaining that the help text is too short:

+config ECI_CTRL_DEBUG
+	bool "ECI controller debug"
+	depends on INPUT_ECI_AT20
+	help
+	  Say Y here to enable debugging messages for ECI controller driver.

Michal

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-20  9:38   ` Michal Marek
@ 2011-01-21  7:19     ` Tapio Vihuri
  2011-01-21 10:17       ` Andy Whitcroft
  0 siblings, 1 reply; 12+ messages in thread
From: Tapio Vihuri @ 2011-01-21  7:19 UTC (permalink / raw)
  To: ext Michal Marek; +Cc: WANG Cong, linux-kernel, Andy Whitcroft

On Thu, 2011-01-20 at 10:38 +0100, ext Michal Marek wrote:
> On 20.1.2011 09:06, WANG Cong wrote:
> > On Wed, 19 Jan 2011 14:42:48 +0200, Tapio Vihuri wrote:
> > 
> >> Hi
> >>
> >> Is this false positive ?
> >>
> >> WARNING: please write a paragraph that describes the config symbol fully
> >> #60: FILE: drivers/input/misc/Kconfig:159: +       help
> >>
> >>
> >> Interesting enough, also:
> >>
> >> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig WARNING:
> >> please write a paragraph that describes the config symbol fully #430:
> >> FILE: input/misc/Kconfig:430:
> >> +       help
> >>
> >>
> >> But this is different line.
> >>
> > 
> > Seems yes, the Kconfig part of your patch looks fine.
> 
> The check is complaining that the help text is too short:
> 
> +config ECI_CTRL_DEBUG
> +	bool "ECI controller debug"
> +	depends on INPUT_ECI_AT20
> +	help
> +	  Say Y here to enable debugging messages for ECI controller driver.
> 
> Michal

Hi.

That I suspect, and I tried to add four lines more.
But it still complain the same.

Tapio

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-21  7:19     ` Tapio Vihuri
@ 2011-01-21 10:17       ` Andy Whitcroft
  2011-01-31  8:19         ` Tapio Vihuri
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Whitcroft @ 2011-01-21 10:17 UTC (permalink / raw)
  To: Tapio Vihuri; +Cc: ext Michal Marek, WANG Cong, linux-kernel

On Fri, Jan 21, 2011 at 09:19:31AM +0200, Tapio Vihuri wrote:
> On Thu, 2011-01-20 at 10:38 +0100, ext Michal Marek wrote:
> > On 20.1.2011 09:06, WANG Cong wrote:
> > > On Wed, 19 Jan 2011 14:42:48 +0200, Tapio Vihuri wrote:
> > > 
> > >> Hi
> > >>
> > >> Is this false positive ?
> > >>
> > >> WARNING: please write a paragraph that describes the config symbol fully
> > >> #60: FILE: drivers/input/misc/Kconfig:159: +       help
> > >>
> > >>
> > >> Interesting enough, also:
> > >>
> > >> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig WARNING:
> > >> please write a paragraph that describes the config symbol fully #430:
> > >> FILE: input/misc/Kconfig:430:
> > >> +       help
> > >>
> > >>
> > >> But this is different line.
> > >>
> > > 
> > > Seems yes, the Kconfig part of your patch looks fine.
> > 
> > The check is complaining that the help text is too short:
> > 
> > +config ECI_CTRL_DEBUG
> > +	bool "ECI controller debug"
> > +	depends on INPUT_ECI_AT20
> > +	help
> > +	  Say Y here to enable debugging messages for ECI controller driver.
> > 
> > Michal
> 
> Hi.
> 
> That I suspect, and I tried to add four lines more.
> But it still complain the same.

If you have a patch which has four or more lines and trips this message
it is false yes.  Please do send me your example, as my current tests
pass.

-apw

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: checkpatch file name stripped mode
  2011-01-19 12:42 Checkpatch problem with Kconfig help symbol ? Tapio Vihuri
  2011-01-20  8:06 ` WANG Cong
@ 2011-01-25  1:32 ` Milton Miller
  1 sibling, 0 replies; 12+ messages in thread
From: Milton Miller @ 2011-01-25  1:32 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: linux-kernel, Tapio Vihuri

On Wed Jan 19 2011 about 07:42:55 EST, Tapio Vihuri wrote:
> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig
> WARNING: please write a paragraph that describes the config symbol fully
> #430: FILE: input/misc/Kconfig:430:

I notice that the first directory of the file name was stripped ...
seems like that should not be the default for file mode?

milton

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-21 10:17       ` Andy Whitcroft
@ 2011-01-31  8:19         ` Tapio Vihuri
  2011-01-31 10:15           ` Tomas Winkler
  0 siblings, 1 reply; 12+ messages in thread
From: Tapio Vihuri @ 2011-01-31  8:19 UTC (permalink / raw)
  To: ext Andy Whitcroft; +Cc: ext Michal Marek, WANG Cong, linux-kernel

On Fri, 2011-01-21 at 10:17 +0000, ext Andy Whitcroft wrote:
> On Fri, Jan 21, 2011 at 09:19:31AM +0200, Tapio Vihuri wrote:
> > On Thu, 2011-01-20 at 10:38 +0100, ext Michal Marek wrote:
> > > On 20.1.2011 09:06, WANG Cong wrote:
> > > > On Wed, 19 Jan 2011 14:42:48 +0200, Tapio Vihuri wrote:
> > > > 
> > > >> Hi
> > > >>
> > > >> Is this false positive ?
> > > >>
> > > >> WARNING: please write a paragraph that describes the config symbol fully
> > > >> #60: FILE: drivers/input/misc/Kconfig:159: +       help
> > > >>
> > > >>
> > > >> Interesting enough, also:
> > > >>
> > > >> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig WARNING:
> > > >> please write a paragraph that describes the config symbol fully #430:
> > > >> FILE: input/misc/Kconfig:430:
> > > >> +       help
> > > >>
> > > >>
> > > >> But this is different line.
> > > >>
> > > > 
> > > > Seems yes, the Kconfig part of your patch looks fine.
> > > 
> > > The check is complaining that the help text is too short:
> > > 
> > > +config ECI_CTRL_DEBUG
> > > +	bool "ECI controller debug"
> > > +	depends on INPUT_ECI_AT20
> > > +	help
> > > +	  Say Y here to enable debugging messages for ECI controller driver.
> > > 
> > > Michal
> > 
> > Hi.
> > 
> > That I suspect, and I tried to add four lines more.
> > But it still complain the same.
> 
> If you have a patch which has four or more lines and trips this message
> it is false yes.  Please do send me your example, as my current tests
> pass.
> 
> -apw

Hi.

Sorry for the delay, I had made stupid email filter. Mea Culpa.

It's working OK. If there is only three lines of help, checkpatch will
complain.
With four lines, it's not.

I add more help in my case. It toggle driver debug on/off, so I try
harder to figure out how to say it with more words ;)

BR,
Tapio



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-31  8:19         ` Tapio Vihuri
@ 2011-01-31 10:15           ` Tomas Winkler
  2011-01-31 13:42             ` Andy Whitcroft
  0 siblings, 1 reply; 12+ messages in thread
From: Tomas Winkler @ 2011-01-31 10:15 UTC (permalink / raw)
  To: tapio.vihuri
  Cc: ext Andy Whitcroft, ext Michal Marek, WANG Cong, linux-kernel

On Mon, Jan 31, 2011 at 10:19 AM, Tapio Vihuri <tapio.vihuri@nokia.com> wrote:
> On Fri, 2011-01-21 at 10:17 +0000, ext Andy Whitcroft wrote:
>> On Fri, Jan 21, 2011 at 09:19:31AM +0200, Tapio Vihuri wrote:
>> > On Thu, 2011-01-20 at 10:38 +0100, ext Michal Marek wrote:
>> > > On 20.1.2011 09:06, WANG Cong wrote:
>> > > > On Wed, 19 Jan 2011 14:42:48 +0200, Tapio Vihuri wrote:
>> > > >
>> > > >> Hi
>> > > >>
>> > > >> Is this false positive ?
>> > > >>
>> > > >> WARNING: please write a paragraph that describes the config symbol fully
>> > > >> #60: FILE: drivers/input/misc/Kconfig:159: +       help
>> > > >>
>> > > >>
>> > > >> Interesting enough, also:
>> > > >>
>> > > >> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig WARNING:
>> > > >> please write a paragraph that describes the config symbol fully #430:
>> > > >> FILE: input/misc/Kconfig:430:
>> > > >> +       help
>> > > >>
>> > > >>
>> > > >> But this is different line.
>> > > >>
>> > > >
>> > > > Seems yes, the Kconfig part of your patch looks fine.
>> > >
>> > > The check is complaining that the help text is too short:
>> > >
>> > > +config ECI_CTRL_DEBUG
>> > > + bool "ECI controller debug"
>> > > + depends on INPUT_ECI_AT20
>> > > + help
>> > > +   Say Y here to enable debugging messages for ECI controller driver.
>> > >
>> > > Michal
>> >
>> > Hi.
>> >
>> > That I suspect, and I tried to add four lines more.
>> > But it still complain the same.
>>
>> If you have a patch which has four or more lines and trips this message
>> it is false yes.  Please do send me your example, as my current tests
>> pass.
>>
>> -apw
>
> Hi.
>
> Sorry for the delay, I had made stupid email filter. Mea Culpa.
>
> It's working OK. If there is only three lines of help, checkpatch will
> complain.
> With four lines, it's not.
>
> I add more help in my case. It toggle driver debug on/off, so I try
> harder to figure out how to say it with more words ;)
>
> BR,
> Tapio
>

I believe that the warning is not descriptive enough, I also had to
look into the checkpatch script to
figure out what is going on.
What about adding little explanation like that:

WARNING: please write a paragraph that describes the config symbol
fully (4 lines at least)

Thanks
Tomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-31 10:15           ` Tomas Winkler
@ 2011-01-31 13:42             ` Andy Whitcroft
  2011-01-31 19:08               ` Tomas Winkler
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Whitcroft @ 2011-01-31 13:42 UTC (permalink / raw)
  To: Tomas Winkler; +Cc: tapio.vihuri, ext Michal Marek, WANG Cong, linux-kernel

On Mon, Jan 31, 2011 at 12:15:10PM +0200, Tomas Winkler wrote:
> On Mon, Jan 31, 2011 at 10:19 AM, Tapio Vihuri <tapio.vihuri@nokia.com> wrote:
> > On Fri, 2011-01-21 at 10:17 +0000, ext Andy Whitcroft wrote:
> >> On Fri, Jan 21, 2011 at 09:19:31AM +0200, Tapio Vihuri wrote:
> >> > On Thu, 2011-01-20 at 10:38 +0100, ext Michal Marek wrote:
> >> > > On 20.1.2011 09:06, WANG Cong wrote:
> >> > > > On Wed, 19 Jan 2011 14:42:48 +0200, Tapio Vihuri wrote:
> >> > > >
> >> > > >> Hi
> >> > > >>
> >> > > >> Is this false positive ?
> >> > > >>
> >> > > >> WARNING: please write a paragraph that describes the config symbol fully
> >> > > >> #60: FILE: drivers/input/misc/Kconfig:159: +       help
> >> > > >>
> >> > > >>
> >> > > >> Interesting enough, also:
> >> > > >>
> >> > > >> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig WARNING:
> >> > > >> please write a paragraph that describes the config symbol fully #430:
> >> > > >> FILE: input/misc/Kconfig:430:
> >> > > >> +       help
> >> > > >>
> >> > > >>
> >> > > >> But this is different line.
> >> > > >>
> >> > > >
> >> > > > Seems yes, the Kconfig part of your patch looks fine.
> >> > >
> >> > > The check is complaining that the help text is too short:
> >> > >
> >> > > +config ECI_CTRL_DEBUG
> >> > > + bool "ECI controller debug"
> >> > > + depends on INPUT_ECI_AT20
> >> > > + help
> >> > > +   Say Y here to enable debugging messages for ECI controller driver.
> >> > >
> >> > > Michal
> >> >
> >> > Hi.
> >> >
> >> > That I suspect, and I tried to add four lines more.
> >> > But it still complain the same.
> >>
> >> If you have a patch which has four or more lines and trips this message
> >> it is false yes.  Please do send me your example, as my current tests
> >> pass.
> >>
> >> -apw
> >
> > Hi.
> >
> > Sorry for the delay, I had made stupid email filter. Mea Culpa.
> >
> > It's working OK. If there is only three lines of help, checkpatch will
> > complain.
> > With four lines, it's not.
> >
> > I add more help in my case. It toggle driver debug on/off, so I try
> > harder to figure out how to say it with more words ;)
> >
> > BR,
> > Tapio
> >
> 
> I believe that the warning is not descriptive enough, I also had to
> look into the checkpatch script to
> figure out what is going on.
> What about adding little explanation like that:
> 
> WARNING: please write a paragraph that describes the config symbol
> fully (4 lines at least)

Yeah that is a little better.  I do remind you that if the description
is good enough shorter than 4 lines then you can ignore checkpatch.  It
is a style guide not a style enforcer.  You are allowed to ignore things
if you can justify it.

-apw

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-31 13:42             ` Andy Whitcroft
@ 2011-01-31 19:08               ` Tomas Winkler
  2011-01-31 23:00                 ` Andi Kleen
  0 siblings, 1 reply; 12+ messages in thread
From: Tomas Winkler @ 2011-01-31 19:08 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: tapio.vihuri, ext Michal Marek, WANG Cong, linux-kernel

On Mon, Jan 31, 2011 at 3:42 PM, Andy Whitcroft <apw@canonical.com> wrote:
> On Mon, Jan 31, 2011 at 12:15:10PM +0200, Tomas Winkler wrote:
>> On Mon, Jan 31, 2011 at 10:19 AM, Tapio Vihuri <tapio.vihuri@nokia.com> wrote:
>> > On Fri, 2011-01-21 at 10:17 +0000, ext Andy Whitcroft wrote:
>> >> On Fri, Jan 21, 2011 at 09:19:31AM +0200, Tapio Vihuri wrote:
>> >> > On Thu, 2011-01-20 at 10:38 +0100, ext Michal Marek wrote:
>> >> > > On 20.1.2011 09:06, WANG Cong wrote:
>> >> > > > On Wed, 19 Jan 2011 14:42:48 +0200, Tapio Vihuri wrote:
>> >> > > >
>> >> > > >> Hi
>> >> > > >>
>> >> > > >> Is this false positive ?
>> >> > > >>
>> >> > > >> WARNING: please write a paragraph that describes the config symbol fully
>> >> > > >> #60: FILE: drivers/input/misc/Kconfig:159: +       help
>> >> > > >>
>> >> > > >>
>> >> > > >> Interesting enough, also:
>> >> > > >>
>> >> > > >> ./scripts/checkpatch.pl --file drivers/input/misc/Kconfig WARNING:
>> >> > > >> please write a paragraph that describes the config symbol fully #430:
>> >> > > >> FILE: input/misc/Kconfig:430:
>> >> > > >> +       help
>> >> > > >>
>> >> > > >>
>> >> > > >> But this is different line.
>> >> > > >>
>> >> > > >
>> >> > > > Seems yes, the Kconfig part of your patch looks fine.
>> >> > >
>> >> > > The check is complaining that the help text is too short:
>> >> > >
>> >> > > +config ECI_CTRL_DEBUG
>> >> > > + bool "ECI controller debug"
>> >> > > + depends on INPUT_ECI_AT20
>> >> > > + help
>> >> > > +   Say Y here to enable debugging messages for ECI controller driver.
>> >> > >
>> >> > > Michal
>> >> >
>> >> > Hi.
>> >> >
>> >> > That I suspect, and I tried to add four lines more.
>> >> > But it still complain the same.
>> >>
>> >> If you have a patch which has four or more lines and trips this message
>> >> it is false yes.  Please do send me your example, as my current tests
>> >> pass.
>> >>
>> >> -apw
>> >
>> > Hi.
>> >
>> > Sorry for the delay, I had made stupid email filter. Mea Culpa.
>> >
>> > It's working OK. If there is only three lines of help, checkpatch will
>> > complain.
>> > With four lines, it's not.
>> >
>> > I add more help in my case. It toggle driver debug on/off, so I try
>> > harder to figure out how to say it with more words ;)
>> >
>> > BR,
>> > Tapio
>> >
>>
>> I believe that the warning is not descriptive enough, I also had to
>> look into the checkpatch script to
>> figure out what is going on.
>> What about adding little explanation like that:
>>
>> WARNING: please write a paragraph that describes the config symbol
>> fully (4 lines at least)
>
> Yeah that is a little better.  I do remind you that if the description
> is good enough shorter than 4 lines then you can ignore checkpatch.  It
> is a style guide not a style enforcer.  You are allowed to ignore things
> if you can justify it.

Please consider patch I've posted
http://marc.info/?l=linux-kernel&m=129647530611677&w=2

Thanks
Tomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-31 19:08               ` Tomas Winkler
@ 2011-01-31 23:00                 ` Andi Kleen
  2011-02-01 12:11                   ` Tomas Winkler
  0 siblings, 1 reply; 12+ messages in thread
From: Andi Kleen @ 2011-01-31 23:00 UTC (permalink / raw)
  To: Andy Whitcroft, Tomas Winkler
  Cc: tapio.vihuri, ext Michal Marek, WANG Cong, linux-kernel

Tomas Winkler <tomasw@gmail.com> writes:

>>
>> Yeah that is a little better.  I do remind you that if the description
>> is good enough shorter than 4 lines then you can ignore checkpatch.  It
>> is a style guide not a style enforcer.  You are allowed to ignore things
>> if you can justify it.
>
> Please consider patch I've posted
> http://marc.info/?l=linux-kernel&m=129647530611677&w=2

I originally didn't put in the number intentionally to make
it harder to game it. Most likely for a whole driver
or whole subsystems 4 lines are not enough to describe
it properly. 

But yes if it's just for a debug feature you can ignore it.
But then most likely your debug feature shouldn't be 
in Kconfig in the first place, but some runtime setting

(rule of thumb: if it controls less than 1KB of code it's 
likely a bad idea in Kconfig) 

And more complex debug features that do actually carry
significant code should have proper description.

I think a better change would be to describe this
more fully, not add the number.

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Checkpatch problem with Kconfig help symbol ?
  2011-01-31 23:00                 ` Andi Kleen
@ 2011-02-01 12:11                   ` Tomas Winkler
  0 siblings, 0 replies; 12+ messages in thread
From: Tomas Winkler @ 2011-02-01 12:11 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Andy Whitcroft, tapio.vihuri, ext Michal Marek, WANG Cong, linux-kernel

On Tue, Feb 1, 2011 at 1:00 AM, Andi Kleen <ak@linux.intel.com> wrote:
> Tomas Winkler <tomasw@gmail.com> writes:
>
>>>
>>> Yeah that is a little better.  I do remind you that if the description
>>> is good enough shorter than 4 lines then you can ignore checkpatch.  It
>>> is a style guide not a style enforcer.  You are allowed to ignore things
>>> if you can justify it.
>>
>> Please consider patch I've posted
>> http://marc.info/?l=linux-kernel&m=129647530611677&w=2
>
> I originally didn't put in the number intentionally to make
> it harder to game it. Most likely for a whole driver
> or whole subsystems 4 lines are not enough to describe
> it properly.
>
> But yes if it's just for a debug feature you can ignore it.
> But then most likely your debug feature shouldn't be
> in Kconfig in the first place, but some runtime setting
>
> (rule of thumb: if it controls less than 1KB of code it's
> likely a bad idea in Kconfig)
>
> And more complex debug features that do actually carry
> significant code should have proper description.
>
> I think a better change would be to describe this
> more fully, not add the number.

These are all valid points but current message just leave you puzzled
and you have to look inside checkpatch.pl to figure out what it wants.
I'm not sure how would you lay your thoughts concisely  in one line
warning or script them into the script.

My guess would be that most of the developers  tends to come witch
checkpatch.pl clean and even when you expose the number 4 it still
make them stop and think how to fill them properly. Maybe you can
squeeze into the waring  pointer to CodyingStyle section.

Thanks
Tomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-02-01 12:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-19 12:42 Checkpatch problem with Kconfig help symbol ? Tapio Vihuri
2011-01-20  8:06 ` WANG Cong
2011-01-20  9:38   ` Michal Marek
2011-01-21  7:19     ` Tapio Vihuri
2011-01-21 10:17       ` Andy Whitcroft
2011-01-31  8:19         ` Tapio Vihuri
2011-01-31 10:15           ` Tomas Winkler
2011-01-31 13:42             ` Andy Whitcroft
2011-01-31 19:08               ` Tomas Winkler
2011-01-31 23:00                 ` Andi Kleen
2011-02-01 12:11                   ` Tomas Winkler
2011-01-25  1:32 ` checkpatch file name stripped mode Milton Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).