From: Richard Knutsson <ricknu-0@student.ltu.se>
To: Jeff Garzik <jeff@garzik.org>
Cc: LKML <linux-kernel@vger.kernel.org>, akpm@linux-foundation.org
Subject: Re: [PATCH] [libata] fix 'if(' and similar areas that lack whitespace
Date: Thu, 25 Oct 2007 17:35:33 +0200 [thread overview]
Message-ID: <4720B7C5.1080101@student.ltu.se> (raw)
In-Reply-To: <20071024234834.76D681F81AC@havoc.gtf.org>
Jeff Garzik wrote:
> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
> ---
> drivers/ata/pata_acpi.c | 4 +-
> drivers/ata/pata_optidma.c | 2 +-
> drivers/ata/pata_pdc2027x.c | 2 +-
> drivers/ata/pata_pdc202xx_old.c | 4 +-
> drivers/ata/pata_via.c | 2 +-
> drivers/ata/pata_winbond.c | 2 +-
> drivers/ata/sata_nv.c | 46 +++++++++++++++++++-------------------
> drivers/ata/sata_sx4.c | 4 +-
> 8 files changed, 33 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
> index 0f6f7bc..e4542ab 100644
> --- a/drivers/ata/pata_acpi.c
> +++ b/drivers/ata/pata_acpi.c
> @@ -181,7 +181,7 @@ static void pacpi_set_piomode(struct ata_port *ap, struct ata_device *adev)
> int unit = adev->devno;
> struct pata_acpi *acpi = ap->private_data;
>
> - if(!(acpi->gtm.flags & 0x10))
> + if (!(acpi->gtm.flags & 0x10))
> unit = 0;
>
> /* Now stuff the nS values into the structure */
> @@ -202,7 +202,7 @@ static void pacpi_set_dmamode(struct ata_port *ap, struct ata_device *adev)
> int unit = adev->devno;
> struct pata_acpi *acpi = ap->private_data;
>
> - if(!(acpi->gtm.flags & 0x10))
> + if (!(acpi->gtm.flags & 0x10))
> unit = 0;
>
> /* Now stuff the nS values into the structure */
> diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
> index 6b07b5b..f9b485a 100644
> --- a/drivers/ata/pata_optidma.c
> +++ b/drivers/ata/pata_optidma.c
> @@ -449,7 +449,7 @@ static int optiplus_with_udma(struct pci_dev *pdev)
>
> /* Find function 1 */
> dev1 = pci_get_device(0x1045, 0xC701, NULL);
> - if(dev1 == NULL)
> + if (dev1 == NULL)
>
Maybe "if (!dev1)" instead?
> return 0;
>
> /* Rev must be >= 0x10 */
>
>
<snip>
> diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
> index 2e0279f..9210bb2 100644
> --- a/drivers/ata/sata_nv.c
> +++ b/drivers/ata/sata_nv.c
> @@ -1012,7 +1012,7 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
> u32 check_commands;
> int pos, error = 0;
>
> - if(ata_tag_valid(ap->link.active_tag))
> + if (ata_tag_valid(ap->link.active_tag))
> check_commands = 1 << ap->link.active_tag;
> else
> check_commands = ap->link.sactive;
> @@ -1028,7 +1028,7 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
> }
> }
>
> - if(notifier_clears[0] || notifier_clears[1]) {
> + if (notifier_clears[0] || notifier_clears[1]) {
> /* Note: Both notifier clear registers must be written
> if either is set, even if one is zero, according to NVIDIA. */
> struct nv_adma_port_priv *pp = host->ports[0]->private_data;
> @@ -1119,7 +1119,7 @@ static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc)
> {
> struct nv_adma_port_priv *pp = qc->ap->private_data;
>
> - if(pp->flags & NV_ADMA_PORT_REGISTER_MODE)
> + if (pp->flags & NV_ADMA_PORT_REGISTER_MODE)
> ata_bmdma_post_internal_cmd(qc);
> }
>
> @@ -1194,10 +1194,10 @@ static int nv_adma_port_start(struct ata_port *ap)
>
> tmp = readw(mmio + NV_ADMA_CTL);
> writew(tmp | NV_ADMA_CTL_CHANNEL_RESET, mmio + NV_ADMA_CTL);
> - readw( mmio + NV_ADMA_CTL ); /* flush posted write */
> + readw(mmio + NV_ADMA_CTL ); /* flush posted write */
>
Missed the space before closing parentheses...
> udelay(1);
> writew(tmp & ~NV_ADMA_CTL_CHANNEL_RESET, mmio + NV_ADMA_CTL);
> - readw( mmio + NV_ADMA_CTL ); /* flush posted write */
> + readw(mmio + NV_ADMA_CTL ); /* flush posted write */
>
and here
>
> return 0;
> }
> @@ -1255,10 +1255,10 @@ static int nv_adma_port_resume(struct ata_port *ap)
>
> tmp = readw(mmio + NV_ADMA_CTL);
> writew(tmp | NV_ADMA_CTL_CHANNEL_RESET, mmio + NV_ADMA_CTL);
> - readw( mmio + NV_ADMA_CTL ); /* flush posted write */
> + readw(mmio + NV_ADMA_CTL ); /* flush posted write */
>
and here
> udelay(1);
> writew(tmp & ~NV_ADMA_CTL_CHANNEL_RESET, mmio + NV_ADMA_CTL);
> - readw( mmio + NV_ADMA_CTL ); /* flush posted write */
> + readw(mmio + NV_ADMA_CTL ); /* flush posted write */
>
and here
>
> return 0;
> }
>
The rest looks good.
cu
Richard Knutsson
prev parent reply other threads:[~2007-10-25 15:42 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 23:48 [PATCH] sound/oss/pss: set_io_base() always returns success, mark it void Jeff Garzik
2007-10-24 23:48 ` [PATCH 1/3] [IDE] Add helper __ide_setup_pci_device() Jeff Garzik
2007-10-25 19:33 ` Bartlomiej Zolnierkiewicz
2007-10-24 23:48 ` [PATCH 2/3] drivers/ide/pci/sc1200.c: remove pointless hwif lookup loop Jeff Garzik
2007-10-25 20:01 ` Bartlomiej Zolnierkiewicz
2007-10-26 1:25 ` Jeff Garzik
2007-10-31 21:53 ` Bartlomiej Zolnierkiewicz
2007-10-24 23:48 ` [PATCH 3/3] drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings Jeff Garzik
2007-10-25 20:10 ` Bartlomiej Zolnierkiewicz
2007-10-24 23:48 ` [PATCH 1/4] [SCSI] ips: remove ips_ha members that duplicate struct pci_dev members Jeff Garzik
2007-10-25 4:27 ` Andrew Morton
2007-10-25 5:09 ` Jeff Garzik
2007-10-25 15:04 ` Boaz Harrosh
2007-10-25 15:28 ` Matthew Wilcox
2007-10-25 16:06 ` Boaz Harrosh
2007-10-25 22:42 ` Jeff Garzik
2007-10-25 14:32 ` Salyzyn, Mark
2007-10-25 14:32 ` Salyzyn, Mark
2007-10-25 22:42 ` Jeff Garzik
2007-10-24 23:48 ` [PATCH 2/4] [SCSI] ips: trim trailing whitespace Jeff Garzik
2007-10-25 14:33 ` Salyzyn, Mark
2007-10-25 14:33 ` Salyzyn, Mark
2007-10-24 23:48 ` [PATCH 3/4] [SCSI] ips: PCI API cleanups Jeff Garzik
2007-10-25 6:54 ` Rolf Eike Beer
2007-10-25 14:37 ` Salyzyn, Mark
2007-10-25 14:37 ` Salyzyn, Mark
2007-10-24 23:48 ` [PATCH 4/4] [SCSI] ips: handle scsi_add_host() failure, and other err cleanups Jeff Garzik
2007-10-25 14:39 ` Salyzyn, Mark
2007-10-25 14:39 ` Salyzyn, Mark
2007-10-24 23:48 ` [PATCH] [libata] fix 'if(' and similar areas that lack whitespace Jeff Garzik
2007-10-25 15:35 ` Richard Knutsson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4720B7C5.1080101@student.ltu.se \
--to=ricknu-0@student.ltu.se \
--cc=akpm@linux-foundation.org \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.