diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-06-23 05:06:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:08 -0400 |
commit | 125e18745f16685f69a34fd6130d47598fc4bf54 (patch) | |
tree | c97ed94b0525a572efa1bd4990a55b18be5d781d /drivers/scsi/aacraid | |
parent | 78ce89c92bc6eaf5933b5664bff64253a7103bd7 (diff) |
[PATCH] More BUG_ON conversion
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 15 | ||||
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 6 |
2 files changed, 7 insertions, 14 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index ea9e038813eb..83b5c7d085f2 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -396,8 +396,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr) | |||
396 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; | 396 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; |
397 | 397 | ||
398 | dprintk((KERN_DEBUG "get_container_name_callback[cpu %d]: t = %ld.\n", smp_processor_id(), jiffies)); | 398 | dprintk((KERN_DEBUG "get_container_name_callback[cpu %d]: t = %ld.\n", smp_processor_id(), jiffies)); |
399 | if (fibptr == NULL) | 399 | BUG_ON(fibptr == NULL); |
400 | BUG(); | ||
401 | 400 | ||
402 | get_name_reply = (struct aac_get_name_resp *) fib_data(fibptr); | 401 | get_name_reply = (struct aac_get_name_resp *) fib_data(fibptr); |
403 | /* Failure is irrelevant, using default value instead */ | 402 | /* Failure is irrelevant, using default value instead */ |
@@ -956,8 +955,7 @@ static void io_callback(void *context, struct fib * fibptr) | |||
956 | smp_processor_id(), (unsigned long long)lba, jiffies); | 955 | smp_processor_id(), (unsigned long long)lba, jiffies); |
957 | } | 956 | } |
958 | 957 | ||
959 | if (fibptr == NULL) | 958 | BUG_ON(fibptr == NULL); |
960 | BUG(); | ||
961 | 959 | ||
962 | if(scsicmd->use_sg) | 960 | if(scsicmd->use_sg) |
963 | pci_unmap_sg(dev->pdev, | 961 | pci_unmap_sg(dev->pdev, |
@@ -1092,8 +1090,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) | |||
1092 | 1090 | ||
1093 | aac_build_sgraw(scsicmd, &readcmd->sg); | 1091 | aac_build_sgraw(scsicmd, &readcmd->sg); |
1094 | fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(readcmd->sg.count) - 1) * sizeof (struct sgentryraw)); | 1092 | fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(readcmd->sg.count) - 1) * sizeof (struct sgentryraw)); |
1095 | if (fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))) | 1093 | BUG_ON(fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))); |
1096 | BUG(); | ||
1097 | /* | 1094 | /* |
1098 | * Now send the Fib to the adapter | 1095 | * Now send the Fib to the adapter |
1099 | */ | 1096 | */ |
@@ -1261,8 +1258,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) | |||
1261 | 1258 | ||
1262 | aac_build_sgraw(scsicmd, &writecmd->sg); | 1259 | aac_build_sgraw(scsicmd, &writecmd->sg); |
1263 | fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(writecmd->sg.count) - 1) * sizeof (struct sgentryraw)); | 1260 | fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(writecmd->sg.count) - 1) * sizeof (struct sgentryraw)); |
1264 | if (fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))) | 1261 | BUG_ON(fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))); |
1265 | BUG(); | ||
1266 | /* | 1262 | /* |
1267 | * Now send the Fib to the adapter | 1263 | * Now send the Fib to the adapter |
1268 | */ | 1264 | */ |
@@ -1904,8 +1900,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr) | |||
1904 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; | 1900 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; |
1905 | dev = (struct aac_dev *)scsicmd->device->host->hostdata; | 1901 | dev = (struct aac_dev *)scsicmd->device->host->hostdata; |
1906 | 1902 | ||
1907 | if (fibptr == NULL) | 1903 | BUG_ON(fibptr == NULL); |
1908 | BUG(); | ||
1909 | 1904 | ||
1910 | srbreply = (struct aac_srb_reply *) fib_data(fibptr); | 1905 | srbreply = (struct aac_srb_reply *) fib_data(fibptr); |
1911 | 1906 | ||
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index d2ef17ea44fa..3f27419c66af 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c | |||
@@ -229,8 +229,7 @@ void aac_fib_init(struct fib *fibptr) | |||
229 | static void fib_dealloc(struct fib * fibptr) | 229 | static void fib_dealloc(struct fib * fibptr) |
230 | { | 230 | { |
231 | struct hw_fib *hw_fib = fibptr->hw_fib; | 231 | struct hw_fib *hw_fib = fibptr->hw_fib; |
232 | if(hw_fib->header.StructType != FIB_MAGIC) | 232 | BUG_ON(hw_fib->header.StructType != FIB_MAGIC); |
233 | BUG(); | ||
234 | hw_fib->header.XferState = 0; | 233 | hw_fib->header.XferState = 0; |
235 | } | 234 | } |
236 | 235 | ||
@@ -530,8 +529,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
530 | } | 529 | } |
531 | } else | 530 | } else |
532 | down(&fibptr->event_wait); | 531 | down(&fibptr->event_wait); |
533 | if(fibptr->done == 0) | 532 | BUG_ON(fibptr->done == 0); |
534 | BUG(); | ||
535 | 533 | ||
536 | if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ | 534 | if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ |
537 | return -ETIMEDOUT; | 535 | return -ETIMEDOUT; |