@@ -51,7 +51,7 @@ static void jffs2_erase_block(struct jffs2_sb_info *c,
5151 jeb -> offset , jeb -> offset , jeb -> offset + c -> sector_size );
5252 instr = kmalloc (sizeof (struct erase_info ) + sizeof (struct erase_priv_struct ), GFP_KERNEL );
5353 if (!instr ) {
54- printk ( KERN_WARNING "kmalloc for struct erase_info in jffs2_erase_block failed. Refiling block for later\n" );
54+ pr_warn ( "kmalloc for struct erase_info in jffs2_erase_block failed. Refiling block for later\n" );
5555 mutex_lock (& c -> erase_free_sem );
5656 spin_lock (& c -> erase_completion_lock );
5757 list_move (& jeb -> list , & c -> erase_pending_list );
@@ -99,9 +99,11 @@ static void jffs2_erase_block(struct jffs2_sb_info *c,
9999 }
100100
101101 if (ret == - EROFS )
102- printk (KERN_WARNING "Erase at 0x%08x failed immediately: -EROFS. Is the sector locked?\n" , jeb -> offset );
102+ pr_warn ("Erase at 0x%08x failed immediately: -EROFS. Is the sector locked?\n" ,
103+ jeb -> offset );
103104 else
104- printk (KERN_WARNING "Erase at 0x%08x failed immediately: errno %d\n" , jeb -> offset , ret );
105+ pr_warn ("Erase at 0x%08x failed immediately: errno %d\n" ,
106+ jeb -> offset , ret );
105107
106108 jffs2_erase_failed (c , jeb , bad_offset );
107109}
@@ -217,7 +219,7 @@ static void jffs2_erase_callback(struct erase_info *instr)
217219 struct erase_priv_struct * priv = (void * )instr -> priv ;
218220
219221 if (instr -> state != MTD_ERASE_DONE ) {
220- printk ( KERN_WARNING "Erase at 0x%08llx finished, but state != MTD_ERASE_DONE. State is 0x%x instead.\n" ,
222+ pr_warn ( "Erase at 0x%08llx finished, but state != MTD_ERASE_DONE. State is 0x%x instead.\n" ,
221223 (unsigned long long )instr -> addr , instr -> state );
222224 jffs2_erase_failed (priv -> c , priv -> jeb , instr -> fail_addr );
223225 } else {
@@ -284,15 +286,15 @@ static inline void jffs2_remove_node_refs_from_ino_list(struct jffs2_sb_info *c,
284286
285287 printk (KERN_DEBUG );
286288 while (this ) {
287- printk ( KERN_CONT "0x%08x(%d)->" ,
289+ pr_cont ( "0x%08x(%d)->" ,
288290 ref_offset (this ), ref_flags (this ));
289291 if (++ i == 5 ) {
290292 printk (KERN_DEBUG );
291293 i = 0 ;
292294 }
293295 this = this -> next_in_ino ;
294296 }
295- printk ( KERN_CONT "\n" );
297+ pr_cont ( "\n" );
296298 });
297299
298300 switch (ic -> class ) {
@@ -364,16 +366,19 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
364366 } while (-- retlen );
365367 mtd_unpoint (c -> mtd , jeb -> offset , c -> sector_size );
366368 if (retlen ) {
367- printk (KERN_WARNING "Newly-erased block contained word 0x%lx at offset 0x%08tx\n" ,
368- * wordebuf , jeb -> offset + c -> sector_size - retlen * sizeof (* wordebuf ));
369+ pr_warn ("Newly-erased block contained word 0x%lx at offset 0x%08tx\n" ,
370+ * wordebuf ,
371+ jeb -> offset +
372+ c -> sector_size - retlen * sizeof (* wordebuf ));
369373 return - EIO ;
370374 }
371375 return 0 ;
372376 }
373377 do_flash_read :
374378 ebuf = kmalloc (PAGE_SIZE , GFP_KERNEL );
375379 if (!ebuf ) {
376- printk (KERN_WARNING "Failed to allocate page buffer for verifying erase at 0x%08x. Refiling\n" , jeb -> offset );
380+ pr_warn ("Failed to allocate page buffer for verifying erase at 0x%08x. Refiling\n" ,
381+ jeb -> offset );
377382 return - EAGAIN ;
378383 }
379384
@@ -387,12 +392,14 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
387392
388393 ret = mtd_read (c -> mtd , ofs , readlen , & retlen , ebuf );
389394 if (ret ) {
390- printk (KERN_WARNING "Read of newly-erased block at 0x%08x failed: %d. Putting on bad_list\n" , ofs , ret );
395+ pr_warn ("Read of newly-erased block at 0x%08x failed: %d. Putting on bad_list\n" ,
396+ ofs , ret );
391397 ret = - EIO ;
392398 goto fail ;
393399 }
394400 if (retlen != readlen ) {
395- printk (KERN_WARNING "Short read from newly-erased block at 0x%08x. Wanted %d, got %zd\n" , ofs , readlen , retlen );
401+ pr_warn ("Short read from newly-erased block at 0x%08x. Wanted %d, got %zd\n" ,
402+ ofs , readlen , retlen );
396403 ret = - EIO ;
397404 goto fail ;
398405 }
@@ -401,7 +408,8 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
401408 unsigned long * datum = ebuf + i ;
402409 if (* datum + 1 ) {
403410 * bad_offset += i ;
404- printk (KERN_WARNING "Newly-erased block contained word 0x%lx at offset 0x%08x\n" , * datum , * bad_offset );
411+ pr_warn ("Newly-erased block contained word 0x%lx at offset 0x%08x\n" ,
412+ * datum , * bad_offset );
405413 ret = - EIO ;
406414 goto fail ;
407415 }
@@ -456,10 +464,10 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
456464
457465 if (ret || retlen != sizeof (marker )) {
458466 if (ret )
459- printk ( KERN_WARNING "Write clean marker to block at 0x%08x failed: %d\n" ,
467+ pr_warn ( "Write clean marker to block at 0x%08x failed: %d\n" ,
460468 jeb -> offset , ret );
461469 else
462- printk ( KERN_WARNING "Short write to newly-erased block at 0x%08x: Wanted %zd, got %zd\n" ,
470+ pr_warn ( "Short write to newly-erased block at 0x%08x: Wanted %zd, got %zd\n" ,
463471 jeb -> offset , sizeof (marker ), retlen );
464472
465473 goto filebad ;
0 commit comments