[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220904214134.408619-43-jim.cromie@gmail.com>
Date: Sun, 4 Sep 2022 15:41:19 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: jbaron@...mai.com, gregkh@...uxfoundation.org,
dri-devel@...ts.freedesktop.org, amd-gfx@...ts.freedesktop.org,
intel-gvt-dev@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc: daniel.vetter@...ll.ch, seanpaul@...omium.org, robdclark@...il.com,
linux@...musvillemoes.dk, joe@...ches.com,
Jim Cromie <jim.cromie@...il.com>
Subject: [PATCH v6 42/57] dyndbg: shrink lineno field by 2 bits
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@...il.com>
---
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
Powered by blists - more mailing lists