lkml.org 
[lkml]   [2005]   [Sep]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 1 Sep 2005 15:40:38 +0100
FromChristoph Hellwig <>
SubjectRe: [PATCH 2.6.13] libata: Marvell SATA support (PIO mode)
> +#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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-01 16:44    [W:0.676 / U:0.100 seconds]
©2003-2008 Jasper Spaans