From patchwork Sun Aug 12 04:47:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 10563593 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE0431515 for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E42029A21 for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F09E298EC; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED1BC298EC for ; Sun, 12 Aug 2018 04:48:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727012AbeHLHYz (ORCPT ); Sun, 12 Aug 2018 03:24:55 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:48952 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbeHLHYz (ORCPT ); Sun, 12 Aug 2018 03:24:55 -0400 X-IronPort-AV: E=Sophos;i="5.53,227,1531810800"; d="scan'208";a="17807201" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Aug 2018 21:48:17 -0700 Received: from ajaysk-VirtualBox.microchip.com (10.10.76.4) by chn-sv-exch03.mchp-main.com (10.10.76.49) with Microsoft SMTP Server id 14.3.352.0; Sat, 11 Aug 2018 21:48:17 -0700 From: Ajay Singh To: CC: , , , , , , , Ajay Singh Subject: [PATCH 1/5] staging: wilc1000: avoid arrray of 'wilc_debugfs_info_t' type Date: Sun, 12 Aug 2018 10:17:41 +0530 Message-ID: <1534049265-5600-2-git-send-email-ajay.kathat@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> References: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Refactor code by removing array of 'wilc_debugfs_info_t' type and use single variable to store 'wilc_debugfs_info_t' struct value. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_debugfs.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index edc7287..c5f67c9 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -78,29 +78,21 @@ struct wilc_debugfs_info_t { const struct file_operations fops; }; -static struct wilc_debugfs_info_t debugfs_info[] = { - { - "wilc_debug_level", - 0666, - (DEBUG | ERR), - FOPS(NULL, wilc_debug_level_read, wilc_debug_level_write, NULL), - }, +static struct wilc_debugfs_info_t debugfs_info = { + "wilc_debug_level", + 0666, + (DEBUG | ERR), + FOPS(NULL, wilc_debug_level_read, wilc_debug_level_write, NULL), }; int wilc_debugfs_init(void) { - int i; - struct wilc_debugfs_info_t *info; + struct wilc_debugfs_info_t *info = &debugfs_info; wilc_dir = debugfs_create_dir("wilc_wifi", NULL); - for (i = 0; i < ARRAY_SIZE(debugfs_info); i++) { - info = &debugfs_info[i]; - debugfs_create_file(info->name, - info->perm, - wilc_dir, - &info->data, - &info->fops); - } + debugfs_create_file(info->name, info->perm, wilc_dir, &info->data, + &info->fops); + return 0; } From patchwork Sun Aug 12 04:47:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 10563601 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0956EA748 for ; Sun, 12 Aug 2018 04:48:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EECDF298EB for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB536298EC; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23E48298EF for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727089AbeHLHY6 (ORCPT ); Sun, 12 Aug 2018 03:24:58 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:16607 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbeHLHY6 (ORCPT ); Sun, 12 Aug 2018 03:24:58 -0400 X-IronPort-AV: E=Sophos;i="5.53,227,1531810800"; d="scan'208";a="15726988" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Aug 2018 21:48:22 -0700 Received: from ajaysk-VirtualBox.microchip.com (10.10.76.4) by chn-sv-exch03.mchp-main.com (10.10.76.49) with Microsoft SMTP Server id 14.3.352.0; Sat, 11 Aug 2018 21:48:20 -0700 From: Ajay Singh To: CC: , , , , , , , Ajay Singh Subject: [PATCH 2/5] staging: wilc1000: fixes for undefined reference to `__this_module' error Date: Sun, 12 Aug 2018 10:17:42 +0530 Message-ID: <1534049265-5600-3-git-send-email-ajay.kathat@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> References: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP wilc_debug.o object file is included for both SDIO and SPI module. When anyone(either SDIO or SPI) module is compiled as loaded module and another as buildin module then below compilation error occurs. "drivers/staging/wilc1000/wilc_debugfs.o:(.data+0x10): undefined reference to `__this_module'" Moved the declaration of file_operation variable in SDIO/SPI files and pass this as parameter to wilc_debugfs_init(). Remove 'fops' element from 'wilc_debugfs_info_t' struct, as its not required. Fixes: 9abc44ba4e2f ("staging: wilc1000: fix TODO to compile spi and sdio components in single module") Reported-by: kbuild test robot Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 1 - drivers/staging/wilc1000/wilc_debugfs.c | 23 ++++++----------------- drivers/staging/wilc1000/wilc_sdio.c | 7 +++++++ drivers/staging/wilc1000/wilc_spi.c | 7 +++++++ drivers/staging/wilc1000/wilc_wlan_if.h | 7 ++++++- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 01cf4bd..37885ad 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1062,7 +1062,6 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type, if (!wl) return -ENOMEM; - wilc_debugfs_init(); *wilc = wl; wl->io_type = io_type; wl->hif_func = ops; diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index c5f67c9..78c0831 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -20,8 +20,8 @@ static struct dentry *wilc_dir; #define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR) static atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR); -static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, - size_t count, loff_t *ppos) +ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, + size_t count, loff_t *ppos) { char buf[128]; int res = 0; @@ -36,9 +36,8 @@ static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, return simple_read_from_buffer(userbuf, count, ppos, buf, res); } -static ssize_t wilc_debug_level_write(struct file *filp, - const char __user *buf, size_t count, - loff_t *ppos) +ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf, + size_t count, loff_t *ppos) { int flag = 0; int ret; @@ -63,35 +62,25 @@ static ssize_t wilc_debug_level_write(struct file *filp, return count; } -#define FOPS(_open, _read, _write, _poll) { \ - .owner = THIS_MODULE, \ - .open = (_open), \ - .read = (_read), \ - .write = (_write), \ - .poll = (_poll), \ -} - struct wilc_debugfs_info_t { const char *name; int perm; unsigned int data; - const struct file_operations fops; }; static struct wilc_debugfs_info_t debugfs_info = { "wilc_debug_level", 0666, (DEBUG | ERR), - FOPS(NULL, wilc_debug_level_read, wilc_debug_level_write, NULL), }; -int wilc_debugfs_init(void) +int wilc_debugfs_init(const struct file_operations *fops) { struct wilc_debugfs_info_t *info = &debugfs_info; wilc_dir = debugfs_create_dir("wilc_wifi", NULL); debugfs_create_file(info->name, info->perm, wilc_dir, &info->data, - &info->fops); + fops); return 0; } diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index b2080d8..c1573f5 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -103,6 +103,12 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd) return ret; } +static const struct file_operations sdio_debug_fops = { + .owner = THIS_MODULE, + .read = wilc_debug_level_read, + .write = wilc_debug_level_write, +}; + static int linux_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) { @@ -126,6 +132,7 @@ static int linux_sdio_probe(struct sdio_func *func, dev_err(&func->dev, "Couldn't initialize netdev\n"); return ret; } + wilc_debugfs_init(&sdio_debug_fops); sdio_set_drvdata(func, wilc); wilc->dev = &func->dev; wilc->gpio_irq = gpio; diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 5517477..0376649 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -102,6 +102,12 @@ static u8 crc7(u8 crc, const u8 *buffer, u32 len) #define USE_SPI_DMA 0 +static const struct file_operations spi_debug_fops = { + .owner = THIS_MODULE, + .read = wilc_debug_level_read, + .write = wilc_debug_level_write, +}; + static int wilc_bus_probe(struct spi_device *spi) { int ret; @@ -120,6 +126,7 @@ static int wilc_bus_probe(struct spi_device *spi) if (ret) return ret; + wilc_debugfs_init(&spi_debug_fops); spi_set_drvdata(spi, wilc); wilc->dev = &spi->dev; wilc->gpio_irq = gpio; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 00d13b1..47b4020 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -831,6 +831,11 @@ struct wilc; int wilc_wlan_init(struct net_device *dev); u32 wilc_get_chipid(struct wilc *wilc, bool update); -int wilc_debugfs_init(void); +int wilc_debugfs_init(const struct file_operations *fops); void wilc_debugfs_remove(void); +ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, + size_t count, loff_t *ppos); +ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf, + size_t count, loff_t *ppos); + #endif From patchwork Sun Aug 12 04:47:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 10563595 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C72BD9093 for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6504298EC for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAD4D29A0E; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44E50298F2 for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727499AbeHLHZC (ORCPT ); Sun, 12 Aug 2018 03:25:02 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:34067 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbeHLHZC (ORCPT ); Sun, 12 Aug 2018 03:25:02 -0400 X-IronPort-AV: E=Sophos;i="5.53,227,1531810800"; d="scan'208";a="17807205" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Aug 2018 21:48:24 -0700 Received: from ajaysk-VirtualBox.microchip.com (10.10.76.4) by chn-sv-exch03.mchp-main.com (10.10.76.49) with Microsoft SMTP Server id 14.3.352.0; Sat, 11 Aug 2018 21:48:24 -0700 From: Ajay Singh To: CC: , , , , , , , Ajay Singh Subject: [PATCH 3/5] staging: wilc1000: remove the use of 'wilc_debugfs_info_t' struct Date: Sun, 12 Aug 2018 10:17:43 +0530 Message-ID: <1534049265-5600-4-git-send-email-ajay.kathat@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> References: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Refactor the code to remove the use of 'wilc_debugfs_info_t' struct. Pass NULL for data in debugfs_create_file() call, as its value is not used. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_debugfs.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index 78c0831..c9bc325 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -62,25 +62,10 @@ ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf, return count; } -struct wilc_debugfs_info_t { - const char *name; - int perm; - unsigned int data; -}; - -static struct wilc_debugfs_info_t debugfs_info = { - "wilc_debug_level", - 0666, - (DEBUG | ERR), -}; - int wilc_debugfs_init(const struct file_operations *fops) { - struct wilc_debugfs_info_t *info = &debugfs_info; - wilc_dir = debugfs_create_dir("wilc_wifi", NULL); - debugfs_create_file(info->name, info->perm, wilc_dir, &info->data, - fops); + debugfs_create_file("wilc_debug_level", 0666, wilc_dir, NULL, fops); return 0; } From patchwork Sun Aug 12 04:47:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 10563599 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4A7D1815 for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5A04298EB for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9C2D2990C; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F82C298EB for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727531AbeHLHZF (ORCPT ); Sun, 12 Aug 2018 03:25:05 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:16612 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727503AbeHLHZF (ORCPT ); Sun, 12 Aug 2018 03:25:05 -0400 X-IronPort-AV: E=Sophos;i="5.53,227,1531810800"; d="scan'208";a="15726990" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Aug 2018 21:48:29 -0700 Received: from ajaysk-VirtualBox.microchip.com (10.10.76.4) by chn-sv-exch03.mchp-main.com (10.10.76.49) with Microsoft SMTP Server id 14.3.352.0; Sat, 11 Aug 2018 21:48:27 -0700 From: Ajay Singh To: CC: , , , , , , , Ajay Singh Subject: [PATCH 4/5] staging: wilc1000: change permission to 0600 in debugfs_create_file() call Date: Sun, 12 Aug 2018 10:17:44 +0530 Message-ID: <1534049265-5600-5-git-send-email-ajay.kathat@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> References: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cleanup patch to use more restrictive access permission for debugfs file. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index c9bc325..15e797b 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -65,7 +65,7 @@ ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf, int wilc_debugfs_init(const struct file_operations *fops) { wilc_dir = debugfs_create_dir("wilc_wifi", NULL); - debugfs_create_file("wilc_debug_level", 0666, wilc_dir, NULL, fops); + debugfs_create_file("wilc_debug_level", 0600, wilc_dir, NULL, fops); return 0; } From patchwork Sun Aug 12 04:47:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 10563603 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44F43157B for ; Sun, 12 Aug 2018 04:48:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35FC6298EB for ; Sun, 12 Aug 2018 04:48:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A774298EC; Sun, 12 Aug 2018 04:48:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 907ED29A0D for ; Sun, 12 Aug 2018 04:48:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727564AbeHLHZJ (ORCPT ); Sun, 12 Aug 2018 03:25:09 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:19134 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727503AbeHLHZJ (ORCPT ); Sun, 12 Aug 2018 03:25:09 -0400 X-IronPort-AV: E=Sophos;i="5.53,227,1531810800"; d="scan'208";a="17807210" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Aug 2018 21:48:32 -0700 Received: from ajaysk-VirtualBox.microchip.com (10.10.76.4) by chn-sv-exch03.mchp-main.com (10.10.76.49) with Microsoft SMTP Server id 14.3.352.0; Sat, 11 Aug 2018 21:48:31 -0700 From: Ajay Singh To: CC: , , , , , , , Ajay Singh Subject: [PATCH 5/5] staging: wilc1000: use void return for wilc_debugfs_init() Date: Sun, 12 Aug 2018 10:17:45 +0530 Message-ID: <1534049265-5600-6-git-send-email-ajay.kathat@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> References: <1534049265-5600-1-git-send-email-ajay.kathat@microchip.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change the return type from int to void for wilc_debugfs_init(), as its return value is not used. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_debugfs.c | 4 +--- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index 15e797b..1a2c4e7 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -62,12 +62,10 @@ ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf, return count; } -int wilc_debugfs_init(const struct file_operations *fops) +void wilc_debugfs_init(const struct file_operations *fops) { wilc_dir = debugfs_create_dir("wilc_wifi", NULL); debugfs_create_file("wilc_debug_level", 0600, wilc_dir, NULL, fops); - - return 0; } void wilc_debugfs_remove(void) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 47b4020..21f72a8 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -831,7 +831,7 @@ struct wilc; int wilc_wlan_init(struct net_device *dev); u32 wilc_get_chipid(struct wilc *wilc, bool update); -int wilc_debugfs_init(const struct file_operations *fops); +void wilc_debugfs_init(const struct file_operations *fops); void wilc_debugfs_remove(void); ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, size_t count, loff_t *ppos);