Regards
On 7/9/06, Bernd Petrovitsch <bernd@xxxxxxxxx
> wrote:
On Thu, 2006-07-06 at 17:01 +0200, Fernando Apesteguía wrote:
[...]
> ((struct proc_dir_entry *) (*entry))->read_proc =
^^^^^^^^^^^^^^^^^^^^^^^^
> (read_proc_t *) read_func;
^^^^^^^^^^^^^^^
> ((struct proc_dir_entry *) (*entry))->owner = THIS_MODULE;
^^^^^^^^^^^^^^^^^^^^^^^^^
> ((struct proc_dir_entry *) (*entry))->data =""> ^^^^^^^^^^^^^^^^^^^^^^^^^
> kmalloc(sizeof (int), GFP_KERNEL);
> ((struct proc_dir_entry *) (*entry))->data = "" *) constant;
^^^^^^^^^^^^^^^^^^^^^^^^
Kill the underlined casts - either
*) you really need them, then the assignments are wrong anyway, or
*) you don't need them, then there is no reason to put them in.
As long as they are in, they are possibly hiding real bugs detected at
compile time since the casts disable type checking ....
Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services