From: Frans Pop Date: Tue, 23 Jun 2009 23:02:58 +0000 (-0700) Subject: ide-cd: Improve "weird block size" error message X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d9ae62433e46909fc9e7d97ce74202c2851667b8;p=openwrt%2Fstaging%2Fblogic.git ide-cd: Improve "weird block size" error message Currently the error gets repeated too frequently, for example each time HAL polls the device when a disc is present. Avoid that by using printk_once instead of printk. Also join the error and corrective action messages into a single line. Signed-off-by: Frans Pop Acked-by: Borislav Petkov Signed-off-by: David S. Miller --- diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index a9a1bfb14e7c..f0ede5953af8 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -889,10 +889,9 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, case 4096: break; default: - printk(KERN_ERR PFX "%s: weird block size %u\n", + printk_once(KERN_ERR PFX "%s: weird block size %u; " + "setting default block size to 2048\n", drive->name, blocklen); - printk(KERN_ERR PFX "%s: default to 2kb block size\n", - drive->name); blocklen = 2048; break; }