IRC logs for #openrisc Sunday, 2013-03-31

--- Log opened Sun Mar 31 00:00:54 2013
stekernnow I am05:09
andresjkgood07:32
andresjkI tried to compile  the module code of a lkmpg> http://tldp.org/LDP/lkmpg/2.6/html/x569.html#AEN687 and I get http://pastebin.com/SM1naBTY07:34
andresjkI don't know which statements or32-linux cannot compile07:35
andresjkbut I just got a working char driver with this (http://appusajeev.files.wordpress.com/2011/06/code.gif) code07:36
andresjkanyway, I want to avoid the things that make the or32-linux-gcc break when compiling modules07:38
stekernunregister_chrdev doesn't return anything anymore, so it's not or32-linux-gcc that breaks, it's the example that is old07:41
jeremybennettandresjk: I would guess the compiler is correct (if strict). Use the GCC flag to turn off warnings about void values not being ignored or fix the code.07:41
jeremybennettThis is a common problem with modern GCC. It has become *much* more strict about following the C/C++ standards.07:41
jeremybennettSloppy code that passed in older versions of GCC will trigger warnings and errors now.07:41
stekerni.e. it's now 'void unregister_chrdev'07:42
andresjkif the warnings are ignored does the code will still be stable?07:44
andresjkI don't know where to learn about modules and devices drivers. The books I'm reading were Linux Kernel Module Programming Guide and Linux Device Drivers ver 307:45
andresjkbut they are based on kernel version 2.607:45
jeremybennettandresjk: For the Linux Device Drivers book, I presume you mean http://lwn.net/Kernel/LDD3/. This is the definitive work, and is based on Linux 2.6.10.08:03
jeremybennettStuff has moved on since 2005, but the core ideas are mostly the sames AFAIK. I'm not really a kernel/driver expert.08:05
jeremybennettThe concepts all remain valid. It's about as up to date as you get in a dead tree. Looking at the O'Reilly website there doesn't seem to be evidence of a 4th edition.08:06
stekernandresjk: if you change the cleanup_module to this it will compile: http://pastie.org/719047008:10
andresjkjeremybennett, Yes, I meant that book, Im still reading it as the main guide because the topics are very well cover, but I complement it with examples I find in the internet so I could learn from doing.Still there is plenty tutorials in the internet but most of them are not so recent and spotting those changes its really a pain when learning.08:17
andresjkmy final goal is to do a DMA driver but Im still  learning the basics08:17
andresjkstekern, yes I did that when you spot it out. Thank you. Actually it will never crossed my mind though08:19
andresjkpart of my thesis is to document the sw/hw design flow in OR08:22
andresjkjeremybennett, the -w flag goes after the "make  -C", right?08:24
andresjkbtw, thank you very much guys08:25
jeremybennettandresjk: If you want to change the C flags, I think you'll need something like 'make CLFAGS+="-w..." ...'08:39
jeremybennettMore likely you'll have a configure option to change things.08:39
andresjkjeremybennett, what the order of the GCC parameters? My Makefile doesn't have a flag option. http://pastie.org/719067108:59
jeremybennettYou can put them in any order, but if they clash the last one will take precedence. In particular if you use the approach I suggested, your CFLAGS will be overridden by the -w in the makefile (since it is added by += after any existing CFLAGS).09:03
jeremybennettWhat is slightly confusing me is that -w is there anyway, which disables warning messages. Looking at your earlier post, I see it is actually an error, not a warning.09:04
jeremybennettSo you can't disable it. An error means if you ignore it things will break.09:04
jeremybennettI don't have your source code, so I can't see what is happening on line 72 of chardev.c to advise on how to fix it.09:05
jeremybennettAlthough from stekern's earlier comments it sounds like you should be using a different function.09:06
andresjkyes, the new function doesn't return any value thats why the compiler was complaining. The example was old. I never thought of that.09:07
andresjkWell I guess its better to use the right programming techniques and the newest functions to avoid any error/warring and comply the *strict* rules of the modern compilers09:10
andresjkas you said before09:10
andresjkthanks a lot09:15
andresjkbrb09:15
jeremybennettyw09:26
mor1kx[mor1kx] skristiansson pushed 2 new commits to master: https://github.com/openrisc/mor1kx/compare/0cb2ef89dcb1...31b298e235e813:38
mor1kxmor1kx/master 2b755b9 Stefan Kristiansson: cappuccino/fetch: avoid ic request when waiting for ibus exception...13:38
mor1kxmor1kx/master 31b298e Stefan Kristiansson: icache, dcache: allow accesses during refill...13:38
stekernI'm actually pretty proud over how that "allow accesses during refill" turned out, *much* better than the old refill ack approach13:42
hjyhttp://opencores.org/or1k/Ubuntu_VirtualBox_image_updates16:31
hjyThis virtual image when it will update?16:31
--- Log closed Mon Apr 01 00:00:55 2013

Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!