netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Moskyto Matejka <mq@suse.cz>
To: Alexey Charkov <alchark@gmail.com>
Cc: Jan Moskyto Matejka <mq@suse.cz>, Roger Luethi <rl@hellgate.ch>,
	netdev <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: via-rhine: fix compiler warning
Date: Tue, 29 Apr 2014 21:47:41 +0200	[thread overview]
Message-ID: <20140429194741.GA30899@moskyto.dyndns.org> (raw)
In-Reply-To: <CABjd4Yxj12O7pi2kiqjO+YYU_D=Gdx98yNz6XE4tCX=sL2eYxg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

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@suse.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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-04-29 19:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29 17:36 [PATCH] net: via-rhine: fix compiler warning Jan Moskyto Matejka
2014-04-29 18:09 ` Alexey Charkov
2014-04-29 19:47   ` Jan Moskyto Matejka [this message]
2014-04-30  8:49 ` David Laight
2014-04-30  9:22   ` Alexey Charkov
2014-04-30  9:35     ` David Laight
2014-04-30 12:06       ` [PATCH] net: via-rhine: Fix compiler warning re: pointer casting on 64bit Alexey Charkov
2014-04-30 18:21         ` [PATCH] net: via-rhine: Drop revision property, use quirks instead Alexey Charkov
2014-05-02 19:56           ` David Miller
2014-05-03 12:40             ` [PATCH] net: via-rhine: Convert #ifdef USE_MMIO to a runtime flag Alexey Charkov
2014-05-05 19:37               ` David Miller
2014-05-01  9:30         ` [PATCH] net: via-rhine: Fix compiler warning re: pointer casting on 64bit David Laight
2014-05-01 11:33           ` Alexey Charkov
2014-04-30  9:50     ` [PATCH] net: via-rhine: fix compiler warning Jan Moskyto Matejka
2014-04-30  9:57       ` David Laight
2014-04-30 10:08         ` Jan Moskyto Matejka

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=20140429194741.GA30899@moskyto.dyndns.org \
    --to=mq@suse.cz \
    --cc=alchark@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rl@hellgate.ch \
    /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).