Andrea Zuccherelli: > I found the typedef causing problem in > "/usr/src/linux/include/linux/seq_file.h". > So added a "no_const" typedef to our "a.c": ::: > zrouter constest # gcc > -fplugin=3D/usr/src/linux/tools/gcc/constify_plugin.so > -fplugin-arg-constify_plugin-no-constify a.c > a.c:19:16: error: 'no_const' attribute used on type that is not constified > > Got it! > Should be disabled but is still there listening attribute events..
I see. The -fplugin-arg-constify_plugin-no-constify switch doesn't seem to work. > Given the previous fact "br->br_hfsn_ops" is const for the compiler. > > The problem could lay in struct fsnotify_ops defined in > include/linux/fsnotify_backend.h. > Infact adding a __no_const attribute is a solution. > But I don't know if this is the correct solution... > Neither I know who should apply it. ::: > For me (has I didn't find any documentation for that plugin option) > "'no_const' attribute used..." is a bug as I think that option should > disable the plugin. Agreed. Also I understand when you disable CONSTIFY_PLUGIN, then the module version doesn't match. Now I'd suggest you to the dirty "indirect assignment" approach as before. //br->br_hfsn_ops = au_hfsn_ops; BUILD_BUG_ON(sizeof(br->br_hfsn_ops) != sizeof(au_hfsn_ops)); memcoy((void *)&br->br_hfsn_ops, (void *)&au_hfsn_ops, sizeof(au_hfsn_ops)); As long as the compiler and the linker don't put the object into the readonly section, it should work since the "br" is not readonly and the "constantify" here is "just to make programmers to think twice". J. R. Okajima ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox