Re: [PATCH 04/14] tuner-xs2028.c: fix sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 4, 2013 at 10:01 AM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> From: Hans Verkuil <hans.verkuil@xxxxxxxxx>
>
> drivers/media/tuners/tuner-xc2028.c:575:24: warning: cast to restricted __le16
> drivers/media/tuners/tuner-xc2028.c:686:21: warning: cast to restricted __le16
>
> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> Cc: Mauro Carvalho Chehab <m.chehab@xxxxxxxxxxx>
> ---
>  drivers/media/tuners/tuner-xc2028.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/tuners/tuner-xc2028.c b/drivers/media/tuners/tuner-xc2028.c
> index 878d2c4..e287a74 100644
> --- a/drivers/media/tuners/tuner-xc2028.c
> +++ b/drivers/media/tuners/tuner-xc2028.c
> @@ -572,7 +572,7 @@ static int load_firmware(struct dvb_frontend *fe, unsigned int type,
>                         return -EINVAL;
>                 }
>
> -               size = le16_to_cpu(*(__u16 *) p);
> +               size = le16_to_cpu(*(__le16 *) p);
>                 p += sizeof(size);
>
>                 if (size == 0xffff)
> @@ -683,7 +683,7 @@ static int load_scode(struct dvb_frontend *fe, unsigned int type,
>                 /* 16 SCODE entries per file; each SCODE entry is 12 bytes and
>                  * has a 2-byte size header in the firmware format. */
>                 if (priv->firm[pos].size != 14 * 16 || scode >= 16 ||
> -                   le16_to_cpu(*(__u16 *)(p + 14 * scode)) != 12)
> +                   le16_to_cpu(*(__le16 *)(p + 14 * scode)) != 12)
>                         return -EINVAL;
>                 p += 14 * scode + 2;
>         }
> --
> 1.8.3.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reviewed-by: Michael Krufky <mkrufky@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux