All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: levex@linux.com
Cc: Tejun Heo <tj@kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] ata_piix: minor typo fixes and threading fix
Date: Sun, 22 Sep 2013 18:44:50 +0400	[thread overview]
Message-ID: <523F0262.7070809@cogentembedded.com> (raw)
In-Reply-To: <523EF645.7050808@linux.com>

Hello.

On 22.09.2013 17:53, Levente Kurusa wrote:

> Hi,

> The following patch fixes a printk() call, which was originally used with
> pr_cont, which will however fail. Fixed that with setting up a buffer to save
> data to that first, and then printk() it. The patch also
> fixes some minor typos and a comment, so that it better reflects the
> documentation of ICH*.

    Wrap your changelog lines at 80 columns (preferably less).

> Regards,
> Levente Kurusa

    The patch changelog is not a place for greetings and regards.

> Signed-off-by: Levente Kurusa <levex@linux.com>
> ---
> diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
> index 93cb092..b7bf3df 100644
> --- a/drivers/ata/ata_piix.c
> +++ b/drivers/ata/ata_piix.c
> @@ -100,7 +100,7 @@
>
>   enum {

    Your patch is whitespace damaged, there was no space on previous line, and 
there are two spaces starting this line (instead of one).

> @@ -1368,34 +1368,53 @@ static const int *piix_init_sata_map(struct pci_dev
> *pdev,
>       pci_read_config_byte(pdev, ICH5_PMR, &map_value);
>
>       map = map_db->map[map_value & map_db->mask];
> -
> -    dev_info(&pdev->dev, "MAP [");
> +    char* mapdata[4];

    Don't mix declarations and data.

>       for (i = 0; i < 4; i++) {
>           switch (map[i]) {
>           case RV:
>               invalid_map = 1;
> -            pr_cont(" XX");
> +            mapdata[i] =" XX";
>               break;
>
>           case NA:
> -            pr_cont(" --");
> +            mapdata[i] = " --";
>               break;
>
>           case IDE:
>               WARN_ON((i & 1) || map[i + 1] != IDE);
>               pinfo[i / 2] = piix_port_info[ich_pata_100];
>               i++;
> -            pr_cont(" IDE IDE");
> +            mapdata[i] = " IDE IDE";
> +            break;
> +        case P0:
> +            mapdata[i] = " P0";
> +            if (i & 1)
> +                pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS;
> +            break;
> +        case P1:
> +            mapdata[i] = " P1";
> +            if (i & 1)
> +                pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS;
> +            break;
> +        case P2:
> +            mapdata[i] = " P2";
> +            if (i & 1)
> +                pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS;
> +            break;
> +        case P3:
> +            mapdata[i] = " P3";
> +            pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS;
> +            if (i & 1)
> +                pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS;
>               break;

    I don't think the code repeating 4 times is a good idea.

> -
>           default:
> -            pr_cont(" P%d", map[i]);
> +            mapdata[i] = " INV";
>               if (i & 1)
>                   pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS;
>               break;
>           }
>       }
> -    pr_cont(" ]\n");
> +    dev_info(&pdev->dev, "MAP [%s%s%s%s ]\n", mapdata[0], mapdata[1],
> mapdata[2], mapdata[3], map_value, map_db->mask);

    You didn't specify the formats for the last 2 arguments and your line is 
longer than 80 columns, please wrap it.

> @@ -1718,18 +1741,17 @@ static int piix_init_one(struct pci_dev *pdev, const
> struct pci_device_id *ent)
>           if (host->ports[0]->ops == &piix_sidpr_sata_ops)
>               sht = &piix_sidpr_sht;
>       }
> -

    Why?

>       /* apply IOCFG bit18 quirk */
>       piix_iocfg_bit18_quirk(host);
>
> -    /* On ICH5, some BIOSen disable the interrupt using the
> +    /* On ICH5, some BIOSes disable the interrupt using the

    Why? "BIOSen" is not a typo, it's a jargon.

WBR, Sergei


  reply	other threads:[~2013-09-22 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-22 13:53 [PATCH] ata_piix: minor typo fixes and threading fix Levente Kurusa
2013-09-22 14:44 ` Sergei Shtylyov [this message]
2013-09-22 15:05   ` Levente Kurusa
2013-09-22 15:10   ` Sergei Shtylyov
2013-09-22 15:39 ` Tejun Heo
2013-09-22 15:46   ` Levente Kurusa
2013-09-22 16:05     ` Tejun Heo
2013-09-25 14:40       ` Levente Kurusa
2013-09-26 14:09         ` Tejun Heo
2013-09-26 17:14           ` Levente Kurusa
2013-09-26 17:57           ` Kay Sievers
2013-09-27 13:28             ` Tejun Heo
2013-09-27 13:29             ` Levente Kurusa

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=523F0262.7070809@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=levex@linux.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@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.