[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190627185138.26214-1-harshjain32@gmail.com>
Date: Fri, 28 Jun 2019 00:21:38 +0530
From: Harsh Jain <harshjain32@...il.com>
To: gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, harshjain32@...il.com,
harshjain.prof@...il.com
Subject: [PATCH] staging:kpc2000:Fix sparse warnings
From: root <harshjain32@...il.com>
Fix following sparse warning
symbol was not declared. Should it be static?
Using plain integer as NULL pointer
Signed-off-by: Harsh Jain <harshjain32@...il.com>
---
drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
index 0fb068b2408d..155da641e3a2 100644
--- a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
+++ b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
@@ -614,7 +614,7 @@ static const struct i2c_algorithm smbus_algorithm = {
/********************************
*** Part 2 - Driver Handlers ***
********************************/
-int pi2c_probe(struct platform_device *pldev)
+static int pi2c_probe(struct platform_device *pldev)
{
int err;
struct i2c_device *priv;
@@ -664,7 +664,7 @@ int pi2c_probe(struct platform_device *pldev)
return 0;
}
-int pi2c_remove(struct platform_device *pldev)
+static int pi2c_remove(struct platform_device *pldev)
{
struct i2c_device *lddev;
dev_dbg(&pldev->dev, "pi2c_remove(pldev = %p '%s')\n", pldev, pldev->name);
@@ -679,9 +679,9 @@ int pi2c_remove(struct platform_device *pldev)
//pci_set_drvdata(dev, NULL);
//cdev_del(&lddev->cdev);
- if(lddev != 0) {
+ if(lddev != NULL) {
kfree(lddev);
- pldev->dev.platform_data = 0;
+ pldev->dev.platform_data = NULL;
}
return 0;
--
2.17.1
Powered by blists - more mailing lists