linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning
@ 2019-06-28 17:27 Harsh Jain
  2019-06-28 17:27 ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Harsh Jain
  0 siblings, 1 reply; 6+ messages in thread
From: Harsh Jain @ 2019-06-28 17:27 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel, harshjain32, harshjain.prof

It fixes sparse warning in kpc2000 driver.

Harsh Jain (2):
  staging:kpc2000:Fix symbol not declared warning
  staging:kpc2000:Fix integer as null pointer warning

 drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.17.1


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

* [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning
  2019-06-28 17:27 [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain
@ 2019-06-28 17:27 ` Harsh Jain
  2019-06-28 17:27   ` [PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain
  2019-07-01  8:43   ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Harsh Jain @ 2019-06-28 17:27 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel, harshjain32, harshjain.prof

It fixes "symbol was not declared. Should it be static?"
sparse warning.

Signed-off-by: Harsh Jain <harshjain32@gmail.com>
---
 drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
index 0fb068b2408d..204f33d0dc69 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);
-- 
2.17.1


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

* [PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning
  2019-06-28 17:27 ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Harsh Jain
@ 2019-06-28 17:27   ` Harsh Jain
  2019-07-01  8:43   ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Harsh Jain @ 2019-06-28 17:27 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel, harshjain32, harshjain.prof

It fixes "Using plain integer as NULL pointer"
sparse warning.

Signed-off-by: Harsh Jain <harshjain32@gmail.com>
---
 drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
index 204f33d0dc69..155da641e3a2 100644
--- a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
+++ b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
@@ -679,9 +679,9 @@ static 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


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

* Re: [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning
  2019-06-28 17:27 ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Harsh Jain
  2019-06-28 17:27   ` [PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain
@ 2019-07-01  8:43   ` Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2019-07-01  8:43 UTC (permalink / raw)
  To: Harsh Jain; +Cc: devel, linux-kernel, harshjain.prof

On Fri, Jun 28, 2019 at 10:57:23PM +0530, Harsh Jain wrote:
> It fixes "symbol was not declared. Should it be static?"
> sparse warning.
> 
> Signed-off-by: Harsh Jain <harshjain32@gmail.com>
> ---
>  drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++--

This file isn't even in the linux-next tree at all, it has moved weeks
ago.

Always be sure to work against linux-next so that you do not create
things that are not able to be accepted.

thanks,

greg k-h

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

* Re: [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning
  2019-06-28 17:00 [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain
@ 2019-06-28 17:26 ` harsh jain
  0 siblings, 0 replies; 6+ messages in thread
From: harsh jain @ 2019-06-28 17:26 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel, harsh jain, harshjain.prof

On Fri, Jun 28, 2019 at 10:31 PM Harsh Jain <harshjain32@gmail.com> wrote:
>
> From: root <harshjain32@gmail.com>
Again sent with wrong user. Please ignore this series. Will send the
updated one.
>
> It fixes sparse warning in kpc2000 driver.
>
> Harsh Jain (2):
>   staging:kpc2000:Fix symbol not declared warning
>   staging:kpc2000:Fix integer as null pointer warning
>
>  drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> --
> 2.17.1
>

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

* [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning
@ 2019-06-28 17:00 Harsh Jain
  2019-06-28 17:26 ` harsh jain
  0 siblings, 1 reply; 6+ messages in thread
From: Harsh Jain @ 2019-06-28 17:00 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel, harshjain32, harshjain.prof

From: root <harshjain32@gmail.com>

It fixes sparse warning in kpc2000 driver.

Harsh Jain (2):
  staging:kpc2000:Fix symbol not declared warning
  staging:kpc2000:Fix integer as null pointer warning

 drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-07-01  8:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-28 17:27 [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain
2019-06-28 17:27 ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Harsh Jain
2019-06-28 17:27   ` [PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain
2019-07-01  8:43   ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2019-06-28 17:00 [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain
2019-06-28 17:26 ` harsh jain

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).