[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140429194741.GA30899@moskyto.dyndns.org>
Date: Tue, 29 Apr 2014 21:47:41 +0200
From: Jan Moskyto Matejka <mq@...e.cz>
To: Alexey Charkov <alchark@...il.com>
Cc: Jan Moskyto Matejka <mq@...e.cz>, Roger Luethi <rl@...lgate.ch>,
netdev <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: via-rhine: fix compiler warning
On Tue, Apr 29, 2014 at 10:09:01PM +0400, Alexey Charkov wrote:
> 2014-04-29 21:36 GMT+04:00 Jan Moskyto Matejka <mq@...e.cz>:
> > Fixed different size cast warning:
> >
> > drivers/net/ethernet/via/via-rhine.c: In function ‘rhine_init_one_platform’:
> > drivers/net/ethernet/via/via-rhine.c:1132:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> > revision = (u32)match->data;
> > ^
>
> Looks like the same would apply to e.g. drivers/clk/samsung/clk.c and
> maybe some others... Also, a number of drivers cast OF data from (void
> *) to (int) or (unsigned int) - isn't this also problematic on 64bit?
Some of them are, some not, sometimes nobody knows. If it were up to me,
I would personally put a single comment "this throws a compilation
warning because this and that" at every place where the warning is
thrown and is to be ignored.
So I do fix almost every warning of this kind I come across. Better to
have that fixed than to believe that the warning is harmless (as this
probably really was).
I'm just running a script that checks the tree for new build warnings
and then analysing the script's output ... and sometimes it's worth
fixing, sometimes not.
Moskyto
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists