Commit 1e8c5739 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial

* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (21 commits)
  BUG_ON() Conversion in drivers/video/
  BUG_ON() Conversion in drivers/parisc/
  BUG_ON() Conversion in drivers/block/
  BUG_ON() Conversion in sound/sparc/cs4231.c
  BUG_ON() Conversion in drivers/s390/block/dasd.c
  BUG_ON() Conversion in lib/swiotlb.c
  BUG_ON() Conversion in kernel/cpu.c
  BUG_ON() Conversion in ipc/msg.c
  BUG_ON() Conversion in block/elevator.c
  BUG_ON() Conversion in fs/coda/
  BUG_ON() Conversion in fs/binfmt_elf_fdpic.c
  BUG_ON() Conversion in input/serio/hil_mlc.c
  BUG_ON() Conversion in md/dm-hw-handler.c
  BUG_ON() Conversion in md/bitmap.c
  The comment describing how MS_ASYNC works in msync.c is confusing
  rcu: undeclared variable used in documentation
  fix typos "wich" -> "which"
  typo patch for fs/ufs/super.c
  Fix simple typos
  tabify drivers/char/Makefile
  ...
parents d71eecf3 232443e2
...@@ -360,7 +360,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt. ...@@ -360,7 +360,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt.
struct foo *new_fp; struct foo *new_fp;
struct foo *old_fp; struct foo *old_fp;
new_fp = kmalloc(sizeof(*fp), GFP_KERNEL); new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
spin_lock(&foo_mutex); spin_lock(&foo_mutex);
old_fp = gbl_foo; old_fp = gbl_foo;
*new_fp = *old_fp; *new_fp = *old_fp;
...@@ -461,7 +461,7 @@ The foo_update_a() function might then be written as follows: ...@@ -461,7 +461,7 @@ The foo_update_a() function might then be written as follows:
struct foo *new_fp; struct foo *new_fp;
struct foo *old_fp; struct foo *old_fp;
new_fp = kmalloc(sizeof(*fp), GFP_KERNEL); new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
spin_lock(&foo_mutex); spin_lock(&foo_mutex);
old_fp = gbl_foo; old_fp = gbl_foo;
*new_fp = *old_fp; *new_fp = *old_fp;
......
...@@ -118,7 +118,7 @@ to store page tables. The recommended placement is 32KiB into RAM. ...@@ -118,7 +118,7 @@ to store page tables. The recommended placement is 32KiB into RAM.
In either case, the following conditions must be met: In either case, the following conditions must be met:
- Quiesce all DMA capable devicess so that memory does not get - Quiesce all DMA capable devices so that memory does not get
corrupted by bogus network packets or disk data. This will save corrupted by bogus network packets or disk data. This will save
you many hours of debug. you many hours of debug.
......
...@@ -89,7 +89,7 @@ Modules ...@@ -89,7 +89,7 @@ Modules
Although modularisation is supported (and required for the FP emulator), Although modularisation is supported (and required for the FP emulator),
each module on an ARM2/ARM250/ARM3 machine when is loaded will take each module on an ARM2/ARM250/ARM3 machine when is loaded will take
memory up to the next 32k boundary due to the size of the pages. memory up to the next 32k boundary due to the size of the pages.
Therefore, modularisation on these machines really worth it? Therefore, is modularisation on these machines really worth it?
However, ARM6 and up machines allow modules to take multiples of 4k, and However, ARM6 and up machines allow modules to take multiples of 4k, and
as such Acorn RiscPCs and other architectures using these processors can as such Acorn RiscPCs and other architectures using these processors can
......
...@@ -58,7 +58,7 @@ below: ...@@ -58,7 +58,7 @@ below:
video_y video_y
This describes the character position of cursor on VGA console, and This describes the character position of cursor on VGA console, and
is otherwise unused. (should not used for other console types, and is otherwise unused. (should not be used for other console types, and
should not be used for other purposes). should not be used for other purposes).
memc_control_reg memc_control_reg
......
...@@ -121,7 +121,7 @@ Table 1-1: Process specific entries in /proc ...@@ -121,7 +121,7 @@ Table 1-1: Process specific entries in /proc
.............................................................................. ..............................................................................
File Content File Content
cmdline Command line arguments cmdline Command line arguments
cpu Current and last cpu in wich it was executed (2.4)(smp) cpu Current and last cpu in which it was executed (2.4)(smp)
cwd Link to the current working directory cwd Link to the current working directory
environ Values of environment variables environ Values of environment variables
exe Link to the executable of this process exe Link to the executable of this process
...@@ -309,13 +309,13 @@ is the same by default: ...@@ -309,13 +309,13 @@ is the same by default:
> cat /proc/irq/0/smp_affinity > cat /proc/irq/0/smp_affinity
ffffffff ffffffff
It's a bitmask, in wich you can specify wich CPUs can handle the IRQ, you can It's a bitmask, in which you can specify which CPUs can handle the IRQ, you can
set it by doing: set it by doing:
> echo 1 > /proc/irq/prof_cpu_mask > echo 1 > /proc/irq/prof_cpu_mask
This means that only the first CPU will handle the IRQ, but you can also echo 5 This means that only the first CPU will handle the IRQ, but you can also echo 5
wich means that only the first and fourth CPU can handle the IRQ. which means that only the first and fourth CPU can handle the IRQ.
The way IRQs are routed is handled by the IO-APIC, and it's Round Robin The way IRQs are routed is handled by the IO-APIC, and it's Round Robin
between all the CPUs which are allowed to handle it. As usual the kernel has between all the CPUs which are allowed to handle it. As usual the kernel has
......
...@@ -40,7 +40,7 @@ network interface card supports some sort of interrupt load mitigation or ...@@ -40,7 +40,7 @@ network interface card supports some sort of interrupt load mitigation or
+ How to use CONFIG_PACKET_MMAP + How to use CONFIG_PACKET_MMAP
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
From the user standpoint, you should use the higher level libpcap library, wich From the user standpoint, you should use the higher level libpcap library, which
is a de facto standard, portable across nearly all operating systems is a de facto standard, portable across nearly all operating systems
including Win32. including Win32.
...@@ -217,8 +217,8 @@ called pg_vec, its size limits the number of blocks that can be allocated. ...@@ -217,8 +217,8 @@ called pg_vec, its size limits the number of blocks that can be allocated.
kmalloc allocates any number of bytes of phisically contiguous memory from kmalloc allocates any number of bytes of phisically contiguous memory from
a pool of pre-determined sizes. This pool of memory is mantained by the slab a pool of pre-determined sizes. This pool of memory is mantained by the slab
allocator wich is at the end the responsible for doing the allocation and allocator which is at the end the responsible for doing the allocation and
hence wich imposes the maximum memory that kmalloc can allocate. hence which imposes the maximum memory that kmalloc can allocate.
In a 2.4/2.6 kernel and the i386 architecture, the limit is 131072 bytes. The In a 2.4/2.6 kernel and the i386 architecture, the limit is 131072 bytes. The
predetermined sizes that kmalloc uses can be checked in the "size-<bytes>" predetermined sizes that kmalloc uses can be checked in the "size-<bytes>"
...@@ -254,7 +254,7 @@ and, the number of frames be ...@@ -254,7 +254,7 @@ and, the number of frames be
<block number> * <block size> / <frame size> <block number> * <block size> / <frame size>
Suposse the following parameters, wich apply for 2.6 kernel and an Suposse the following parameters, which apply for 2.6 kernel and an
i386 architecture: i386 architecture:
<size-max> = 131072 bytes <size-max> = 131072 bytes
...@@ -360,7 +360,7 @@ TP_STATUS_LOSING : indicates there were packet drops from last time ...@@ -360,7 +360,7 @@ TP_STATUS_LOSING : indicates there were packet drops from last time
statistics where checked with getsockopt() and statistics where checked with getsockopt() and
the PACKET_STATISTICS option. the PACKET_STATISTICS option.
TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets wich TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets which
it's checksum will be done in hardware. So while it's checksum will be done in hardware. So while
reading the packet we should not try to check the reading the packet we should not try to check the
checksum. checksum.
......
...@@ -2025,12 +2025,6 @@ L: parisc-linux@parisc-linux.org ...@@ -2025,12 +2025,6 @@ L: parisc-linux@parisc-linux.org
W: http://www.parisc-linux.org/ W: http://www.parisc-linux.org/
S: Maintained S: Maintained
PERSONALITY HANDLING
P: Christoph Hellwig
M: hch@infradead.org
L: linux-abi-devel@lists.sourceforge.net
S: Maintained
PCI ERROR RECOVERY PCI ERROR RECOVERY
P: Linas Vepstas P: Linas Vepstas
M: linas@austin.ibm.com M: linas@austin.ibm.com
...@@ -2081,6 +2075,12 @@ M: tsbogend@alpha.franken.de ...@@ -2081,6 +2075,12 @@ M: tsbogend@alpha.franken.de
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
PERSONALITY HANDLING
P: Christoph Hellwig
M: hch@infradead.org
L: linux-abi-devel@lists.sourceforge.net
S: Maintained
PHRAM MTD DRIVER PHRAM MTD DRIVER
P: Jrn Engel P: Jrn Engel
M: joern@wh.fh-wedel.de M: joern@wh.fh-wedel.de
......
...@@ -728,8 +728,7 @@ void elv_unregister_queue(struct request_queue *q) ...@@ -728,8 +728,7 @@ void elv_unregister_queue(struct request_queue *q)
int elv_register(struct elevator_type *e) int elv_register(struct elevator_type *e)
{ {
spin_lock_irq(&elv_list_lock); spin_lock_irq(&elv_list_lock);
if (elevator_find(e->elevator_name)) BUG_ON(elevator_find(e->elevator_name));
BUG();
list_add_tail(&e->list, &elv_list); list_add_tail(&e->list, &elv_list);
spin_unlock_irq(&elv_list_lock); spin_unlock_irq(&elv_list_lock);
......
...@@ -256,7 +256,8 @@ config ACPI_CUSTOM_DSDT_FILE ...@@ -256,7 +256,8 @@ config ACPI_CUSTOM_DSDT_FILE
depends on ACPI_CUSTOM_DSDT depends on ACPI_CUSTOM_DSDT
default "" default ""
help help
Enter the full path name to the file wich includes the AmlCode declaration. Enter the full path name to the file which includes the AmlCode
declaration.
config ACPI_BLACKLIST_YEAR config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" if X86_32 int "Disable ACPI for systems before Jan 1st this year" if X86_32
......
...@@ -228,8 +228,7 @@ static void *slice_dma_loaf(struct dma_loaf *loaf, size_t len, ...@@ -228,8 +228,7 @@ static void *slice_dma_loaf(struct dma_loaf *loaf, size_t len,
void *cpu_end = loaf->cpu_free + len; void *cpu_end = loaf->cpu_free + len;
void *cpu_addr = loaf->cpu_free; void *cpu_addr = loaf->cpu_free;
if (cpu_end > loaf->cpu_base + loaf->length) BUG_ON(cpu_end > loaf->cpu_base + loaf->length);
BUG();
*dma_handle = loaf->dma_free; *dma_handle = loaf->dma_free;
loaf->cpu_free = cpu_end; loaf->cpu_free = cpu_end;
loaf->dma_free += len; loaf->dma_free += len;
......
...@@ -2361,8 +2361,7 @@ static void do_cciss_request(request_queue_t *q) ...@@ -2361,8 +2361,7 @@ static void do_cciss_request(request_queue_t *q)
if (!creq) if (!creq)
goto startio; goto startio;
if (creq->nr_phys_segments > MAXSGENTRIES) BUG_ON(creq->nr_phys_segments > MAXSGENTRIES);
BUG();
if (( c = cmd_alloc(h, 1)) == NULL) if (( c = cmd_alloc(h, 1)) == NULL)
goto full; goto full;
......
...@@ -1316,7 +1316,7 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd ...@@ -1316,7 +1316,7 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd
cp->Request.Timeout = 0; cp->Request.Timeout = 0;
memset(cp->Request.CDB, 0, sizeof(cp->Request.CDB)); memset(cp->Request.CDB, 0, sizeof(cp->Request.CDB));
if (cmd->cmd_len > sizeof(cp->Request.CDB)) BUG(); BUG_ON(cmd->cmd_len > sizeof(cp->Request.CDB));
cp->Request.CDBLen = cmd->cmd_len; cp->Request.CDBLen = cmd->cmd_len;
memcpy(cp->Request.CDB, cmd->cmnd, cmd->cmd_len); memcpy(cp->Request.CDB, cmd->cmnd, cmd->cmd_len);
cp->Request.Type.Type = TYPE_CMD; cp->Request.Type.Type = TYPE_CMD;
......
...@@ -906,8 +906,7 @@ static void do_ida_request(request_queue_t *q) ...@@ -906,8 +906,7 @@ static void do_ida_request(request_queue_t *q)
if (!creq) if (!creq)
goto startio; goto startio;
if (creq->nr_phys_segments > SG_MAX) BUG_ON(creq->nr_phys_segments > SG_MAX);
BUG();
if ((c = cmd_alloc(h,1)) == NULL) if ((c = cmd_alloc(h,1)) == NULL)
goto startio; goto startio;
......
...@@ -95,6 +95,7 @@ obj-$(CONFIG_IPMI_HANDLER) += ipmi/ ...@@ -95,6 +95,7 @@ obj-$(CONFIG_IPMI_HANDLER) += ipmi/
obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o
obj-$(CONFIG_TCG_TPM) += tpm/ obj-$(CONFIG_TCG_TPM) += tpm/
# Files generated that shall be removed upon make clean # Files generated that shall be removed upon make clean
clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c
......
...@@ -556,7 +556,7 @@ static inline void hilse_setup_input(hil_mlc *mlc, struct hilse_node *node) { ...@@ -556,7 +556,7 @@ static inline void hilse_setup_input(hil_mlc *mlc, struct hilse_node *node) {
do_gettimeofday(&(mlc->instart)); do_gettimeofday(&(mlc->instart));
mlc->icount = 15; mlc->icount = 15;
memset(mlc->ipacket, 0, 16 * sizeof(hil_packet)); memset(mlc->ipacket, 0, 16 * sizeof(hil_packet));
if (down_trylock(&(mlc->isem))) BUG(); BUG_ON(down_trylock(&(mlc->isem)));
return; return;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* stuff needed to support the Linux X.25 PLP code on top of devices that * stuff needed to support the Linux X.25 PLP code on top of devices that
* can provide a lab_b service using the concap_proto mechanism. * can provide a lab_b service using the concap_proto mechanism.
* This module supports a network interface wich provides lapb_sematics * This module supports a network interface which provides lapb_sematics
* -- as defined in Documentation/networking/x25-iface.txt -- to * -- as defined in Documentation/networking/x25-iface.txt -- to
* the upper layer and assumes that the lower layer provides a reliable * the upper layer and assumes that the lower layer provides a reliable
* data link service by means of the concap_device_ops callbacks. * data link service by means of the concap_device_ops callbacks.
......
...@@ -1309,7 +1309,7 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect ...@@ -1309,7 +1309,7 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect
case 1: case 1:
*bmc = 2; *bmc = 2;
} }
if ((*bmc & COUNTER_MAX) == COUNTER_MAX) BUG(); BUG_ON((*bmc & COUNTER_MAX) == COUNTER_MAX);
(*bmc)++; (*bmc)++;
spin_unlock_irq(&bitmap->lock); spin_unlock_irq(&bitmap->lock);
......
...@@ -83,8 +83,7 @@ void dm_put_hw_handler(struct hw_handler_type *hwht) ...@@ -83,8 +83,7 @@ void dm_put_hw_handler(struct hw_handler_type *hwht)
if (--hwhi->use == 0) if (--hwhi->use == 0)
module_put(hwhi->hwht.module); module_put(hwhi->hwht.module);
if (hwhi->use < 0) BUG_ON(hwhi->use < 0);
BUG();
out: out:
up_read(&_hwh_lock); up_read(&_hwh_lock);
......
...@@ -1724,9 +1724,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa, ...@@ -1724,9 +1724,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfef00000UL; sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfef00000UL;
sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff000000UL - 1) ; sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff000000UL - 1) ;
err = request_resource(&iomem_resource, &(sba_dev->chip_resv)); err = request_resource(&iomem_resource, &(sba_dev->chip_resv));
if (err < 0) { BUG_ON(err < 0);
BUG();
}
} else if (IS_PLUTO(sba_dev->iodc)) { } else if (IS_PLUTO(sba_dev->iodc)) {
int err; int err;
...@@ -2185,8 +2183,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r) ...@@ -2185,8 +2183,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r)
int i; int i;
int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */
if ((t!=HPHW_IOA) && (t!=HPHW_BCPORT)) BUG_ON((t!=HPHW_IOA) && (t!=HPHW_BCPORT));
BUG();
r->start = r->end = 0; r->start = r->end = 0;
...@@ -2228,8 +2225,7 @@ void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r ) ...@@ -2228,8 +2225,7 @@ void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r )
int base, size; int base, size;
int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */
if ((t!=HPHW_IOA) && (t!=HPHW_BCPORT)) BUG_ON((t!=HPHW_IOA) && (t!=HPHW_BCPORT));
BUG();
r->start = r->end = 0; r->start = r->end = 0;
......
...@@ -157,8 +157,8 @@ superio_init(struct pci_dev *pcidev) ...@@ -157,8 +157,8 @@ superio_init(struct pci_dev *pcidev)
if (sio->suckyio_irq_enabled) if (sio->suckyio_irq_enabled)
return; return;
if (!pdev) BUG(); BUG_ON(!pdev);
if (!sio->usb_pdev) BUG(); BUG_ON(!sio->usb_pdev);
/* use the IRQ iosapic found for USB INT D... */ /* use the IRQ iosapic found for USB INT D... */
pdev->irq = sio->usb_pdev->irq; pdev->irq = sio->usb_pdev->irq;
...@@ -474,8 +474,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -474,8 +474,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id)
dev->subsystem_vendor, dev->subsystem_device, dev->subsystem_vendor, dev->subsystem_device,
dev->class); dev->class);
if (!sio->suckyio_irq_enabled) BUG_ON(!sio->suckyio_irq_enabled); /* Enabled by PCI_FIXUP_FINAL */
BUG(); /* Enabled by PCI_FIXUP_FINAL */
if (dev->device == PCI_DEVICE_ID_NS_87560_LIO) { /* Function 1 */ if (dev->device == PCI_DEVICE_ID_NS_87560_LIO) { /* Function 1 */
superio_parport_init(); superio_parport_init();
......
...@@ -541,9 +541,8 @@ dasd_kmalloc_request(char *magic, int cplength, int datasize, ...@@ -541,9 +541,8 @@ dasd_kmalloc_request(char *magic, int cplength, int datasize,
struct dasd_ccw_req *cqr; struct dasd_ccw_req *cqr;
/* Sanity checks */ /* Sanity checks */
if ( magic == NULL || datasize > PAGE_SIZE || BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
(cplength*sizeof(struct ccw1)) > PAGE_SIZE) (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
BUG();
cqr = kzalloc(sizeof(struct dasd_ccw_req), GFP_ATOMIC); cqr = kzalloc(sizeof(struct dasd_ccw_req), GFP_ATOMIC);
if (cqr == NULL) if (cqr == NULL)
...@@ -583,9 +582,8 @@ dasd_smalloc_request(char *magic, int cplength, int datasize, ...@@ -583,9 +582,8 @@ dasd_smalloc_request(char *magic, int cplength, int datasize,
int size; int size;
/* Sanity checks */ /* Sanity checks */
if ( magic == NULL || datasize > PAGE_SIZE || BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
(cplength*sizeof(struct ccw1)) > PAGE_SIZE) (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
BUG();
size = (sizeof(struct dasd_ccw_req) + 7L) & -8L; size = (sizeof(struct dasd_ccw_req) + 7L) & -8L;
if (cplength > 0) if (cplength > 0)
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and * and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and
* so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly * so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly
* fpr the console code : without this 1:1 mapping, at early boot time, when we * fpr the console code : without this 1:1 mapping, at early boot time, when we
* are parsing the kernel args console=ttyPSC?, we wouldn't know wich PSC it * are parsing the kernel args console=ttyPSC?, we wouldn't know which PSC it
* will be mapped to. * will be mapped to.
*/ */
......
...@@ -102,7 +102,7 @@ static struct usb_driver option_driver = { ...@@ -102,7 +102,7 @@ static struct usb_driver option_driver = {
.no_dynamic_id = 1, .no_dynamic_id = 1,
}; };
/* The card has three separate interfaces, wich the serial driver /* The card has three separate interfaces, which the serial driver
* recognizes separately, thus num_port=1. * recognizes separately, thus num_port=1.
*/ */
static struct usb_serial_driver option_3port_device = { static struct usb_serial_driver option_3port_device = {
......
...@@ -327,8 +327,7 @@ static void bw2_init_one(struct sbus_dev *sdev) ...@@ -327,8 +327,7 @@ static void bw2_init_one(struct sbus_dev *sdev)
} else } else
#else #else
{ {
if (!sdev) BUG_ON(!sdev);
BUG();
all->par.physbase = sdev->reg_addrs[0].phys_addr; all->par.physbase = sdev->reg_addrs[0].phys_addr;
resp = &sdev->resource[0]; resp = &sdev->resource[0];
sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1); sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1);
......
...@@ -466,8 +466,7 @@ static void ffb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -466,8 +466,7 @@ static void ffb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
unsigned long flags; unsigned long flags;
u32 fg; u32 fg;
if (rect->rop != ROP_COPY && rect->rop != ROP_XOR) BUG_ON(rect->rop != ROP_COPY && rect->rop != ROP_XOR);
BUG();
fg = ((u32 *)info->pseudo_palette)[rect->color]; fg = ((u32 *)info->pseudo_palette)[rect->color];
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
-TODO: at one time or another test that the mode is acceptable by the monitor -TODO: at one time or another test that the mode is acceptable by the monitor
-ASK: Can I choose different ordering for the color bitfields (rgba argb ...) -ASK: Can I choose different ordering for the color bitfields (rgba argb ...)
wich one should i use ? is there any preferred one ? It seems ARGB is which one should i use ? is there any preferred one ? It seems ARGB is
the one ... the one ...
-TODO: in set_var check the validity of timings (hsync vsync)... -TODO: in set_var check the validity of timings (hsync vsync)...
-TODO: check and recheck the use of sst_wait_idle : we don't flush the fifo via -TODO: check and recheck the use of sst_wait_idle : we don't flush the fifo via
......
...@@ -98,7 +98,7 @@ static void matrox_w1_write_ddc_bit(void *, u8); ...@@ -98,7 +98,7 @@ static void matrox_w1_write_ddc_bit(void *, u8);
* *
* Using tristate pins, since i can't find any open-drain pin in whole motherboard. * Using tristate pins, since i can't find any open-drain pin in whole motherboard.
* Unfortunately we can't connect to Intel's 82801xx IO controller * Unfortunately we can't connect to Intel's 82801xx IO controller
* since we don't know motherboard schema, wich has pretty unused(may be not) GPIO. * since we don't know motherboard schema, which has pretty unused(may be not) GPIO.
* *
* I've heard that PIIX also has open drain pin. * I've heard that PIIX also has open drain pin.
* *
......
...@@ -118,7 +118,7 @@ befs_fblock2brun(struct super_block *sb, befs_data_stream * data, ...@@ -118,7 +118,7 @@ befs_fblock2brun(struct super_block *sb, befs_data_stream * data,
* befs_read_lsmylink - read long symlink from datastream. * befs_read_lsmylink - read long symlink from datastream.
* @sb: Filesystem superblock * @sb: Filesystem superblock
* @ds: Datastrem to read from * @ds: Datastrem to read from
* @buf: Buffer in wich to place long symlink data * @buf: Buffer in which to place long symlink data
* @len: Length of the long symlink in bytes * @len: Length of the long symlink in bytes
* *
* Returns the number of bytes read * Returns the number of bytes read
......
...@@ -572,8 +572,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm, ...@@ -572,8 +572,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
csp -= sizeof(unsigned long); csp -= sizeof(unsigned long);
__put_user(bprm->argc, (unsigned long *) csp); __put_user(bprm->argc, (unsigned long *) csp);
if (csp != sp) BUG_ON(csp != sp);
BUG();
/* fill in the argv[] array */ /* fill in the argv[] array */
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
......
...@@ -51,7 +51,7 @@ void coda_cache_clear_all(struct super_block *sb) ...@@ -51,7 +51,7 @@ void coda_cache_clear_all(struct super_block *sb)
struct coda_sb_info *sbi; struct coda_sb_info *sbi;
sbi = coda_sbp(sb); sbi = coda_sbp(sb);
if (!sbi) BUG(); BUG_ON(!sbi);
atomic_inc(&permission_epoch); atomic_inc(&permission_epoch);
} }
......
...@@ -120,8 +120,7 @@ void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid, ...@@ -120,8 +120,7 @@ void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid,
cii = ITOC(inode); cii = ITOC(inode);
if (!coda_fideq(&cii->c_fid, oldfid)) BUG_ON(!coda_fideq(&cii->c_fid, oldfid));
BUG();
/* replace fid and rehash inode */ /* replace fid and rehash inode */
/* XXX we probably need to hold some lock here! */ /* XXX we probably need to hold some lock here! */
......
...@@ -575,7 +575,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -575,7 +575,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
if (!silent) if (!silent)
printk("You didn't specify the type of your ufs filesystem\n\n" printk("You didn't specify the type of your ufs filesystem\n\n"
"mount -t ufs -o ufstype=" "mount -t ufs -o ufstype="
"sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|netxstep-cd|openstep ...\n\n" "sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...\n\n"
">>>WARNING<<< Wrong ufstype may corrupt your filesystem, " ">>>WARNING<<< Wrong ufstype may corrupt your filesystem, "
"default is ufstype=old\n"); "default is ufstype=old\n");
ufs_set_opt (sbi->s_mount_opt, UFSTYPE_OLD); ufs_set_opt (sbi->s_mount_opt, UFSTYPE_OLD);
......
...@@ -69,13 +69,13 @@ extern unsigned long next_timer_interrupt(void); ...@@ -69,13 +69,13 @@ extern unsigned long next_timer_interrupt(void);
* @timer: the timer to be added * @timer: the timer to be added
* *
* The kernel will do a ->function(->data) callback from the * The kernel will do a ->function(->data) callback from the
* timer interrupt at the ->expired point in the future. The * timer interrupt at the ->expires point in the future. The
* current time is 'jiffies'. * current time is 'jiffies'.
* *
* The timer's ->expired, ->function (and if the handler uses it, ->data) * The timer's ->expires, ->function (and if the handler uses it, ->data)
* fields must be set prior calling this function. * fields must be set prior calling this function.
* *
* Timers with an ->expired field in the past will be executed in the next * Timers with an ->expires field in the past will be executed in the next
* timer tick. * timer tick.
*/ */
static inline void add_timer(struct timer_list *timer) static inline void add_timer(struct timer_list *timer)
......
...@@ -220,8 +220,7 @@ asmlinkage long sys_msgget (key_t key, int msgflg) ...@@ -220,8 +220,7 @@ asmlinkage long sys_msgget (key_t key, int msgflg)
ret = -EEXIST; ret = -EEXIST;
} else { } else {
msq = msg_lock(id); msq = msg_lock(id);
if(msq==NULL) BUG_ON(msq==NULL);
BUG();
if (ipcperms(&msq->q_perm, msgflg)) if (ipcperms(&msq->q_perm, msgflg))
ret = -EACCES; ret = -EACCES;
else { else {
......
...@@ -223,8 +223,7 @@ int __devinit cpu_up(unsigned int cpu) ...@@ -223,8 +223,7 @@ int __devinit cpu_up(unsigned int cpu)
ret = __cpu_up(cpu); ret = __cpu_up(cpu);
if (ret != 0) if (ret != 0)
goto out_notify; goto out_notify;
if (!cpu_online(cpu)) BUG_ON(!cpu_online(cpu));
BUG();
/* Now call notifier in preparation. */ /* Now call notifier in preparation. */
notifier_call_chain(&cpu_chain, CPU_ONLINE, hcpu); notifier_call_chain(&cpu_chain, CPU_ONLINE, hcpu);
......
...@@ -296,8 +296,7 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir) ...@@ -296,8 +296,7 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir)
else else
stride = 1; stride = 1;
if (!nslots) BUG_ON(!nslots);
BUG();
/* /*
* Find suitable number of IO TLB entries size that will fit this * Find suitable number of IO TLB entries size that will fit this
...@@ -416,14 +415,14 @@ sync_single(struct device *hwdev, char *dma_addr, size_t size, ...@@ -416,14 +415,14 @@ sync_single(struct device *hwdev, char *dma_addr, size_t size,
case SYNC_FOR_CPU: case SYNC_FOR_CPU:
if (likely(dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL)) if (likely(dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL))
memcpy(buffer, dma_addr, size); memcpy(buffer, dma_addr, size);
else if (dir != DMA_TO_DEVICE) else
BUG(); BUG_ON(dir != DMA_TO_DEVICE);
break; break;
case SYNC_FOR_DEVICE: case SYNC_FOR_DEVICE:
if (likely(dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL)) if (likely(dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL))
memcpy(dma_addr, buffer, size); memcpy(dma_addr, buffer, size);
else if (dir != DMA_FROM_DEVICE) else
BUG(); BUG_ON(dir != DMA_FROM_DEVICE);
break; break;
default: default:
BUG(); BUG();
...@@ -529,8 +528,7 @@ swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir) ...@@ -529,8 +528,7 @@ swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir)
unsigned long dev_addr = virt_to_phys(ptr); unsigned long dev_addr = virt_to_phys(ptr);
void *map; void *map;
if (dir == DMA_NONE) BUG_ON(dir == DMA_NONE);
BUG();
/* /*
* If the pointer passed in happens to be in the device's DMA window, * If the pointer passed in happens to be in the device's DMA window,
* we can safely return the device addr and not worry about bounce * we can safely return the device addr and not worry about bounce
...@@ -592,8 +590,7 @@ swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size, ...@@ -592,8 +590,7 @@ swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size,
{ {
char *dma_addr = phys_to_virt(dev_addr); char *dma_addr = phys_to_virt(dev_addr);
if (dir == DMA_NONE) BUG_ON(dir == DMA_NONE);
BUG();
if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end) if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
unmap_single(hwdev, dma_addr, size, dir); unmap_single(hwdev, dma_addr, size, dir);
else if (dir == DMA_FROM_DEVICE) else if (dir == DMA_FROM_DEVICE)
...@@ -616,8 +613,7 @@ swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr, ...@@ -616,8 +613,7 @@ swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr,
{ {
char *dma_addr = phys_to_virt(dev_addr); char *dma_addr = phys_to_virt(dev_addr);
if (dir == DMA_NONE) BUG_ON(dir == DMA_NONE);
BUG();
if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end) if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
sync_single(hwdev, dma_addr, size, dir, target); sync_single(hwdev, dma_addr, size, dir, target);
else if (dir == DMA_FROM_DEVICE) else if (dir == DMA_FROM_DEVICE)
...@@ -648,8 +644,7 @@ swiotlb_sync_single_range(struct device *hwdev, dma_addr_t dev_addr, ...@@ -648,8 +644,7 @@ swiotlb_sync_single_range(struct device *hwdev, dma_addr_t dev_addr,
{ {
char *dma_addr = phys_to_virt(dev_addr) + offset; char *dma_addr = phys_to_virt(dev_addr) + offset;
if (dir == DMA_NONE) BUG_ON(dir == DMA_NONE);
BUG();
if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end) if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
sync_single(hwdev, dma_addr, size, dir, target); sync_single(hwdev, dma_addr, size, dir, target);
else if (dir == DMA_FROM_DEVICE) else if (dir == DMA_FROM_DEVICE)
...@@ -696,8 +691,7 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems, ...@@ -696,8 +691,7 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
unsigned long dev_addr; unsigned long dev_addr;
int i; int i;
if (dir == DMA_NONE) BUG_ON(dir == DMA_NONE);
BUG();
for (i = 0; i < nelems; i++, sg++) { for (i = 0; i < nelems; i++, sg++) {
addr = SG_ENT_VIRT_ADDRESS(sg); addr = SG_ENT_VIRT_ADDRESS(sg);
...@@ -730,8 +724,7 @@ swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems, ...@@ -730,8 +724,7 @@ swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
{ {
int i; int i;
if (dir == DMA_NONE) BUG_ON(dir == DMA_NONE);
BUG();
for (i = 0; i < nelems; i++, sg++) for (i = 0; i < nelems; i++, sg++)
if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg)) if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
...@@ -753,8 +746,7 @@ swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sg, ...@@ -753,8 +746,7 @@ swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sg,
{ {
int i; int i;
if (dir == DMA_NONE) BUG_ON(dir == DMA_NONE);
BUG();
for (i = 0; i < nelems; i++, sg++) for (i = 0; i < nelems; i++, sg++)
if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg)) if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
......
...@@ -126,7 +126,7 @@ static unsigned long msync_page_range(struct vm_area_struct *vma, ...@@ -126,7 +126,7 @@ static unsigned long msync_page_range(struct vm_area_struct *vma,
* write out the dirty pages and wait on the writeout and check the result. * write out the dirty pages and wait on the writeout and check the result.
* Or the application may run fadvise(FADV_DONTNEED) against the fd to start * Or the application may run fadvise(FADV_DONTNEED) against the fd to start
* async writeout immediately. * async writeout immediately.
* So my _not_ starting I/O in MS_ASYNC we provide complete flexibility to * So by _not_ starting I/O in MS_ASYNC we provide complete flexibility to
* applications. * applications.
*/ */
static int msync_interval(struct vm_area_struct *vma, unsigned long addr, static int msync_interval(struct vm_area_struct *vma, unsigned long addr,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Stage one of module building created the following: # Stage one of module building created the following:
# a) The individual .o files used for the module # a) The individual .o files used for the module
# b) A <module>.o file wich is the .o files above linked together # b) A <module>.o file which is the .o files above linked together
# c) A <module>.mod file in $(MODVERDIR)/, listing the name of the # c) A <module>.mod file in $(MODVERDIR)/, listing the name of the
# the preliminary <module>.o file, plus all .o files # the preliminary <module>.o file, plus all .o files
......
...@@ -611,8 +611,7 @@ static void snd_cs4231_advance_dma(struct cs4231_dma_control *dma_cont, ...@@ -611,8 +611,7 @@ static void snd_cs4231_advance_dma(struct cs4231_dma_control *dma_cont,
unsigned int period_size = snd_pcm_lib_period_bytes(substream); unsigned int period_size = snd_pcm_lib_period_bytes(substream);
unsigned int offset = period_size * (*periods_sent); unsigned int offset = period_size * (*periods_sent);
if (period_size >= (1 << 24)) BUG_ON(period_size >= (1 << 24));
BUG();
if (dma_cont->request(dma_cont, runtime->dma_addr + offset, period_size)) if (dma_cont->request(dma_cont, runtime->dma_addr + offset, period_size))
return; return;
...@@ -1079,8 +1078,7 @@ static int snd_cs4231_playback_prepare(struct snd_pcm_substream *substream) ...@@ -1079,8 +1078,7 @@ static int snd_cs4231_playback_prepare(struct snd_pcm_substream *substream)
chip->image[CS4231_IFACE_CTRL] &= ~(CS4231_PLAYBACK_ENABLE | chip->image[CS4231_IFACE_CTRL] &= ~(CS4231_PLAYBACK_ENABLE |
CS4231_PLAYBACK_PIO); CS4231_PLAYBACK_PIO);
if (runtime->period_size > 0xffff + 1) BUG_ON(runtime->period_size > 0xffff + 1);
BUG();
chip->p_periods_sent = 0; chip->p_periods_sent = 0;
spin_unlock_irqrestore(&chip->lock, flags); spin_unlock_irqrestore(&chip->lock, flags);
......
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