Re: [PATCH net-next 07/11] net: hns3: adds debug messages to identify eth down cause
From: Jakub Kicinski
Date: Thu Jul 25 2019 - 21:28:57 EST
On Thu, 25 Jul 2019 21:59:08 +0000, Saeed Mahameed wrote:
> I couldn't find any rules regarding what to put in kernel log, Maybe
> someone can share ?. but i vaguely remember that the recommendation
> for device drivers is to put nothing, only error/warning messages.
FWIW my understanding is also that only error/warning messages should
be printed. IOW things which should "never happen".
There are some historical exceptions. Probe logs for instance may be
useful, because its not trivial to get to the device if probe fails.
Another one is ethtool flashing, if it takes time we used to print into
logs some message like "please wait patiently". But since Jiri added
the progress messages in devlink that's no longer necessary.
For the messages which are basically printing the name of the function
or name of the function and their args - we have ftrace.
That's my $0.02 :)