Re: [PATCH] sparc64: fix of section mismatch warnings

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

 



From: Sam Ravnborg <sam@xxxxxxxxxxxx>
Date: Tue, 22 Jan 2008 06:14:01 +0100

> In eg. psycho_pbm_init() we have:
> 	pbm->scan_bus = psycho_scan_bus;
> 
> I found only one usage of pbm->scan_bus:
> static void __init pci_scan_each_controller_bus(void)
> {
> 	struct pci_pbm_info *pbm;
> 
> 	for (pbm = pci_pbm_root; pbm; pbm = pbm->next)
> 		pbm->scan_bus(pbm);
> }
> 
> This function is marked __init so it looks OK from this suage to
> annotate the functions __init.

Ok, we've established that you and I know it's fine.  Great :-)

I was more concerned with the larger question that contexts like this,
assignment of __init function pointers to dynamic data structure
members, is not checked.

The checker has no way to make sure that pbm->scan_bus() is only
made in __init contexts, even though we can plainly see that is
the case here.

What would be really clever would be a way to mark datastructure
members as "this is a pointer to an __init function".
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux