From 403c5c0650816375527a6feecfb255d9b494dda3 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 8 Oct 2015 09:11:48 +0200 Subject: [PATCH 1/3] HSI: Remove struct hsi_client private fields from kernel-doc The kernel-doc how to says that structure fields that are inside a "private:" area shouldn't be listed in the generated documentation but the private fields for struct hsi_client private are listed. This also fixes the following make htmldocs warnings: .//include/linux/hsi/hsi.h:150: warning: Excess struct/union/enum/typedef member 'e_handler' description in 'hsi_client' .//include/linux/hsi/hsi.h:150: warning: Excess struct/union/enum/typedef member 'pclaimed' description in 'hsi_client' .//include/linux/hsi/hsi.h:150: warning: Excess struct/union/enum/typedef member 'nb' description in 'hsi_client' Signed-off-by: Javier Martinez Canillas Signed-off-by: Sebastian Reichel --- include/linux/hsi/hsi.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/hsi/hsi.h b/include/linux/hsi/hsi.h index 5dd60c2e120f..2790591c77cf 100644 --- a/include/linux/hsi/hsi.h +++ b/include/linux/hsi/hsi.h @@ -135,9 +135,6 @@ static inline int hsi_register_board_info(struct hsi_board_info const *info, * @device: Driver model representation of the device * @tx_cfg: HSI TX configuration * @rx_cfg: HSI RX configuration - * @e_handler: Callback for handling port events (RX Wake High/Low) - * @pclaimed: Keeps tracks if the clients claimed its associated HSI port - * @nb: Notifier block for port events */ struct hsi_client { struct device device; From 6bf6ded3008a407ccab5ad72eb59ab71b97cc290 Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:43 +0200 Subject: [PATCH 2/3] HSI: omap_ssi: fix handling ida_simple_get result The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Sebastian Reichel --- drivers/hsi/controllers/omap_ssi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/hsi/controllers/omap_ssi.c b/drivers/hsi/controllers/omap_ssi.c index f6d3100b7a32..27b91f14ba7a 100644 --- a/drivers/hsi/controllers/omap_ssi.c +++ b/drivers/hsi/controllers/omap_ssi.c @@ -323,11 +323,10 @@ static int __init ssi_add_controller(struct hsi_controller *ssi, return -ENOMEM; } - ssi->id = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL); - if (ssi->id < 0) { - err = ssi->id; + err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL); + if (err < 0) goto out_err; - } + ssi->id = err; ssi->owner = THIS_MODULE; ssi->device.parent = &pd->dev; From 525e1abc6b5a7d8bd9006de1da6e99722305ea2b Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:44 +0200 Subject: [PATCH 3/3] HSI: omap_ssi_port: fix handling of_get_named_gpio result The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Sebastian Reichel --- drivers/hsi/controllers/omap_ssi_port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index 02e66032ae73..e80a66e20998 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -1147,13 +1147,13 @@ static int __init ssi_port_probe(struct platform_device *pd) goto error; } - cawake_gpio = of_get_named_gpio(np, "ti,ssi-cawake-gpio", 0); - if (cawake_gpio < 0) { + err = of_get_named_gpio(np, "ti,ssi-cawake-gpio", 0); + if (err < 0) { dev_err(&pd->dev, "DT data is missing cawake gpio (err=%d)\n", - cawake_gpio); - err = -ENODEV; + err); goto error; } + cawake_gpio = err; err = devm_gpio_request_one(&port->device, cawake_gpio, GPIOF_DIR_IN, "cawake");