mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Guan Xuetao" <gxt@mprc.pku.edu.cn>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: <linux-kernel@vger.kernel.org>, <linux-arch@vger.kernel.org>
Subject: Warning with asm-generic/div64.h
Date: Fri, 25 Mar 2011 18:19:15 +0800	[thread overview]
Message-ID: <007801cbead6$1984b6e0$4c8e24a0$@mprc.pku.edu.cn> (raw)

Hi, Arnd:

Following warning is generated when using <asm-generic/div64.h>

kernel/power/hibernate.c: In function 'swsusp_show_speed':
kernel/power/hibernate.c:227: warning: comparison of distinct pointer types lacks a cast

After expanding the do_div() macro, the problem line is:

	(void)(((typeof((n)) *)0) == ((uint64_t *)0));

while the type of n is s64.

I am puzzled with the usage of the problem line.

And how to correct it?

Guan Xuetao


             reply	other threads:[~2011-03-25 10:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 10:19 Guan Xuetao [this message]
2011-03-25 13:39 ` Arnd Bergmann
2011-03-29 11:41   ` Guan Xuetao
2011-03-29 11:58     ` Arnd Bergmann

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='007801cbead6$1984b6e0$4c8e24a0$@mprc.pku.edu.cn' \
    --to=gxt@mprc.pku.edu.cn \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®