block: use printk_once
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Tim Waugh <tim@cyberelk.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
212a502676
commit
49b3a3cbc0
|
@ -219,8 +219,6 @@ static int pcd_sector; /* address of next requested sector */
|
||||||
static int pcd_count; /* number of blocks still to do */
|
static int pcd_count; /* number of blocks still to do */
|
||||||
static char *pcd_buf; /* buffer for request in progress */
|
static char *pcd_buf; /* buffer for request in progress */
|
||||||
|
|
||||||
static int pcd_warned; /* Have we logged a phase warning ? */
|
|
||||||
|
|
||||||
/* kernel glue structures */
|
/* kernel glue structures */
|
||||||
|
|
||||||
static int pcd_block_open(struct block_device *bdev, fmode_t mode)
|
static int pcd_block_open(struct block_device *bdev, fmode_t mode)
|
||||||
|
@ -417,12 +415,10 @@ static int pcd_completion(struct pcd_unit *cd, char *buf, char *fun)
|
||||||
printk
|
printk
|
||||||
("%s: %s: Unexpected phase %d, d=%d, k=%d\n",
|
("%s: %s: Unexpected phase %d, d=%d, k=%d\n",
|
||||||
cd->name, fun, p, d, k);
|
cd->name, fun, p, d, k);
|
||||||
if ((verbose < 2) && !pcd_warned) {
|
if (verbose < 2)
|
||||||
pcd_warned = 1;
|
printk_once(
|
||||||
printk
|
"%s: WARNING: ATAPI phase errors\n",
|
||||||
("%s: WARNING: ATAPI phase errors\n",
|
cd->name);
|
||||||
cd->name);
|
|
||||||
}
|
|
||||||
mdelay(1);
|
mdelay(1);
|
||||||
}
|
}
|
||||||
if (k++ > PCD_TMO) {
|
if (k++ > PCD_TMO) {
|
||||||
|
|
|
@ -1564,15 +1564,13 @@ static int carm_init_shm(struct carm_host *host)
|
||||||
|
|
||||||
static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
{
|
{
|
||||||
static unsigned int printed_version;
|
|
||||||
struct carm_host *host;
|
struct carm_host *host;
|
||||||
unsigned int pci_dac;
|
unsigned int pci_dac;
|
||||||
int rc;
|
int rc;
|
||||||
struct request_queue *q;
|
struct request_queue *q;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (!printed_version++)
|
printk_once(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
|
||||||
printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
|
|
||||||
|
|
||||||
rc = pci_enable_device(pdev);
|
rc = pci_enable_device(pdev);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
|
|
@ -416,15 +416,9 @@ static int probe_disk(struct viodasd_device *d)
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
if (we.max_disk > (MAX_DISKNO - 1)) {
|
if (we.max_disk > (MAX_DISKNO - 1)) {
|
||||||
static int warned;
|
printk_once(VIOD_KERN_INFO
|
||||||
|
"Only examining the first %d of %d disks connected\n",
|
||||||
if (warned == 0) {
|
MAX_DISKNO, we.max_disk + 1);
|
||||||
warned++;
|
|
||||||
printk(VIOD_KERN_INFO
|
|
||||||
"Only examining the first %d "
|
|
||||||
"of %d disks connected\n",
|
|
||||||
MAX_DISKNO, we.max_disk + 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send the close event to OS/400. We DON'T expect a response */
|
/* Send the close event to OS/400. We DON'T expect a response */
|
||||||
|
|
Loading…
Reference in New Issue