mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
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 <elendil@planet.nl> Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
af054ed001
commit
d9ae62433e
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue