Joe Perches wrote:
On Wed, 2007-12-05 at 16:01 -0800, Andrew Morton wrote:You could trim linebuf[] to 80 chars or so. Extra points for making it very clear when someone tries to exceed that - strcpy(linebuf, "stop being stupid").Maybe just eliminate the 16 or 32 byte width option and force it to only 16 byte widths. That'd keep it down to ~ 100 bytes nicely. Prefix + address + dump + ascii: 20 + 18 + 48 + 10.
Have you checked users (callers)? I'm pretty sure that one of the callers wanted 32 and that's why it's there. -- ~Randy Features and documentation: http://lwn.net/Articles/260136/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] Reduce stack used by lib/hexdump.c
- From: Joe Perches <[email protected]>
- Re: [PATCH] Reduce stack used by lib/hexdump.c
- References:
- [PATCH] Remove #define hex_asc from kernel.h, update lib/hexdump.c
- From: Joe Perches <[email protected]>
- Re: [PATCH] Remove #define hex_asc from kernel.h, update lib/hexdump.c
- From: Randy Dunlap <[email protected]>
- Re: [PATCH] Remove #define hex_asc from kernel.h, update lib/hexdump.c
- From: Joe Perches <[email protected]>
- Re: [PATCH] Remove #define hex_asc from kernel.h, update lib/hexdump.c
- From: Randy Dunlap <[email protected]>
- [PATCH] Reduce stack used by lib/hexdump.c
- From: Joe Perches <[email protected]>
- Re: [PATCH] Reduce stack used by lib/hexdump.c
- From: Randy Dunlap <[email protected]>
- Re: [PATCH] Reduce stack used by lib/hexdump.c
- From: Jan Engelhardt <[email protected]>
- Re: [PATCH] Reduce stack used by lib/hexdump.c
- From: Joe Perches <[email protected]>
- Re: [PATCH] Reduce stack used by lib/hexdump.c
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Reduce stack used by lib/hexdump.c
- From: Joe Perches <[email protected]>
- [PATCH] Remove #define hex_asc from kernel.h, update lib/hexdump.c
- Prev by Date: Re: [PATCH] Reduce stack used by lib/hexdump.c
- Next by Date: [PATCH] Scheduler Profiling - Use Immediate Values
- Previous by thread: Re: [PATCH] Reduce stack used by lib/hexdump.c
- Next by thread: Re: [PATCH] Reduce stack used by lib/hexdump.c
- Index(es):