Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: kbuild test robot <fengguang.wu@intel.com>,
	Brian Norris <computersforpeace@gmail.com>
Cc: kbuild-all@01.org, ath10k@lists.infradead.org,
	Kalle Valo <kvalo@adurom.com>,
	linux-mtd@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [ath6kl:pending 14/24] drivers/mtd/devices/bcm47xxsflash.c:299:2: error: implicit declaration of function 'ioremap_cache'
Date: Tue, 19 Jul 2016 07:56:06 +0200	[thread overview]
Message-ID: <b1bcfe6c-6875-b01b-7d10-ea8d1e00adfc@gmail.com> (raw)
In-Reply-To: <201607190916.c8xDOxpA%fengguang.wu@intel.com>

Resending reply with proper To/Cc.

On 07/19/2016 03:14 AM, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
> head:   7a1b79bd39dda1f12b9f6708583250f40354c981
> commit: 57d8f7dd2132df3ac21044e93a8ecdc9744b4459 [14/24] bcma: allow enabling serial flash support on non-MIPS SoCs
> config: cris-allmodconfig (attached as .config)
> compiler: cris-linux-gcc (GCC) 4.6.3
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 57d8f7dd2132df3ac21044e93a8ecdc9744b4459
>         # save the attached .config to linux build tree
>         make.cross ARCH=cris
>
> All error/warnings (new ones prefixed by >>):
>
>    drivers/mtd/devices/bcm47xxsflash.c: In function 'bcm47xxsflash_bcma_probe':
>>> drivers/mtd/devices/bcm47xxsflash.c:299:2: error: implicit declaration of function 'ioremap_cache' [-Werror=implicit-function-declaration]
>>> drivers/mtd/devices/bcm47xxsflash.c:299:15: warning: assignment makes pointer from integer without a cast [enabled by default]
>    cc1: some warnings being treated as errors

Oh, great :( With commit:
5651d6aaf489 ("mtd: bcm47xxsflash: use ioremap_cache() instead of KSEG0ADDR()")
we believed to make this driver compilable on all architectures. It seems that
ioremap_cache is available only on arm, arm64, ia64, mips, sh, x86 and xtensa.

I noticed that kernel/memremap.c implements ioremap_cache on its own for archs
that don't provide it. There is a comment in this file:
/* temporary while we convert existing ioremap_cache users to memremap */

Should we use memremap? I don't understand this function well, it seems I could
call it with with MEMREMAP_WB flag (and trigger ioremap_cache call), but is it a
correct thing to do?

Or should we simply make some symbol (CONFIG_MTD_BCM47XXSFLASH?) depend on
ARM || MIPS?


> vim +/ioremap_cache +299 drivers/mtd/devices/bcm47xxsflash.c
>
> 5fe42d5bf Rafał Miłecki 2012-09-17  283
> 5651d6aaf Brian Norris  2016-02-26  284  	b47s = devm_kzalloc(dev, sizeof(*b47s), GFP_KERNEL);
> d2b1bd142 Libo Chen     2013-05-30  285  	if (!b47s)
> d2b1bd142 Libo Chen     2013-05-30  286  		return -ENOMEM;
> a2f74a7da Rafał Miłecki 2013-01-06  287  	sflash->priv = b47s;
> a2f74a7da Rafał Miłecki 2013-01-06  288
> 5651d6aaf Brian Norris  2016-02-26  289  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> 5651d6aaf Brian Norris  2016-02-26  290  	if (!res) {
> 5651d6aaf Brian Norris  2016-02-26  291  		dev_err(dev, "invalid resource\n");
> 5651d6aaf Brian Norris  2016-02-26  292  		return -EINVAL;
> 5651d6aaf Brian Norris  2016-02-26  293  	}
> 5651d6aaf Brian Norris  2016-02-26  294  	if (!devm_request_mem_region(dev, res->start, resource_size(res),
> 5651d6aaf Brian Norris  2016-02-26  295  				     res->name)) {
> 5651d6aaf Brian Norris  2016-02-26  296  		dev_err(dev, "can't request region for resource %pR\n", res);
> 5651d6aaf Brian Norris  2016-02-26  297  		return -EBUSY;
> 5651d6aaf Brian Norris  2016-02-26  298  	}
> 5651d6aaf Brian Norris  2016-02-26 @299  	b47s->window = ioremap_cache(res->start, resource_size(res));
> 5651d6aaf Brian Norris  2016-02-26  300  	if (!b47s->window) {
> 5651d6aaf Brian Norris  2016-02-26  301  		dev_err(dev, "ioremap failed for resource %pR\n", res);
> 5651d6aaf Brian Norris  2016-02-26  302  		return -ENOMEM;
> 5651d6aaf Brian Norris  2016-02-26  303  	}
> 5651d6aaf Brian Norris  2016-02-26  304
> 41c81536e Rafał Miłecki 2013-03-06  305  	b47s->bcma_cc = container_of(sflash, struct bcma_drv_cc, sflash);
> 265dfbd9a Rafał Miłecki 2013-03-24  306  	b47s->cc_read = bcm47xxsflash_bcma_cc_read;
> 265dfbd9a Rafał Miłecki 2013-03-24  307  	b47s->cc_write = bcm47xxsflash_bcma_cc_write;
>
> :::::: The code at line 299 was first introduced by commit
> :::::: 5651d6aaf489d1db48c253cf884b40214e91c2c5 mtd: bcm47xxsflash: use ioremap_cache() instead of KSEG0ADDR()
>
> :::::: TO: Brian Norris <computersforpeace@gmail.com>
> :::::: CC: Brian Norris <computersforpeace@gmail.com>
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
>

           reply	other threads:[~2016-07-19  5:56 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <201607190916.c8xDOxpA%fengguang.wu@intel.com>]

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=b1bcfe6c-6875-b01b-7d10-ea8d1e00adfc@gmail.com \
    --to=zajec5@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=computersforpeace@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=kvalo@adurom.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-wireless@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