Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi!

> > > Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
> > 
> > > +static int swsusp_header_init(void)
> > > +{
> > > +	swsusp_header = (struct swsusp_header*) __get_free_page(GFP_KERNEL);
> > > +	if (!swsusp_header)
> > > +		panic("Could not allocate memory for swsusp_header\n");
> > > +	return 0;
> > > +}
> > > +
> > > +core_initcall(swsusp_header_init);
> > 
> > I do not like the panic, but I guess it is okay as we are running
> > during boot? (Could you add a comment?) Otherwise ok.
> > 
> 
> Hi Pavel,
> 
> Yes, it is an initcall and this memory page will be allocated during
> boot time. Not very sure what comment to put there. To me it seems
> pretty obivious with "core_initcall".

I'd put "/* running at boot time, so allocation can't fail */" there
(and maybe just replace panic with BUG_ON), but I guess that's not
important.

ACK.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
fastboot mailing list
fastboot@xxxxxxxxxxxxxx
https://lists.osdl.org/mailman/listinfo/fastboot


[Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Linux Media]     [Linux Resources]

Powered by Linux