diff options
author | Samarth Parikh <samarthp@ymail.com> | 2014-07-16 06:44:37 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-08-19 14:53:07 -0400 |
commit | 6f3c0f163103fb225c77b73ca17fc4ecea308103 (patch) | |
tree | 0a8c89ee85814c9d12f910e451bd3d71bf135fc6 /drivers/mtd/devices | |
parent | 2902330e7ac16d5962f114d92bb17631e9cb49e9 (diff) |
mtd: Fixed checkpatch seq_printf warnings
Fixed checkpatch warnings: "WARNING: Prefer seq_puts to seq_printf"
This patch is created with reference to the ongoing lkml thread
https://lkml.org/lkml/2014/7/15/646
where Andrew Morton wrote:
"
- puts is presumably faster
- puts doesn't go rogue if you accidentally pass it a "%".
- this patch would actually make compiled object files few bytes smaller.
Perhaps because seq_printf() is a varargs function, forcing the
caller to pass args on the stack instead of in registers.
"
Signed-off-by: Samarth Parikh <samarthp@ymail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/docg3.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c index 91a169c44b39..21cc4b66feaa 100644 --- a/drivers/mtd/devices/docg3.c +++ b/drivers/mtd/devices/docg3.c | |||
@@ -1697,16 +1697,16 @@ static int dbg_asicmode_show(struct seq_file *s, void *p) | |||
1697 | 1697 | ||
1698 | switch (mode) { | 1698 | switch (mode) { |
1699 | case DOC_ASICMODE_RESET: | 1699 | case DOC_ASICMODE_RESET: |
1700 | pos += seq_printf(s, "reset"); | 1700 | pos += seq_puts(s, "reset"); |
1701 | break; | 1701 | break; |
1702 | case DOC_ASICMODE_NORMAL: | 1702 | case DOC_ASICMODE_NORMAL: |
1703 | pos += seq_printf(s, "normal"); | 1703 | pos += seq_puts(s, "normal"); |
1704 | break; | 1704 | break; |
1705 | case DOC_ASICMODE_POWERDOWN: | 1705 | case DOC_ASICMODE_POWERDOWN: |
1706 | pos += seq_printf(s, "powerdown"); | 1706 | pos += seq_puts(s, "powerdown"); |
1707 | break; | 1707 | break; |
1708 | } | 1708 | } |
1709 | pos += seq_printf(s, ")\n"); | 1709 | pos += seq_puts(s, ")\n"); |
1710 | return pos; | 1710 | return pos; |
1711 | } | 1711 | } |
1712 | DEBUGFS_RO_ATTR(asic_mode, dbg_asicmode_show); | 1712 | DEBUGFS_RO_ATTR(asic_mode, dbg_asicmode_show); |
@@ -1745,22 +1745,22 @@ static int dbg_protection_show(struct seq_file *s, void *p) | |||
1745 | pos += seq_printf(s, "Protection = 0x%02x (", | 1745 | pos += seq_printf(s, "Protection = 0x%02x (", |
1746 | protect); | 1746 | protect); |
1747 | if (protect & DOC_PROTECT_FOUNDRY_OTP_LOCK) | 1747 | if (protect & DOC_PROTECT_FOUNDRY_OTP_LOCK) |
1748 | pos += seq_printf(s, "FOUNDRY_OTP_LOCK,"); | 1748 | pos += seq_puts(s, "FOUNDRY_OTP_LOCK,"); |
1749 | if (protect & DOC_PROTECT_CUSTOMER_OTP_LOCK) | 1749 | if (protect & DOC_PROTECT_CUSTOMER_OTP_LOCK) |
1750 | pos += seq_printf(s, "CUSTOMER_OTP_LOCK,"); | 1750 | pos += seq_puts(s, "CUSTOMER_OTP_LOCK,"); |
1751 | if (protect & DOC_PROTECT_LOCK_INPUT) | 1751 | if (protect & DOC_PROTECT_LOCK_INPUT) |
1752 | pos += seq_printf(s, "LOCK_INPUT,"); | 1752 | pos += seq_puts(s, "LOCK_INPUT,"); |
1753 | if (protect & DOC_PROTECT_STICKY_LOCK) | 1753 | if (protect & DOC_PROTECT_STICKY_LOCK) |
1754 | pos += seq_printf(s, "STICKY_LOCK,"); | 1754 | pos += seq_puts(s, "STICKY_LOCK,"); |
1755 | if (protect & DOC_PROTECT_PROTECTION_ENABLED) | 1755 | if (protect & DOC_PROTECT_PROTECTION_ENABLED) |
1756 | pos += seq_printf(s, "PROTECTION ON,"); | 1756 | pos += seq_puts(s, "PROTECTION ON,"); |
1757 | if (protect & DOC_PROTECT_IPL_DOWNLOAD_LOCK) | 1757 | if (protect & DOC_PROTECT_IPL_DOWNLOAD_LOCK) |
1758 | pos += seq_printf(s, "IPL_DOWNLOAD_LOCK,"); | 1758 | pos += seq_puts(s, "IPL_DOWNLOAD_LOCK,"); |
1759 | if (protect & DOC_PROTECT_PROTECTION_ERROR) | 1759 | if (protect & DOC_PROTECT_PROTECTION_ERROR) |
1760 | pos += seq_printf(s, "PROTECT_ERR,"); | 1760 | pos += seq_puts(s, "PROTECT_ERR,"); |
1761 | else | 1761 | else |
1762 | pos += seq_printf(s, "NO_PROTECT_ERR"); | 1762 | pos += seq_puts(s, "NO_PROTECT_ERR"); |
1763 | pos += seq_printf(s, ")\n"); | 1763 | pos += seq_puts(s, ")\n"); |
1764 | 1764 | ||
1765 | pos += seq_printf(s, "DPS0 = 0x%02x : " | 1765 | pos += seq_printf(s, "DPS0 = 0x%02x : " |
1766 | "Protected area [0x%x - 0x%x] : OTP=%d, READ=%d, " | 1766 | "Protected area [0x%x - 0x%x] : OTP=%d, READ=%d, " |