Re: [PATCH 2.6.13] libata: Marvell SATA support (PIO mode)

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

 



> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/pci.h>
> +#include <linux/init.h>
> +#include <linux/blkdev.h>
> +#include <linux/delay.h>
> +#include <linux/interrupt.h>
> +#include <linux/sched.h>
> +#include <linux/dma-mapping.h>
> +#include "scsi.h"

pleaese don't include "scsi.h" in new drivers.  It will go away soon.
Use the <scsi/*.h> headers and get rid of usage of obsolete constucts
in your driver.

> +static inline void writelfl(unsigned long data, void __iomem *addr)
> +{
> +	writel(data, addr);
> +	(void) readl(addr);	/* flush */

no need for the (void) case.

> +static void mv_irq_clear(struct ata_port *ap)
> +{
> +	return;
> +}

no need for the return

> +	return (ofs);

please remove the braces around the return value

> +		if (ap && 
> +		    (NULL != (qc = ata_qc_from_tag(ap, ap->active_tag)))) {
> +			VPRINTK("port %u IRQ found for qc, ata_status 0x%x\n",
> +				port,ata_status);
> +			BUG_ON(0xffU == ata_status);
> +			/* mark qc status appropriately */
> +			ata_qc_complete(qc, ata_status);
> +		}

the formatting looks rather odd.  What about;

		if (ap) {
			qc = ata_qc_from_tag(ap, ap->active_tag);
			if (qc) {
				VPRINTK("port %u IRQ found for qc, "
					"ata_status 0x%x\n",
					port, ata_status);
				BUG_ON(0xffU == ata_status);
				/* mark qc status appropriately */
				ata_qc_complete(qc, ata_status);
			}
		}

> +      err_out_hpriv:

rather odd placement of the goto labels.  If you look at kernel code it's
always either not indented at all, or indented a single space.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux