[PATCH linux dev-4.7] fsi: i2c: Remove noisy printks
Christopher Bostic
cbostic at linux.vnet.ibm.com
Tue Mar 21 08:17:58 AEDT 2017
On 3/16/17 9:34 PM, Joel Stanley wrote:
> These create a lot of noise in the kernel log. Hide them behind dev_dbg.
>
> PROBE eng[00f5112c]
> Adding ports[0x0000000000007fff] to eng[0x00f5112c]
> bus[0000000f] created
> bus[00000010] created
> bus[00000011] created
> bus[00000012] created
> bus[00000013] created
> bus[00000014] created
> bus[00000015] created
> bus[00000016] created
> bus[00000017] created
> bus[00000018] created
> bus[00000019] created
> bus[0000001a] created
> bus[0000001b] created
> bus[0000001c] created
> bus[0000001d] created
> RESUME eng[00f5112c]
> iic_boe_reset
> iic_boe_eng_init: P8/Z7PLUS mode
> clean port busy port_busy[0001ffff]
> iic_boe_eng_init: P8/Z7PLUS mode
>
> Signed-off-by: Joel Stanley <joel at jms.id.au>
> ---
>
> Tested on Romulus
>
> drivers/fsi/i2c/iic-boe.c | 12 ++++++------
> drivers/fsi/i2c/iic-fsi.c | 12 ++++++------
> drivers/fsi/i2c/iic-mstr.c | 6 ++----
> 3 files changed, 14 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/fsi/i2c/iic-boe.c b/drivers/fsi/i2c/iic-boe.c
> index e7196c0115b1..5b90a856c4fd 100644
> --- a/drivers/fsi/i2c/iic-boe.c
> +++ b/drivers/fsi/i2c/iic-boe.c
> @@ -697,23 +697,23 @@ int iic_boe_eng_init(iic_eng_t* eng, iic_ffdc_t** ffdc)
> clk_div = IIC_BOE_HZ2DIV(eng->bus_speed, IIC_BOE_DFLT_SPEED);
> if(!clk_div)
> {
> - IFLDi(2, "eng[%08x], max speed = %ld\n",
> + dev_dbg(eng->dev, "eng[%08x], max speed = %ld\n",
> eng->id, eng->bus_speed / 5);
> }
> if(clk_div & ~IIC_BOE_MAX_CLKDIV)
> clk_div = IIC_BOE_MAX_CLKDIV;
> - IFLDd(3, "eng[%08x] speed[%ld] divisor[%ld]\n", eng->id,
> + dev_dbg(eng->dev, "eng[%08x] speed[%ld] divisor[%ld]\n", eng->id,
> IIC_BOE_DIV2HZ(eng->bus_speed, clk_div), clk_div);
>
> if(test_bit(IIC_ENG_Z7PLUS, &eng->flags) ||
> test_bit(IIC_ENG_P8_Z8_CENTAUR, &eng->flags))
> {
> - IFLDi(0, "iic_boe_eng_init: P8/Z7PLUS mode\n");
> + dev_dbg(eng->dev, "iic_boe_eng_init: P8/Z7PLUS mode\n");
> mode = IIC_BOE_Z7_MK_CLKDIV(clk_div);
> }
> else
> {
> - IFLDi(0, "iic_boe_eng_init: Normal mode\n");
> + dev_dbg(eng->dev, "iic_boe_eng_init: Normal mode\n");
> mode = IIC_BOE_MK_CLKDIV(clk_div);
> }
>
> @@ -1362,7 +1362,7 @@ int iic_boe_reset(iic_eng_t* eng, int type, iic_ffdc_t** ffdc)
>
> IENTER();
> /* issue an immediate reset i2c command */
> - IFLDi(0, "iic_boe_reset\n");
> + dev_dbg(eng->dev, "iic_boe_reset\n");
> rc = iic_writew(eng, IIC_BOE_RESET_I2C, 0, ffdc);
> if(rc)
> goto exit;
> @@ -1413,7 +1413,7 @@ int iic_boe_reset(iic_eng_t* eng, int type, iic_ffdc_t** ffdc)
> ffdc);
> if (rc)
> goto exit;
> - IFLDi(1, "clean port busy port_busy[%08lx]\n", port_busy);
> + dev_dbg(eng->dev, "clean port busy port_busy[%08lx]\n", port_busy);
> }
>
> /* Test for stuck lines */
> diff --git a/drivers/fsi/i2c/iic-fsi.c b/drivers/fsi/i2c/iic-fsi.c
> index 1f85e91232fd..5592a1441c54 100644
> --- a/drivers/fsi/i2c/iic-fsi.c
> +++ b/drivers/fsi/i2c/iic-fsi.c
> @@ -195,7 +195,7 @@ int iic_add_ports(iic_eng_t* eng, uint64_t ports)
>
> IENTER();
>
> - IFLDi(3, "Adding ports[0x%08x%08x] to eng[0x%08x]\n",
> + dev_dbg(eng->dev, "Adding ports[0x%08x%08x] to eng[0x%08x]\n",
> (uint32_t)(ports >> 32),
> (uint32_t)ports,
> eng->id);
> @@ -271,7 +271,7 @@ int iic_del_ports(iic_eng_t* eng, uint64_t ports)
>
> IENTER();
>
> - IFLDi(3, "removing ports[0x%08x%08x] from eng[0x%08x]",
> + dev_dbg(eng->dev, "removing ports[0x%08x%08x] from eng[0x%08x]",
> (uint32_t)(ports >> 32),
> (uint32_t)ports,
> eng->id);
> @@ -333,7 +333,7 @@ int iic_fsi_probe(struct device *dev)
> set_bit(IIC_ENG_BLOCK, &eng->flags); //block until resumed
> eng->id = 0x00F5112C;
> eng->idx = ida_simple_get(&iic_ida, 1, INT_MAX, GFP_KERNEL);
> - IFLDi(1, "PROBE eng[%08x]\n", eng->id);
> + dev_dbg(dev, "PROBE eng[%08x]\n", eng->id);
> eng->ra = &fsi_reg_access;
> IFLDd(1, "vaddr=%#08lx\n", eng->base);
> eng->dev = dev;
> @@ -414,7 +414,7 @@ int iic_fsi_remove(struct device* dev)
>
> iic_fsi_suspend(dev); //ignore rc
>
> - IFLDi(1, "REMOVE eng[%08x]\n", eng->id);
> + dev_dbg(dev, "REMOVE eng[%08x]\n", eng->id);
>
> /* Clean up device files immediately, don't wait for ref count */
> iic_del_ports(eng, IIC_FSI_PORTS);
> @@ -451,7 +451,7 @@ int iic_fsi_suspend(struct device *dev)
> goto error;
> }
>
> - IFLDi(2, "SUSPEND eng[%08x]\n", eng->id);
> + dev_dbg(dev,"SUSPEND eng[%08x]\n", eng->id);
>
> /* Prohibit new engine operations until resumed*/
> set_bit(IIC_ENG_BLOCK, &eng->flags);
> @@ -504,7 +504,7 @@ int iic_fsi_resume(struct device *dev)
> goto error;
> }
>
> - IFLDi(1, "RESUME eng[%08x]\n", eng->id);
> + dev_dbg(eng->dev, "RESUME eng[%08x]\n", eng->id);
>
> eng->bus_speed = 20833333;
> IFLDd(1, "eng->bus_speed=%ld\n", eng->bus_speed);
> diff --git a/drivers/fsi/i2c/iic-mstr.c b/drivers/fsi/i2c/iic-mstr.c
> index f968c2040dc3..a5881fb795f4 100644
> --- a/drivers/fsi/i2c/iic-mstr.c
> +++ b/drivers/fsi/i2c/iic-mstr.c
> @@ -2157,7 +2157,7 @@ iic_bus_t* iic_create_bus(struct class* classp, iic_eng_t* eng,
> goto exit_class_add;
> }
>
> - IFLDi(1, "bus[%08lx] created\n", bus->bus_id);
> + dev_dbg(bus->class_dev, "bus[%08lx] created\n", bus->bus_id);
> goto exit;
>
> device_destroy(classp, bus->devnum);
> @@ -2180,7 +2180,7 @@ void iic_delete_bus(struct class* classp, iic_bus_t* bus)
> {
> goto exit;
> }
> - IFLDi(1, "cleanup bus[%08lx]\n", bus->bus_id);
> + dev_dbg(bus->class_dev, "cleanup bus[%08lx]\n", bus->bus_id);
> device_destroy(classp, bus->devnum);
> cdev_del(&bus->cdev);
> kfree(bus);
> @@ -2195,7 +2195,6 @@ static int __init iic_init(void)
> int rc = 0;
>
> IENTER();
> - printk("IIC: base support loaded ver. %s\n", iic_mstr_version);
> IEXIT(rc);
> return rc;
> }
> @@ -2203,7 +2202,6 @@ static int __init iic_init(void)
> static void __exit iic_exit(void)
> {
> IENTER();
> - printk("IIC: base support unloaded.\n");
> IEXIT(0);
> }
Hi Joel,
Looks good - thanks
Acked-by: Christopher Bostic <cbostic at linux.vnet.ibm.com>
More information about the openbmc
mailing list