From: "Mika Kukkonen" CHECK net/irda/irlmp.c net/irda/irlmp.c:1494:10: warning: Using plain integer as NULL pointer net/irda/irlmp.c:1564:2: warning: Using plain integer as NULL pointer net/irda/irlmp.c:1570:10: warning: Using plain integer as NULL pointer CHECK net/irda/irlan/irlan_client.c net/irda/irlan/irlan_client.c:237:14: warning: assignment expression in conditional CHECK net/irda/ircomm/ircomm_tty.c net/irda/ircomm/ircomm_tty.c:564:14: warning: Using plain integer as NULL pointer net/irda/ircomm/ircomm_tty.c:724:28: warning: incorrect type in argument 2 (different address spaces) net/irda/ircomm/ircomm_tty.c:724:28: expected void const [noderef] *from net/irda/ircomm/ircomm_tty.c:724:28: got unsigned char const *ubuf net/irda/ircomm/ircomm_tty.c:1048:14: warning: Using plain integer as NULL pointer CC [M] net/irda/ircomm/ircomm_tty.o net/irda/ircomm/ircomm_tty.c:1272: warning: `ircomm_tty_line_info' defined but not used Last one (net/irda/ircomm/ircomm_tty.c) requires some explaining: - I added __user cast to line 724, as a) The code is obviously correct b) If the interface needs to be fixed, then that means rewriting the whole TTY-layer code (i.e. include/linux/tty_driver.h), so I do not think I am hiding here anything - The GCC warning (line 1272) comes from !CONFIG_PROC_FS (an accidental finding, I had not done 'make allmodconfig'). I fixed this simply by moving the existing '#ifdef CONFIG_PROC_FS' upwards. Signed-off-by: Andrew Morton --- 25-akpm/net/irda/irlan/irlan_client.c | 2 +- 25-akpm/net/irda/irlmp.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff -puN net/irda/irlan/irlan_client.c~fix-warnings-in-net-irda net/irda/irlan/irlan_client.c --- 25/net/irda/irlan/irlan_client.c~fix-warnings-in-net-irda 2004-07-05 21:12:40.854936984 -0700 +++ 25-akpm/net/irda/irlan/irlan_client.c 2004-07-05 21:12:40.862935768 -0700 @@ -234,7 +234,7 @@ static void irlan_client_ctrl_disconnect ASSERT(tsap == self->client.tsap_ctrl, return;); /* Remove frames queued on the control channel */ - while ((skb = skb_dequeue(&self->client.txq))) { + while ((skb = skb_dequeue(&self->client.txq)) != NULL) { dev_kfree_skb(skb); } self->client.tx_busy = FALSE; diff -puN net/irda/irlmp.c~fix-warnings-in-net-irda net/irda/irlmp.c --- 25/net/irda/irlmp.c~fix-warnings-in-net-irda 2004-07-05 21:12:40.856936680 -0700 +++ 25-akpm/net/irda/irlmp.c 2004-07-05 21:12:40.861935920 -0700 @@ -1491,7 +1491,7 @@ void *irlmp_register_service(__u16 hints service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC); if (!service) { IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__); - return 0; + return NULL; } service->hints.word = hints; hashbin_insert(irlmp->services, (irda_queue_t *) service, @@ -1561,13 +1561,13 @@ void *irlmp_register_client(__u16 hint_m irlmp_client_t *client; IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(irlmp != NULL, return 0;); + ASSERT(irlmp != NULL, return NULL;); /* Make a new registration */ client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); if (!client) { IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __FUNCTION__); - return 0; + return NULL; } /* Register the details */ _