Commit c75f5ad3 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: more in isdn

annotations and NULL noise removals in drivres/isdn (more BROKEN_ON_SMP
stuff)
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4e3b04fb
...@@ -67,14 +67,14 @@ avmcard *b1_alloc_card(int nr_controllers) ...@@ -67,14 +67,14 @@ avmcard *b1_alloc_card(int nr_controllers)
card = kmalloc(sizeof(*card), GFP_KERNEL); card = kmalloc(sizeof(*card), GFP_KERNEL);
if (!card) if (!card)
return 0; return NULL;
memset(card, 0, sizeof(*card)); memset(card, 0, sizeof(*card));
cinfo = kmalloc(sizeof(*cinfo) * nr_controllers, GFP_KERNEL); cinfo = kmalloc(sizeof(*cinfo) * nr_controllers, GFP_KERNEL);
if (!cinfo) { if (!cinfo) {
kfree(card); kfree(card);
return 0; return NULL;
} }
memset(cinfo, 0, sizeof(*cinfo) * nr_controllers); memset(cinfo, 0, sizeof(*cinfo) * nr_controllers);
...@@ -753,7 +753,7 @@ avmcard_dma_alloc(char *name, struct pci_dev *pdev, long rsize, long ssize) ...@@ -753,7 +753,7 @@ avmcard_dma_alloc(char *name, struct pci_dev *pdev, long rsize, long ssize)
err_kfree: err_kfree:
kfree(p); kfree(p);
err: err:
return 0; return NULL;
} }
void avmcard_dma_free(avmcard_dmainfo *p) void avmcard_dma_free(avmcard_dmainfo *p)
......
...@@ -96,7 +96,7 @@ hycapi_remove_ctr(struct capi_ctr *ctrl) ...@@ -96,7 +96,7 @@ hycapi_remove_ctr(struct capi_ctr *ctrl)
} }
} }
detach_capi_ctr(ctrl); detach_capi_ctr(ctrl);
ctrl->driverdata = 0; ctrl->driverdata = NULL;
kfree(card->hyctrlinfo); kfree(card->hyctrlinfo);
...@@ -678,7 +678,7 @@ attach the capi-driver to the kernel-capi. ...@@ -678,7 +678,7 @@ attach the capi-driver to the kernel-capi.
***********************************************************/ ***********************************************************/
int hycapi_init() int hycapi_init(void)
{ {
int i; int i;
for(i=0;i<CAPI_MAXAPPL;i++) { for(i=0;i<CAPI_MAXAPPL;i++) {
......
...@@ -89,7 +89,7 @@ process_line(struct conf_writedata *cnf) ...@@ -89,7 +89,7 @@ process_line(struct conf_writedata *cnf)
/* write conf file -> boot or send cfg line to card */ /* write conf file -> boot or send cfg line to card */
/****************************************************/ /****************************************************/
static ssize_t static ssize_t
hysdn_conf_write(struct file *file, const char *buf, size_t count, loff_t * off) hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
{ {
struct conf_writedata *cnf; struct conf_writedata *cnf;
int i; int i;
...@@ -209,7 +209,7 @@ hysdn_conf_write(struct file *file, const char *buf, size_t count, loff_t * off) ...@@ -209,7 +209,7 @@ hysdn_conf_write(struct file *file, const char *buf, size_t count, loff_t * off)
/* read conf file -> output card info data */ /* read conf file -> output card info data */
/*******************************************/ /*******************************************/
static ssize_t static ssize_t
hysdn_conf_read(struct file *file, char *buf, size_t count, loff_t * off) hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t * off)
{ {
char *cp; char *cp;
int i; int i;
......
...@@ -150,7 +150,7 @@ put_log_buffer(hysdn_card * card, char *cp) ...@@ -150,7 +150,7 @@ put_log_buffer(hysdn_card * card, char *cp)
/* write log file -> set log level bits */ /* write log file -> set log level bits */
/****************************************/ /****************************************/
static ssize_t static ssize_t
hysdn_log_write(struct file *file, const char *buf, size_t count, loff_t * off) hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
{ {
ulong u = 0; ulong u = 0;
int found = 0; int found = 0;
...@@ -203,7 +203,7 @@ hysdn_log_write(struct file *file, const char *buf, size_t count, loff_t * off) ...@@ -203,7 +203,7 @@ hysdn_log_write(struct file *file, const char *buf, size_t count, loff_t * off)
/* read log file */ /* read log file */
/******************/ /******************/
static ssize_t static ssize_t
hysdn_log_read(struct file *file, char *buf, size_t count, loff_t * off) hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t * off)
{ {
struct log_data *inf; struct log_data *inf;
int len; int len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment