Re: [bug report] spi: lpspi: Improve the stability of lpspi data transmission

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 09, 2019 at 09:04:12AM +0000, Clark Wang wrote:
> 
> > -----Original Message-----
> > From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > Sent: Wednesday, January 9, 2019 16:25
> > To: Clark Wang <xiaoning.wang@xxxxxxx>
> > Cc: linux-spi@xxxxxxxxxxxxxxx
> > Subject: [bug report] spi: lpspi: Improve the stability of lpspi data transmission
> > 
> > Hello Clark Wang,
> > 
> > The patch c23fdef891ac: "spi: lpspi: Improve the stability of lpspi data
> > transmission" from Jan 7, 2019, leads to the following static checker warning:
> > 
> > 	drivers/spi/spi-fsl-lpspi.c:463 fsl_lpspi_isr()
> > 	warn: inconsistent indenting
> > 
> > drivers/spi/spi-fsl-lpspi.c
> >     438 static irqreturn_t fsl_lpspi_isr(int irq, void *dev_id)
> >     439 {
> >     440 	u32 temp_SR, temp_IER;
> >     441 	struct fsl_lpspi_data *fsl_lpspi = dev_id;
> >     442
> >     443 	temp_IER = readl(fsl_lpspi->base + IMX7ULP_IER);
> >     444 	fsl_lpspi_intctrl(fsl_lpspi, 0);
> >     445 	temp_SR = readl(fsl_lpspi->base + IMX7ULP_SR);
> >     446
> >     447 	fsl_lpspi_read_rx_fifo(fsl_lpspi);
> >     448
> >     449 	if ((temp_SR & SR_TDF) && (temp_IER & IER_TDIE)) {
> >     450 		fsl_lpspi_write_tx_fifo(fsl_lpspi);
> >     451 		return IRQ_HANDLED;
> >     452 	}
> >     453
> >     454 	if (temp_SR & SR_MBF ||
> >     455 	    readl(fsl_lpspi->base + IMX7ULP_FSR) & FSR_RXCOUNT) {
> >     456 		writel(SR_FCF, fsl_lpspi->base + IMX7ULP_SR);
> >     457 		fsl_lpspi_intctrl(fsl_lpspi, IER_FCIE);
> >     458 		return IRQ_HANDLED;
> >     459 	}
> >     460
> >     461 	if (temp_SR & SR_FCF && (temp_IER & IER_FCIE)) {
> >     462 		writel(SR_FCF, fsl_lpspi->base + IMX7ULP_SR);
> > --> 463 			complete(&fsl_lpspi->xfer_done);
> > 
> > There used to be an "if (!fsl_lpspi->remain)" statement, and that's why the
> > complete() line was indented.  Was it deleted accidentally?
> > 
> 
> Hi Dan,
> 
> Thank you for your suggestion. 
> 
> I delete the "if (!fsl_lpspi->remain)" statement because this is only a count
> number by software, so it might go wrong under some circumstance.

Ah Ok.  Grand.  Can you please fix indenting for complete() as well?
There is a stray tab still from when the if statement was there.

regards,
dan carpenter




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux