Skip to contentSkip to conversation

atm: idt77252: clean up trigraph warning on ??) string

PATCH In review Colin King 2 participants 3 messages Jul 20, 2021

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 atm: idt77252: clean up trigraph warning on ??) string

From: Colin Ian King <[email protected]>

The character sequence ??) is a trigraph and causes the following clang warning:

drivers/atm/idt77252.c:3544:35: warning: trigraph ignored [-Wtrigraphs]

Clean this by replacing it with single ?.

---
 drivers/atm/idt77252.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/atm/idt77252.c +1 -1
index 9e4bd751db79..81ce81a75fc6 100644
@@ -3536,7 +3536,7 @@ static int idt77252_preset(struct idt77252_dev *card)
 		return -1;
 	}
 	if (!(pci_command & PCI_COMMAND_IO)) {
-		printk("%s: PCI_COMMAND: %04x (???)\n",
+		printk("%s: PCI_COMMAND: %04x (?)\n",
 		       card->name, pci_command);
 		deinit_card(card);
 		return (-1);
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Colin King

From: Colin Ian King <[email protected]>

The character sequence ??) is a trigraph and causes the following clang warning:

drivers/atm/idt77252.c:3544:35: warning: trigraph ignored [-Wtrigraphs]

Clean this by replacing it with single ?.

This looks good to me but I am curious how you say this warning in the first place since the main Makefile disables this unconditionally. Did you just pass -Wtrigraphs via KCFLAGS or something similar?

Quoted 18 lines
---
  drivers/atm/idt77252.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/atm/idt77252.c +1 -1
index 9e4bd751db79..81ce81a75fc6 100644
@@ -3536,7 +3536,7 @@ static int idt77252_preset(struct idt77252_dev *card)
  		return -1;
  	}
  	if (!(pci_command & PCI_COMMAND_IO)) {
-		printk("%s: PCI_COMMAND: %04x (???)\n",
+		printk("%s: PCI_COMMAND: %04x (?)\n",
  		       card->name, pci_command);
  		deinit_card(card);
  		return (-1);
#2 lore raw
Quoted 8 lines · Nathan Chancellor
Quoted 7 lines · Colin King

From: Colin Ian King <[email protected]>

The character sequence ??) is a trigraph and causes the following clang warning:

drivers/atm/idt77252.c:3544:35: warning: trigraph ignored [-Wtrigraphs]

Quoted 7 lines
Quoted 3 lines

Clean this by replacing it with single ?.

This looks good to me but I am curious how you say this warning in the first place since the main Makefile disables this unconditionally. Did you just pass -Wtrigraphs via KCFLAGS or something similar?

I used W=1

Quoted 22 lines
Quoted 19 lines

---
  drivers/atm/idt77252.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/atm/idt77252.c +1 -1
index 9e4bd751db79..81ce81a75fc6 100644
@@ -3536,7 +3536,7 @@ static int idt77252_preset(struct idt77252_dev
 *card)
           return -1;
       }
       if (!(pci_command & PCI_COMMAND_IO)) {
-        printk("%s: PCI_COMMAND: %04x (???)\n",
+        printk("%s: PCI_COMMAND: %04x (?)\n",
                  card->name, pci_command);
           deinit_card(card);

          return (-1);