lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20180711111334.15423-1-brnkv.i1@gmail.com>
Date:   Wed, 11 Jul 2018 14:13:34 +0300
From:   Ivan Bornyakov <brnkv.i1@...il.com>
To:     devel@...verdev.osuosl.org
Cc:     linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
        benchan@...omium.org, jnjoseph@...gle.com, rspringer@...gle.com,
        Ivan Bornyakov <brnkv.i1@...il.com>
Subject: [PATCH] staging: gasket: fix plain integer as NULL pointer warning

Trivial fix to remove sparse warnings:

  drivers/staging/gasket/gasket_page_table.c:884:40: warning: Using plain integer as NULL pointer
  drivers/staging/gasket/gasket_page_table.c:1743:57: warning: Using plain integer as NULL pointer
  drivers/staging/gasket/gasket_page_table.c:1768:57: warning: Using plain integer as NULL pointer

Signed-off-by: Ivan Bornyakov <brnkv.i1@...il.com>
---
 drivers/staging/gasket/gasket_page_table.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_table.c
index c5390a860f86..5d3d33cac12f 100644
--- a/drivers/staging/gasket/gasket_page_table.c
+++ b/drivers/staging/gasket/gasket_page_table.c
@@ -881,7 +881,7 @@ static int gasket_perform_mapping(
 			u64 off =
 				(u64)host_addr -
 				(u64)pg_tbl->coherent_pages[0].user_virt;
-			ptes[i].page = 0;
+			ptes[i].page = NULL;
 			ptes[i].offset = offset;
 			ptes[i].dma_addr = pg_tbl->coherent_pages[0].paddr +
 					   off + i * PAGE_SIZE;
@@ -1740,7 +1740,7 @@ int gasket_free_coherent_memory(struct gasket_dev *gasket_dev, u64 size,
 				  gasket_dev->coherent_buffer.virt_base,
 				  gasket_dev->coherent_buffer.phys_base);
 		gasket_dev->coherent_buffer.length_bytes = 0;
-		gasket_dev->coherent_buffer.virt_base = 0;
+		gasket_dev->coherent_buffer.virt_base = NULL;
 		gasket_dev->coherent_buffer.phys_base = 0;
 	}
 	return 0;
@@ -1765,7 +1765,7 @@ void gasket_free_coherent_memory_all(
 				  gasket_dev->coherent_buffer.virt_base,
 				  gasket_dev->coherent_buffer.phys_base);
 		gasket_dev->coherent_buffer.length_bytes = 0;
-		gasket_dev->coherent_buffer.virt_base = 0;
+		gasket_dev->coherent_buffer.virt_base = NULL;
 		gasket_dev->coherent_buffer.phys_base = 0;
 	}
 }
-- 
2.16.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