From 515762b9164a4e4ba5c775ceab89753a20a0c632 Mon Sep 17 00:00:00 2001 From: Hariprasad Kelam Date: Sat, 6 Apr 2019 17:59:12 +0530 Subject: xen: xen-pciback: fix warning Using plain integer as NULL pointer Changes passing function argument 0 to NULL to avoid below sparse warning CHECK drivers/xen/xen-pciback/xenbus.c drivers/xen/xen-pciback/xenbus.c:700:51: warning: Using plain integer as NULL pointer Signed-off-by: Hariprasad Kelam Reviewed-by: Mukesh Ojha Signed-off-by: Boris Ostrovsky --- drivers/xen/xen-pciback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/xen') diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c index 23f7f6ec7d1f..833b2d2c4318 100644 --- a/drivers/xen/xen-pciback/xenbus.c +++ b/drivers/xen/xen-pciback/xenbus.c @@ -697,7 +697,7 @@ static int xen_pcibk_xenbus_probe(struct xenbus_device *dev, /* We need to force a call to our callback here in case * xend already configured us! */ - xen_pcibk_be_watch(&pdev->be_watch, NULL, 0); + xen_pcibk_be_watch(&pdev->be_watch, NULL, NULL); out: return err; -- cgit v1.2.3 From 51cf07a7b6cd99d9b910932e2af4e7282782e3fe Mon Sep 17 00:00:00 2001 From: Mao Wenan Date: Tue, 16 Apr 2019 12:06:51 +0800 Subject: xenbus: drop useless LIST_HEAD in xenbus_write_watch() and xenbus_file_write() Drop LIST_HEAD where the variable it declares is never used. The declarations were introduced with the file, but the declared variables were not used. Fixes: 1107ba885e469 ("xen: add xenfs to allow usermode <-> Xen interaction") Signed-off-by: Mao Wenan Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky --- drivers/xen/xenbus/xenbus_dev_frontend.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/xen') diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c index 0782ff3c2273..faf452d0edf0 100644 --- a/drivers/xen/xenbus/xenbus_dev_frontend.c +++ b/drivers/xen/xenbus/xenbus_dev_frontend.c @@ -465,7 +465,6 @@ static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u) struct watch_adapter *watch; char *path, *token; int err, rc; - LIST_HEAD(staging_q); path = u->u.buffer + sizeof(u->u.msg); token = memchr(path, 0, u->u.msg.len); @@ -523,7 +522,6 @@ static ssize_t xenbus_file_write(struct file *filp, uint32_t msg_type; int rc = len; int ret; - LIST_HEAD(staging_q); /* * We're expecting usermode to be writing properly formed -- cgit v1.2.3