Skip to contentSkip to conversation

ata: remove whitespace after '(' and before ')'

PATCH In review [email protected] 4 participants 4 messages Jul 18, 2023 1 message not in the archive libata

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 ata: remove whitespace after '(' and before ')'

This patch fixes the following checkpatch errors:

./drivers/ata/pata_sis.c:691: ERROR: space prohibited after that open parenthesis '(' ./drivers/ata/pata_sis.c:691: ERROR: space prohibited before that close parenthesis ')'

---
 drivers/ata/pata_sis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_sis.c +1 -1
index 31de06b..2019777 100644
@@ -688,7 +688,7 @@ static void sis_fixup(struct pci_dev *pdev, struct sis_chipset *sis)
 
     if (sis->info == &sis_info33) {
         pci_read_config_byte(pdev, PCI_CLASS_PROG, &reg);
-        if (( reg & 0x0F ) != 0x00)
+        if ((reg & 0x0F) != 0x00)
             pci_write_config_byte(pdev, PCI_CLASS_PROG, reg & 0xF0);
         /* Fall through to ATA16 fixup below */
     }
Reviewed-by Sergey Shtylyov on v1 1/1
#2 lore raw
Quoted 6 lines · On 7/18/23 11:53 AM, [email protected] wrote:

This patch fixes the following checkpatch errors:

./drivers/ata/pata_sis.c:691: ERROR: space prohibited after that open parenthesis '(' ./drivers/ata/pata_sis.c:691: ERROR: space prohibited before that close parenthesis ')'

What happened to your email? :-)

Altho I'm not sure whether Damien would want to apply that...

[...]

MBR, Sergey

#3 lore raw
Quoted 5 lines · Sergei Shtylyov
Quoted 5 lines

This patch fixes the following checkpatch errors:

./drivers/ata/pata_sis.c:691: ERROR: space prohibited after that open parenthesis '(' ./drivers/ata/pata_sis.c:691: ERROR: space prohibited before that close parenthesis ')'

Quoted 7 lines
Quoted 1 line

What happened to your email? :-)

Altho I'm not sure whether Damien would want to apply that...

Oh, and the subject should look like this:

ata: pata_sis: remove whitespace after '(' and before ')'

MBR, Sergey

maintainer
#4 lore raw
In reply to [email protected]
Quoted 1 line · On 7/18/23 17:53, [email protected] wrote:

This patch fixes the following checkpatch errors:

The subject should be:

ata: pata_sis: xxx

But in any case, the above message says that this is a warning from checkpatch. But what are you patching to get this ? If you run checkpatch directly on drivers/ata/pata_sis.c, you will get *a lot* more warnings than just this. And I would not want patches to fix that, unless the warnings are also generated with "make W=1" or "make C=1".

If you actually fix a bug in this driver that touches code around the lines you touch, then it is fine to fix that to avoid the warnings, but not just for the sake of it. libata code overall has a lot of code style issues that will trigger checkpatch warnings. When code is changed, fixing the code style at the same time is fine.

Exception to this is again if you see warnings with "make W=1" or "make C=1". I applied a lot of patches recently to fix the code style in the pata_parport protocol modules because they were generating compilation warnings.

Quoted 25 lines

./drivers/ata/pata_sis.c:691: ERROR: space prohibited after that open parenthesis '('
./drivers/ata/pata_sis.c:691: ERROR: space prohibited before that close parenthesis ')'

---
  drivers/ata/pata_sis.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_sis.c +1 -1
index 31de06b..2019777 100644
@@ -688,7 +688,7 @@ static void sis_fixup(struct pci_dev *pdev, struct 
 sis_chipset *sis)
 
      if (sis->info == &sis_info33) {
          pci_read_config_byte(pdev, PCI_CLASS_PROG, &reg);
-        if (( reg & 0x0F ) != 0x00)
+        if ((reg & 0x0F) != 0x00)
              pci_write_config_byte(pdev, PCI_CLASS_PROG, reg & 0xF0);
          /* Fall through to ATA16 fixup below */
      }
Signature · 2 lines
Damien Le Moal
Western Digital Research