linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCHv2 11/29] uvc/lirc_serial: Fix some warnings on parisc arch
Date: Mon, 04 Nov 2013 15:22:26 +0100	[thread overview]
Message-ID: <2429755.EyGbY6tqJF@avalon> (raw)
In-Reply-To: <1383399097-11615-12-git-send-email-m.chehab@samsung.com>

Hi Mauro,

Thank you for the patch.

On Saturday 02 November 2013 11:31:19 Mauro Carvalho Chehab wrote:
> On this arch, usec is not unsigned long. So, we need to typecast,
> in order to remove those warnings:
> 
> 	drivers/media/usb/uvc/uvc_video.c: In function 'uvc_video_clock_update':
> 	drivers/media/usb/uvc/uvc_video.c:678:2: warning: format '%lu' expects
> argument of type 'long unsigned int', but argument 9 has type
> '__kernel_suseconds_t' [-Wformat] drivers/staging/media/lirc/lirc_serial.c:
> In function 'irq_handler': drivers/staging/media/lirc/lirc_serial.c:707:5:
> warning: format '%lx' expects argument of type 'long unsigned int', but
> argument 6 has type '__kernel_suseconds_t' [-Wformat]
> drivers/staging/media/lirc/lirc_serial.c:707:5: warning: format '%lx'
> expects argument of type 'long unsigned int', but argument 7 has type
> '__kernel_suseconds_t' [-Wformat]
> drivers/staging/media/lirc/lirc_serial.c:719:5: warning: format '%lx'
> expects argument of type 'long unsigned int', but argument 6 has type
> '__kernel_suseconds_t' [-Wformat]
> drivers/staging/media/lirc/lirc_serial.c:719:5: warning: format '%lx'
> expects argument of type 'long unsigned int', but argument 7 has type
> '__kernel_suseconds_t' [-Wformat]
> drivers/staging/media/lirc/lirc_serial.c:728:6: warning: format '%lx'
> expects argument of type 'long unsigned int', but argument 6 has type
> '__kernel_suseconds_t' [-Wformat]
> drivers/staging/media/lirc/lirc_serial.c:728:6: warning: format '%lx'
> expects argument of type 'long unsigned int', but argument 7 has type
> '__kernel_suseconds_t' [-Wformat]
> 
> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I don't like this much, but I guess we won't get parisc to switch 
__kernel_suseconds from int to unsigned long any time soon. So,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

By the way, what about defining a macro similar to the PRI* macros (from 
inttypes.h) for kernel types ? We could then get rid of the cast.

I expect you to apply the patch directly to your tree, please let me know if I 
should take it in mine instead.

