* [PATCH 3/3] pata_sil680: minor CodingStyle fixups
@ 2011-10-11 18:21 Bartlomiej Zolnierkiewicz
2011-10-11 19:47 ` Alan Cox
2011-10-12 10:48 ` Sergei Shtylyov
0 siblings, 2 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2011-10-11 18:21 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pata_sil680: minor CodingStyle fixups
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ata/pata_sil680.c | 58 ++++++++++++++++++++++++++--------------------
1 file changed, 33 insertions(+), 25 deletions(-)
Index: b/drivers/ata/pata_sil680.c
===================================================================
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -81,7 +81,8 @@ static unsigned long sil680_seldev(struc
* space for us.
*/
-static int sil680_cable_detect(struct ata_port *ap) {
+static int sil680_cable_detect(struct ata_port *ap)
+{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
unsigned long addr = sil680_selreg(ap, 0);
u8 ata66;
@@ -175,7 +176,7 @@ static void sil680_set_dmamode(struct at
mode &= ~(0x03 << port_shift);
/* Extract scsc */
- scsc = (scsc & 0x30) ? 1: 0;
+ scsc = (scsc & 0x30) ? 1 : 0;
if (adev->dma_mode >= XFER_UDMA_0) {
multi = 0x10C1;
@@ -214,7 +215,7 @@ static u8 sil680_init_chip(struct pci_de
{
u8 tmpbyte = 0;
- /* FIXME: double check */
+ /* FIXME: double check */
pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE,
pdev->revision ? 1 : 255);
@@ -232,22 +233,22 @@ static u8 sil680_init_chip(struct pci_de
*try_mmio = (tmpbyte & 1) || pci_resource_start(pdev, 5);
#endif
- switch(tmpbyte & 0x30) {
- case 0x00:
- /* 133 clock attempt to force it on */
- pci_write_config_byte(pdev, 0x8A, tmpbyte|0x10);
- break;
- case 0x30:
- /* if clocking is disabled */
- /* 133 clock attempt to force it on */
- pci_write_config_byte(pdev, 0x8A, tmpbyte & ~0x20);
- break;
- case 0x10:
- /* 133 already */
- break;
- case 0x20:
- /* BIOS set PCI x2 clocking */
- break;
+ switch (tmpbyte & 0x30) {
+ case 0x00:
+ /* 133 clock attempt to force it on */
+ pci_write_config_byte(pdev, 0x8A, tmpbyte|0x10);
+ break;
+ case 0x30:
+ /* if clocking is disabled */
+ /* 133 clock attempt to force it on */
+ pci_write_config_byte(pdev, 0x8A, tmpbyte & ~0x20);
+ break;
+ case 0x10:
+ /* 133 already */
+ break;
+ case 0x20:
+ /* BIOS set PCI x2 clocking */
+ break;
}
pci_read_config_byte(pdev, 0x8A, &tmpbyte);
@@ -265,12 +266,19 @@ static u8 sil680_init_chip(struct pci_de
pci_write_config_dword(pdev, 0xB8, 0x43924392);
pci_write_config_dword(pdev, 0xBC, 0x40094009);
- switch(tmpbyte & 0x30) {
- case 0x00: printk(KERN_INFO "sil680: 100MHz clock.\n");break;
- case 0x10: printk(KERN_INFO "sil680: 133MHz clock.\n");break;
- case 0x20: printk(KERN_INFO "sil680: Using PCI clock.\n");break;
- /* This last case is _NOT_ ok */
- case 0x30: printk(KERN_ERR "sil680: Clock disabled ?\n");
+ switch (tmpbyte & 0x30) {
+ case 0x00:
+ printk(KERN_INFO "sil680: 100MHz clock.\n");
+ break;
+ case 0x10:
+ printk(KERN_INFO "sil680: 133MHz clock.\n");
+ break;
+ case 0x20:
+ printk(KERN_INFO "sil680: Using PCI clock.\n");
+ break;
+ /* This last case is _NOT_ ok */
+ case 0x30:
+ printk(KERN_ERR "sil680: Clock disabled ?\n");
}
return tmpbyte & 0x30;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] pata_sil680: minor CodingStyle fixups
2011-10-11 18:21 [PATCH 3/3] pata_sil680: minor CodingStyle fixups Bartlomiej Zolnierkiewicz
@ 2011-10-11 19:47 ` Alan Cox
2011-10-12 10:48 ` Sergei Shtylyov
1 sibling, 0 replies; 5+ messages in thread
From: Alan Cox @ 2011-10-11 19:47 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Jeff Garzik, linux-ide, linux-kernel
On Tue, 11 Oct 2011 20:21:50 +0200
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] pata_sil680: minor CodingStyle fixups
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] pata_sil680: minor CodingStyle fixups
2011-10-11 18:21 [PATCH 3/3] pata_sil680: minor CodingStyle fixups Bartlomiej Zolnierkiewicz
2011-10-11 19:47 ` Alan Cox
@ 2011-10-12 10:48 ` Sergei Shtylyov
2011-10-12 11:03 ` Alan Cox
1 sibling, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-10-12 10:48 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Jeff Garzik, linux-ide, linux-kernel
Hello.
On 11-10-2011 22:21, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> Subject: [PATCH] pata_sil680: minor CodingStyle fixups
> Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> ---
> drivers/ata/pata_sil680.c | 58 ++++++++++++++++++++++++++--------------------
> 1 file changed, 33 insertions(+), 25 deletions(-)
> Index: b/drivers/ata/pata_sil680.c
> ===================================================================
> --- a/drivers/ata/pata_sil680.c
> +++ b/drivers/ata/pata_sil680.c
[...]
> @@ -265,12 +266,19 @@ static u8 sil680_init_chip(struct pci_de
> pci_write_config_dword(pdev, 0xB8, 0x43924392);
> pci_write_config_dword(pdev, 0xBC, 0x40094009);
>
> - switch(tmpbyte& 0x30) {
> - case 0x00: printk(KERN_INFO "sil680: 100MHz clock.\n");break;
> - case 0x10: printk(KERN_INFO "sil680: 133MHz clock.\n");break;
> - case 0x20: printk(KERN_INFO "sil680: Using PCI clock.\n");break;
> - /* This last case is _NOT_ ok */
> - case 0x30: printk(KERN_ERR "sil680: Clock disabled ?\n");
> + switch (tmpbyte& 0x30) {
> + case 0x00:
> + printk(KERN_INFO "sil680: 100MHz clock.\n");
> + break;
> + case 0x10:
> + printk(KERN_INFO "sil680: 133MHz clock.\n");
> + break;
> + case 0x20:
> + printk(KERN_INFO "sil680: Using PCI clock.\n");
> + break;
pr_info() here and above?
> + /* This last case is _NOT_ ok */
> + case 0x30:
> + printk(KERN_ERR "sil680: Clock disabled ?\n");
pr_err()? Or checkpatch.pl doesn't complain about it (I forgot)?
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] pata_sil680: minor CodingStyle fixups
2011-10-12 10:48 ` Sergei Shtylyov
@ 2011-10-12 11:03 ` Alan Cox
2011-10-14 16:45 ` Jeff Garzik
0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2011-10-12 11:03 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Bartlomiej Zolnierkiewicz, Jeff Garzik, linux-ide, linux-kernel
>
> > + /* This last case is _NOT_ ok */
> > + case 0x30:
> > + printk(KERN_ERR "sil680: Clock disabled ?\n");
>
> pr_err()? Or checkpatch.pl doesn't complain about it (I forgot)?
dev_ would be even better but that seems to be a separate thing. The
existing patch is still a move in the right direction.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] pata_sil680: minor CodingStyle fixups
2011-10-12 11:03 ` Alan Cox
@ 2011-10-14 16:45 ` Jeff Garzik
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2011-10-14 16:45 UTC (permalink / raw)
To: Alan Cox, Bartlomiej Zolnierkiewicz
Cc: Sergei Shtylyov, linux-ide, linux-kernel
On 10/12/2011 07:03 AM, Alan Cox wrote:
>
>>
>>> + /* This last case is _NOT_ ok */
>>> + case 0x30:
>>> + printk(KERN_ERR "sil680: Clock disabled ?\n");
>>
>> pr_err()? Or checkpatch.pl doesn't complain about it (I forgot)?
>
> dev_ would be even better but that seems to be a separate thing. The
> existing patch is still a move in the right direction.
agreed x 2
To be specific, it should be
dev_err(&pdev->dev
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-14 16:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-11 18:21 [PATCH 3/3] pata_sil680: minor CodingStyle fixups Bartlomiej Zolnierkiewicz
2011-10-11 19:47 ` Alan Cox
2011-10-12 10:48 ` Sergei Shtylyov
2011-10-12 11:03 ` Alan Cox
2011-10-14 16:45 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).