From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/1] x86:Remove unnecessary (void *) pointer casts
Date: Wed, 24 Oct 2012 11:59:19 +0000 [thread overview]
Message-ID: <20121024115919.GD20120@mwanda> (raw)
In-Reply-To: <1351070670-27488-1-git-send-email-firogm@gmail.com>
On Wed, Oct 24, 2012 at 05:24:30PM +0800, Firo Yang wrote:
> @@ -379,7 +379,7 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
> pud_t *pud;
> pmd_t *pmd;
>
> - pgd = (pgd_t *)page_address(page) + pgd_index(address);
> + pgd = page_address(page) + pgd_index(address);
This cast is actually needed. It changes how the math works.
Really it's not a good idea to start with things under arch/ or mm/.
That code is already written to a much higher standard so things
which look like mistake are maybe done for some subtle reason.
We all make mistakes, but it's better to test things if you are able
to and perhaps this could have been avoided. (I don't know).
regards,
dan carpenter
prev parent reply other threads:[~2012-10-24 11:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 9:24 [PATCH 1/1] x86:Remove unnecessary (void *) pointer casts Firo Yang
2012-10-24 11:59 ` Dan Carpenter [this message]
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=20121024115919.GD20120@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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