[PATCH v6 42/57] dyndbg: shrink lineno field by 2 bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



struct _ddebug.lineno int:18 is bigger than we need:

  git ls-files | grep -P '\.c$' | xargs wc -l | sort -n | tail -n20
  ...
   22553 drivers/scsi/lpfc/lpfc_sli.c
   28593 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
   46300 drivers/net/wireless/realtek/rtw88/rtw8822c_table.c
   48725 drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
 1386670 total
 ...

All but one of the biggest of these are just .data tables, and have no
code, so would never need a pr_debug().  drivers/scsi/lpfc/lpfc_sli.c,
at ~22k lines, would be encodable with 15 bits, but lets just shrink
to 16 bits for now.

RFC: Is this tantamout to a "don't write files with >64kloc" policy ?

Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
---
 include/linux/dynamic_debug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index dcc0e8cc2ef0..c05148dab367 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -30,7 +30,7 @@ struct _ddebug {
 	struct _ddebug_site *site;
 	/* format is always needed, lineno shares word with flags */
 	const char *format;
-	const unsigned lineno:18;
+	const unsigned lineno:16;
 #define CLS_BITS 6
 	unsigned int class_id:CLS_BITS;
 #define _DPRINTK_CLASS_DFLT		((1 << CLS_BITS) - 1)
-- 
2.37.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux