On Tue, Oct 20, 2015 at 2:19 PM, Jean-Christophe Dubois <j...@tribudubois.net> wrote: > We fix all i.MX driver files to use the same type of debug code. > > The goal is to have debug code always compiled during build. >
It goes beyond that, it that the logs are now going to be way easier to read with a consistent formatting of verbose messages. I think this is a good idea, and with a lack of precedent (that I know of) you may be setting a tree-wide standard here. CC Markus who is into logs and errors. Patch 2 sums up nicely the proposed format: if (DEBUG_IMX_GPIO) { \ - fprintf(stderr, "%s: " fmt , __func__, ##args); \ + fprintf(stderr, "[%s]%s: " fmt , TYPE_IMX_GPIO, \ + __func__, ##args); \ which is: [QOM_TYPE_NAME]reporting_function: some printf type message so general RFC on what other think of it. Are there any existing in-tree standards to factor in? I am OK in principle. Regards, Peter > Jean-Christophe Dubois (8): > i.MX: Standardize i.MX serial debug. > i.MX: Standardize i.MX GPIO debug > i.MX: Standardize i.MX I2C debug > i.MX: Standardize i.MX AVIC debug > i.MX: Standardize i.MX CCM debug > i.MX: Standardize i.MX FEC debug > i.MX: Standardize i.MX EPIT debug > i.MX: Standardize i.MX GPT debug > > hw/char/imx_serial.c | 39 +++++++++++++++++---------------------- > hw/gpio/imx_gpio.c | 3 ++- > hw/i2c/imx_i2c.c | 25 +++++++++++++------------ > hw/intc/imx_avic.c | 40 ++++++++++++++++------------------------ > hw/misc/imx_ccm.c | 30 ++++++++++++++++++++---------- > hw/net/imx_fec.c | 38 ++++++++++++++++++-------------------- > hw/timer/imx_epit.c | 37 +++++++++++++++---------------------- > hw/timer/imx_gpt.c | 40 +++++++++++++++------------------------- > 8 files changed, 116 insertions(+), 136 deletions(-) > > -- > 2.1.4 >