From: Greg KH <greg@kroah.com>
To: Cyril Bur <cyrilbur@gmail.com>
Cc: linux-kernel@vger.kernel.org, joel@jms.id.au,
benh@kernel.crashing.org, linux-next@vger.kernel.org
Subject: Re: [PATCH] drivers/misc: Aspeed LPC control fix compile error and warning
Date: Wed, 22 Mar 2017 07:09:10 +0100 [thread overview]
Message-ID: <20170322060910.GA19039@kroah.com> (raw)
In-Reply-To: <20170322031328.24043-1-cyrilbur@gmail.com>
On Wed, Mar 22, 2017 at 02:13:28PM +1100, Cyril Bur wrote:
> pgprot_dmachoerent() is not defined on every architecture. Having
> COMPILE_TEST set for the driver causes it to be compiled on
> architectures which do not have pgprot_dmachoerent():
> drivers/misc/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_mmap':
> drivers/misc/aspeed-lpc-ctrl.c:51:9: error: implicit declaration of
> function 'pgprot_dmacoherent' [-Werror=implicit-function-declaration]
> prot = pgprot_dmacoherent(prot);
>
> There are two possible solutions:
> 1. Remove COMPILE_TEST to ensure the driver is only compiled on ARM
> 2. Use pgprot_noncached() instead of pgprot_dmachoerent()
>
> The first option results in less compile testing of the LPC control
> driver which is undesirable.
> The second option uses a function that is declared on all architectures
> and therefore should always build. Currently there is no practical
> difference between pgprot_noncached() and pgprot_dmachoerent() for the
> aspeed chips that this driver is compatible with. The reason for
> pgprot_dmachoerent() was that there may be chips made at some point in
> the future that could include hardware that pgprot_dmachoerent() could
> optimise for. As none of this hardware has even been announced there
> isn't really a need for pgprot_dmachoerent().
>
> Using pgprot_noncached() is completely correct and optimal for all
> existing hardware on which the LPC control driver will run.
>
> This commit also addresses that phys_addr_t should be printed using %pap
> rather than %x:
Also in the future, only do one thing per-patch, this is two different
things at the same time. I'll take this for now, but please be more
careful going forward.
thanks,
greg k-h
prev parent reply other threads:[~2017-03-22 6:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 3:13 [PATCH] drivers/misc: Aspeed LPC control fix compile error and warning Cyril Bur
2017-03-22 6:06 ` Greg KH
2017-03-22 6:09 ` Greg KH [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=20170322060910.GA19039@kroah.com \
--to=greg@kroah.com \
--cc=benh@kernel.crashing.org \
--cc=cyrilbur@gmail.com \
--cc=joel@jms.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@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;
as well as URLs for NNTP newsgroup(s).