diff mbox series

spi: bcm2835aux: Fix build error without CONFIG_DEBUG_FS

Message ID 20190406151457.32104-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Commit 9b186e9a65bffaef5ed56878095544b64584c29c
Headers show
Series spi: bcm2835aux: Fix build error without CONFIG_DEBUG_FS | expand

Commit Message

Yue Haibing April 6, 2019, 3:14 p.m. UTC
From: YueHaibing <yuehaibing@huawei.com>

When building CONFIG_DEBUG_FS is not set
gcc warn this:

drivers/spi/spi-bcm2835aux.c: In function bcm2835aux_spi_probe:
drivers/spi/spi-bcm2835aux.c:591:2: error: too many arguments to function bcm2835aux_debugfs_create
  bcm2835aux_debugfs_create(bs, dev_name(&pdev->dev));
  ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-bcm2835aux.c:145:13: note: declared here
 static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs)

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 8048d151eb4d ("spi: bcm2835aux: add driver stats to debugfs")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-bcm2835aux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mukesh Ojha April 6, 2019, 6:55 p.m. UTC | #1
On 4/6/2019 8:44 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> When building CONFIG_DEBUG_FS is not set
> gcc warn this:
>
> drivers/spi/spi-bcm2835aux.c: In function bcm2835aux_spi_probe:
> drivers/spi/spi-bcm2835aux.c:591:2: error: too many arguments to function bcm2835aux_debugfs_create
>    bcm2835aux_debugfs_create(bs, dev_name(&pdev->dev));
>    ^~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/spi/spi-bcm2835aux.c:145:13: note: declared here
>   static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs)
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 8048d151eb4d ("spi: bcm2835aux: add driver stats to debugfs")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh

> ---
>   drivers/spi/spi-bcm2835aux.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c
> index fd8252d..bbf87ad 100644
> --- a/drivers/spi/spi-bcm2835aux.c
> +++ b/drivers/spi/spi-bcm2835aux.c
> @@ -142,7 +142,8 @@ static void bcm2835aux_debugfs_remove(struct bcm2835aux_spi *bs)
>   	bs->debugfs_dir = NULL;
>   }
>   #else
> -static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs)
> +static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs,
> +				      const char *dname)
>   {
>   }
>
diff mbox series

Patch

diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c
index fd8252d..bbf87ad 100644
--- a/drivers/spi/spi-bcm2835aux.c
+++ b/drivers/spi/spi-bcm2835aux.c
@@ -142,7 +142,8 @@  static void bcm2835aux_debugfs_remove(struct bcm2835aux_spi *bs)
 	bs->debugfs_dir = NULL;
 }
 #else
-static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs)
+static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs,
+				      const char *dname)
 {
 }