Re: [PATCH net-next v5 2/5] ice: configure FW logging
From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-12-11 16:30:01
From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-12-11 16:30:01
On Sat, 9 Dec 2023 16:09:40 -0800 Paul M Stillwell Jr wrote:
This brings up the question of whether I should use seq_printf() for all the other _read fucntions. It feels like a lot of extra code to do it for the other _read functions because they output so little info and we control the output so it seems to be overkill to use seq_printf() for those. What do you think?
My rule of thumb would be to use seq_printf() if you have to allocate a buffer on the heap for the output. If you can output directly to user space or the output is small enough to fit in an on-stack buffer - no need for seq_printf(). But YMMV.