valid = i / 188; if (nbpackets != valid) { dev_err(&pluto->pdev->dev, "nbpackets=%u valid=%u\n", nbpackets, valid); nbpackets = valid; } 
nbpackets = i / 188; 
static void pluto_dma_end(struct pluto *pluto, unsigned int nbpackets){	/* synchronize the DMA transfer with the CPU	 * first so that we see updated contents. */	pci_dma_sync_single_for_cpu(pluto->pdev, pluto->dma_addr,			TS_DMA_BYTES, PCI_DMA_FROMDEVICE);	/* Workaround for broken hardware:	 * [1] On startup NBPACKETS seems to contain an uninitialized value,	 *     but no packets have been transfered.	 * [2] Sometimes (actually very often) NBPACKETS stays at zero	 *     although one packet has been transfered.	 */	if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) {		unsigned int i = 0, valid;		while (pluto->dma_buf[i] == 0x47)			i += 188;		valid = i / 188;		if (nbpackets != valid) {			dev_err(&pluto->pdev->dev, "nbpackets=%u valid=%u\n",					nbpackets, valid);			nbpackets = valid;		}	}	dvb_dmx_swfilter_packets(&pluto->demux, pluto->dma_buf, nbpackets);	/* clear the dma buffer. this is needed to be able to identify	 * new valid ts packets above */	memset(pluto->dma_buf, 0, nbpackets * 188);	/* reset the dma address */	pluto_set_dma_addr(pluto);	/* sync the buffer and give it back to the card */	pci_dma_sync_single_for_device(pluto->pdev, pluto->dma_addr,			TS_DMA_BYTES, PCI_DMA_FROMDEVICE);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6573dd752d50730d44c550ad0467d15871963655/pluto2.c/buggy/drivers/media/dvb/pluto2/pluto2.c