[LinuxPPS] Re: A couple of linuxpps compile fixes.

Rodolfo Giometti giometti at linux.it
Sun Oct 22 21:05:17 CEST 2006


On Sat, Oct 21, 2006 at 08:32:32PM -0400, linux at horizon.com wrote:
> The first makes it compile with 2.6.19-rc2:
> 
> diff --git a/drivers/pps/clients/ktimer.c b/drivers/pps/clients/ktimer.c
> index cd0610c..3dbfdb7 100644
> --- a/drivers/pps/clients/ktimer.c
> +++ b/drivers/pps/clients/ktimer.c
> @@ -21,7 +21,6 @@
>  
>  
>  #include <linux/kernel.h>
> -#include <linux/config.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
>  #include <linux/time.h>
> diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c
> index a225ebf..1593dd3 100644
> --- a/drivers/pps/kapi.c
> +++ b/drivers/pps/kapi.c
> @@ -21,7 +21,6 @@
>  
>  
>  #include <linux/kernel.h>
> -#include <linux/config.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
>  #include <linux/time.h>
> diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
> index 2539044..5185389 100644
> --- a/drivers/pps/pps.c
> +++ b/drivers/pps/pps.c
> @@ -22,7 +22,6 @@
>  
>  #include <linux/kernel.h>
>  #include <linux/version.h>
> -#include <linux/config.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
>  #include <linux/skbuff.h>

Applied.

> And the second silences some warnings about casting between an integer and
> a pointer of a different size on a 64-bit platform.
> 
> diff --git a/drivers/pps/procfs.c b/drivers/pps/procfs.c
> index 1c2c780..bc34e62 100644
> --- a/drivers/pps/procfs.c
> +++ b/drivers/pps/procfs.c
> @@ -37,7 +37,7 @@ struct proc_dir_entry *procfs_root_dir;
>  static int linuxpps_procfs_assert_read(char *page, char **start, off_t off, int count, int *eof, void *data)
>  {
>  	int len = 0;
> -	int id = (int) data;
> +	int id = (int)(long) data;

Not agree. Too much casting... Which kind of warnings did you get? Can
you please report them?

> @@ -115,14 +115,14 @@ int linuxpps_procfs_create_source_entry(
>  		if (procfs_file == NULL)
>  			goto exit;
>  		procfs_file->read_proc = linuxpps_procfs_assert_read;
> -		procfs_file->data = (void *) id;
> +		procfs_file->data = (void *)(long) id;

Not agree. As above.

Thanks,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti at enneenne.com
Linux Device Driver                             giometti at gnudd.com
Embedded Systems                     		giometti at linux.it
UNIX programming                     phone:     +39 349 2432127



More information about the LinuxPPS mailing list