Skip to content

Commit

Permalink
[SCSI] aic7xxx: Remove OS utility wrappers
Browse files Browse the repository at this point in the history
This patch removes malloc(), free(), and printf() wrappers from the aic7xxx
SCSI driver. I didn't use pr_debug for printf because of some 'clever' uses of
printf don't compile with the pr_debug. I didn't fix the overeager uses of
GFP_ATOMIC either because I wanted to keep this patch as simple as possible.

[jejb:fixed up checkpatch errors and fixed up missed conversion]
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Pekka Enberg authored and James Bottomley committed Jul 28, 2010
1 parent 660bddd commit 48813cf
Show file tree
Hide file tree
Showing 15 changed files with 712 additions and 738 deletions.
12 changes: 6 additions & 6 deletions drivers/scsi/aic7xxx/aic7770.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
case 15:
break;
default:
printf("aic7770_config: invalid irq setting %d\n", intdef);
printk("aic7770_config: invalid irq setting %d\n", intdef);
return (ENXIO);
}

Expand Down Expand Up @@ -221,7 +221,7 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
break;
}
if (have_seeprom == 0) {
free(ahc->seep_config, M_DEVBUF);
kfree(ahc->seep_config);
ahc->seep_config = NULL;
}

Expand Down Expand Up @@ -293,24 +293,24 @@ aha2840_load_seeprom(struct ahc_softc *ahc)
sc = ahc->seep_config;

if (bootverbose)
printf("%s: Reading SEEPROM...", ahc_name(ahc));
printk("%s: Reading SEEPROM...", ahc_name(ahc));
have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
/*start_addr*/0, sizeof(*sc)/2);

if (have_seeprom) {

if (ahc_verify_cksum(sc) == 0) {
if(bootverbose)
printf ("checksum error\n");
printk ("checksum error\n");
have_seeprom = 0;
} else if (bootverbose) {
printf("done.\n");
printk("done.\n");
}
}

if (!have_seeprom) {
if (bootverbose)
printf("%s: No SEEPROM available\n", ahc_name(ahc));
printk("%s: No SEEPROM available\n", ahc_name(ahc));
ahc->flags |= AHC_USEDEFAULTS;
} else {
/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/aic7xxx/aic7770_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ aic7770_probe(struct device *dev)
int error;

sprintf(buf, "ahc_eisa:%d", eisaBase >> 12);
name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
if (name == NULL)
return (ENOMEM);
strcpy(name, buf);
Expand Down
Loading

0 comments on commit 48813cf

Please sign in to comment.