Skip to contentSkip to conversation

video: remove pointless comments in drivers/video/console/vgacon.c

PATCH Superseded Amerigo Wang 2 participants 3 messages Jan 19, 2011 2 messages not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: remove pointless comments in drivers/video/console/vgacon.c

Now vgacon_scrollback_startup() uses slab, not bootmem, so that comment is obsolete, the rest are useless.

---

drivers/video/console/vgacon.c +0 -4
index c97491b..b030aca 100644
@@ -202,10 +202,6 @@ static void vgacon_scrollback_init(int pitch)
 	}
 }
 
-/*
- * Called only duing init so call of alloc_bootmen is ok.
- * Marked __init_refok to silence modpost.
- */
 static void __init_refok vgacon_scrollback_startup(void)
 {
 	vgacon_scrollback = kcalloc(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT);
#1 lore raw
Quoted 5 lines · Amerigo Wang

Now vgacon_scrollback_startup() uses slab, not bootmem, so that comment is obsolete, the rest are useless.

If you're going to do this then at least follow through and do the rest of it. The comment is no longer applicable, but then neither is the __init_refok annotation. Killing off the comment explaining why something is (or was there) without killing off the thing that is referenced by the comment is not terribly productive.

author
#4 lore raw
In reply to a message not in the archive
Quoted 17 lines · Paul Mundt
Quoted 7 lines · Cong Wang

??? 2011???01???19??? 14:02, Paul Mundt ??????:

Quoted 6 lines · Amerigo Wang
Quoted 5 lines

Now vgacon_scrollback_startup() uses slab, not bootmem, so that comment is obsolete, the rest are useless.

Quoted 8 lines
Quoted 5 lines

If you're going to do this then at least follow through and do the rest of it. The comment is no longer applicable, but then neither is the __init_refok annotation. Killing off the comment explaining why something is (or was there) without killing off the thing that is referenced by the comment is not terribly productive.

Isn't __init_refok already a clear sign of "silence modpost"? Why need to comment it again?

Quoted 8 lines

__init_refok was to silence what was presumably an alloc_bootmem() reference at the time that the slab allocations were not early enough to satisfy the allocation, necessitating the use of bootmem. Since kmalloc and friends became usable early enough and the bootmem allocation has subsequently been dropped, there's no longer any need for the annotation.

ie, alloc_bootmem() itself is __init while vgacon_scrollback_startup() is not, hence the modpost complaint.

Ah, I see, will remove '__init_refok' as well.

Thanks!