> ---
>  drivers/media/usb/uvc/uvc_video.c        | 3 ++-
>  drivers/staging/media/lirc/lirc_serial.c | 9 ++++++---
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_video.c
> b/drivers/media/usb/uvc/uvc_video.c index 3394c3432011..899cb6d1c4a4 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -680,7 +680,8 @@ void uvc_video_clock_update(struct uvc_streaming
> *stream, stream->dev->name,
>  		  sof >> 16, div_u64(((u64)sof & 0xffff) * 1000000LLU, 65536),
>  		  y, ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC,
> -		  v4l2_buf->timestamp.tv_sec, v4l2_buf->timestamp.tv_usec,
> +		  v4l2_buf->timestamp.tv_sec,
> +		  (unsigned long)v4l2_buf->timestamp.tv_usec,
>  		  x1, first->host_sof, first->dev_sof,
>  		  x2, last->host_sof, last->dev_sof, y1, y2);
> 
> diff --git a/drivers/staging/media/lirc/lirc_serial.c
> b/drivers/staging/media/lirc/lirc_serial.c index af08e677b60f..7b3be2346b4b
> 100644
> --- a/drivers/staging/media/lirc/lirc_serial.c
> +++ b/drivers/staging/media/lirc/lirc_serial.c
> @@ -707,7 +707,8 @@ static irqreturn_t irq_handler(int i, void *blah)
>  				pr_warn("ignoring spike: %d %d %lx %lx %lx %lx\n",
>  					dcd, sense,
>  					tv.tv_sec, lasttv.tv_sec,
> -					tv.tv_usec, lasttv.tv_usec);
> +					(unsigned long)tv.tv_usec,
> +					(unsigned long)lasttv.tv_usec);
>  				continue;
>  			}
> 
> @@ -719,7 +720,8 @@ static irqreturn_t irq_handler(int i, void *blah)
>  				pr_warn("%d %d %lx %lx %lx %lx\n",
>  					dcd, sense,
>  					tv.tv_sec, lasttv.tv_sec,
> -					tv.tv_usec, lasttv.tv_usec);
> +					(unsigned long)tv.tv_usec,
> +					(unsigned long)lasttv.tv_usec);
>  				data = PULSE_MASK;
>  			} else if (deltv > 15) {
>  				data = PULSE_MASK; /* really long time */
> @@ -728,7 +730,8 @@ static irqreturn_t irq_handler(int i, void *blah)
>  					pr_warn("AIEEEE: %d %d %lx %lx %lx %lx\n",
>  						dcd, sense,
>  						tv.tv_sec, lasttv.tv_sec,
> -						tv.tv_usec, lasttv.tv_usec);
> +						(unsigned long)tv.tv_usec,
> +						(unsigned long)lasttv.tv_usec);
>  					/*
>  					 * detecting pulse while this
>  					 * MUST be a space!
-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-11-04 14:21 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-02 13:31 [PATCHv2 00/29] Fix errors/warnings with allmodconfig/allyesconfig on non-x86 archs Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 01/29] tda9887: remove an warning when compiling for alpha Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 02/29] radio-shark: remove a warning when CONFIG_PM is not defined Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 03/29] zoran: don't build it on alpha Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 04/29] cx18: struct i2c_client is too big for stack Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 05/29] tef6862: fix warning on avr32 arch Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 06/29] iguanair: shut up a gcc " Mauro Carvalho Chehab
2013-11-03 22:10   ` Sean Young
2013-11-03 22:13     ` [PATCH] [media] iguanair: simplify calculation of carrier delay cycles Sean Young
2013-11-02 13:31 ` [PATCHv2 07/29] platform drivers: Fix build on cris and frv archs Mauro Carvalho Chehab
2013-11-04  4:03   ` Ben Hutchings
2013-11-04 11:28     ` Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 08/29] cx18: disable compilation on frv arch Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 09/29] radio-si470x-i2c: fix a warning on ia64 Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 10/29] rc: Fir warnings on m68k arch Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 11/29] uvc/lirc_serial: Fix some warnings on parisc arch Mauro Carvalho Chehab
2013-11-04 14:22   ` Laurent Pinchart [this message]
2013-11-04 14:43     ` Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 12/29] s5h1420: Don't use dynamic static allocation Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 13/29] dvb-frontends: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 14/29] " Mauro Carvalho Chehab
2013-11-02 17:10   ` Antti Palosaari
2013-11-02 13:31 ` [PATCHv2 15/29] stb0899_drv: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 16/29] stv0367: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 17/29] stv090x: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 18/29] av7110_hw: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 19/29] tuners: " Mauro Carvalho Chehab
2013-11-02 17:12   ` Antti Palosaari
2013-11-02 17:25   ` Hans Verkuil
2013-11-02 21:15     ` Mauro Carvalho Chehab
2013-11-02 21:53       ` Hans Verkuil
2013-11-02 21:59         ` Hans Verkuil
2013-11-03  0:21           ` Mauro Carvalho Chehab
2013-11-03  9:12             ` Mauro Carvalho Chehab
2013-11-03 11:54               ` Antti Palosaari
2013-11-04 13:26               ` Hans Verkuil
2013-11-04 14:24                 ` Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 20/29] tuner-xc2028: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 21/29] cimax2: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 22/29] v4l2-async: " Mauro Carvalho Chehab
2013-11-04 13:15   ` Hans Verkuil
2013-11-05 11:36     ` Mauro Carvalho Chehab
2013-11-05 11:42       ` Sylwester Nawrocki
2013-11-05 12:03         ` Mauro Carvalho Chehab
2013-11-05 12:35           ` Hans Verkuil
2013-11-05 13:16             ` Mauro Carvalho Chehab
2013-11-05 14:18               ` Hans Verkuil
2013-11-02 13:31 ` [PATCHv2 23/29] cxusb: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 24/29] dibusb-common: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 25/29] dw2102: " Mauro Carvalho Chehab
2013-11-02 13:31 ` [PATCHv2 26/29] af9015: " Mauro Carvalho Chehab
2013-11-02 17:05   ` Antti Palosaari
2013-11-02 13:31 ` [PATCHv2 27/29] af9035: " Mauro Carvalho Chehab
2013-11-02 17:19   ` Antti Palosaari
2013-11-02 13:31 ` [PATCHv2 28/29] mxl111sf: " Mauro Carvalho Chehab
2013-11-04  0:50   ` Michael Krufky
2013-11-04 10:58     ` Mauro Carvalho Chehab
2013-11-04 11:04       ` Michael Krufky
2013-11-02 13:31 ` [PATCHv2 29/29] lirc_zilog: " Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2429755.EyGbY6tqJF@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).