linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] video: remove pointless comments in drivers/video/console/vgacon.c
@ 2011-01-19  6:00 Amerigo Wang
  2011-01-19  6:02 ` Paul Mundt
  0 siblings, 1 reply; 3+ messages in thread
From: Amerigo Wang @ 2011-01-19  6:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: WANG Cong, Arnd Bergmann, Andrew Morton, Greg Kroah-Hartman,
	Yannick Heneault, Matthew Garrett, open list:FRAMEBUFFER LAYER

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

Signed-off-by: WANG Cong <amwang@redhat.com>

---
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index c97491b..b030aca 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] video: remove pointless comments in drivers/video/console/vgacon.c
  2011-01-19  6:00 [Patch] video: remove pointless comments in drivers/video/console/vgacon.c Amerigo Wang
@ 2011-01-19  6:02 ` Paul Mundt
       [not found]   ` <4D367FD6.1010006@redhat.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Mundt @ 2011-01-19  6:02 UTC (permalink / raw)
  To: Amerigo Wang
  Cc: linux-kernel, Arnd Bergmann, Andrew Morton, Greg Kroah-Hartman,
	Yannick Heneault, Matthew Garrett, open list:FRAMEBUFFER LAYER

On Wed, Jan 19, 2011 at 02:00:02PM +0800, Amerigo Wang wrote:
> Now vgacon_scrollback_startup() uses slab, not bootmem,
> so that comment is obsolete, the rest are useless.
> 
> Signed-off-by: WANG Cong <amwang@redhat.com>
> 
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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch] video: remove pointless comments in drivers/video/console/vgacon.c
       [not found]     ` <20110119061551.GB12205@linux-sh.org>
@ 2011-01-19  6:19       ` Cong Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Cong Wang @ 2011-01-19  6:19 UTC (permalink / raw)
  To: Paul Mundt
  Cc: linux-kernel, Arnd Bergmann, Andrew Morton, Greg Kroah-Hartman,
	Yannick Heneault, Matthew Garrett, open,
	"list@linux-sh.org"@zmta03.collab.prod.int.phx2.redhat.com:FRAMEBUFFER LAYER

于 2011年01月19日 14:15, Paul Mundt 写道:
> On Wed, Jan 19, 2011 at 02:08:22PM +0800, Cong Wang wrote:
>> ??? 2011???01???19??? 14:02, Paul Mundt ??????:
>>> On Wed, Jan 19, 2011 at 02:00:02PM +0800, Amerigo Wang wrote:
>>>> Now vgacon_scrollback_startup() uses slab, not bootmem,
>>>> so that comment is obsolete, the rest are useless.
>>>>
>>>> Signed-off-by: WANG Cong<amwang@redhat.com>
>>>>
>>> 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?
>
> __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!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-19  6:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19  6:00 [Patch] video: remove pointless comments in drivers/video/console/vgacon.c Amerigo Wang
2011-01-19  6:02 ` Paul Mundt
     [not found]   ` <4D367FD6.1010006@redhat.com>
     [not found]     ` <20110119061551.GB12205@linux-sh.org>
2011-01-19  6:19       ` Cong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).