mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Piotr Sroka <piotrs@cadence.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Miquel Raynal <miquel.raynal@bootlin.com>
Subject: drivers/mtd/nand/raw/cadence-nand-controller.c:1283:12: warning: cast to pointer from integer of different size
Date: Fri, 29 Nov 2019 13:24:12 +0800	[thread overview]
Message-ID: <201911291311.GdZNuw5k%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   81b6b96475ac7a4ebfceae9f16fb3758327adbfe
commit: ec4ba01e894d3165e4d1ccbef782ef5593b708b4 mtd: rawnand: Add new Cadence NAND driver to MTD subsystem
date:   8 weeks ago
config: i386-randconfig-f002-20191129 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
        git checkout ec4ba01e894d3165e4d1ccbef782ef5593b708b4
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/mtd/nand/raw/cadence-nand-controller.c: In function 'cadence_nand_cdma_transfer':
>> drivers/mtd/nand/raw/cadence-nand-controller.c:1283:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
               (void *)dma_buf, (void *)dma_ctrl_dat,
               ^
   drivers/mtd/nand/raw/cadence-nand-controller.c:1283:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
               (void *)dma_buf, (void *)dma_ctrl_dat,
                                ^

vim +1283 drivers/mtd/nand/raw/cadence-nand-controller.c

  1246	
  1247	static int
  1248	cadence_nand_cdma_transfer(struct cdns_nand_ctrl *cdns_ctrl, u8 chip_nr,
  1249				   int page, void *buf, void *ctrl_dat, u32 buf_size,
  1250				   u32 ctrl_dat_size, enum dma_data_direction dir,
  1251				   bool with_ecc)
  1252	{
  1253		dma_addr_t dma_buf, dma_ctrl_dat = 0;
  1254		u8 thread_nr = chip_nr;
  1255		int status;
  1256		u16 ctype;
  1257	
  1258		if (dir == DMA_FROM_DEVICE)
  1259			ctype = CDMA_CT_RD;
  1260		else
  1261			ctype = CDMA_CT_WR;
  1262	
  1263		cadence_nand_set_ecc_enable(cdns_ctrl, with_ecc);
  1264	
  1265		dma_buf = dma_map_single(cdns_ctrl->dev, buf, buf_size, dir);
  1266		if (dma_mapping_error(cdns_ctrl->dev, dma_buf)) {
  1267			dev_err(cdns_ctrl->dev, "Failed to map DMA buffer\n");
  1268			return -EIO;
  1269		}
  1270	
  1271		if (ctrl_dat && ctrl_dat_size) {
  1272			dma_ctrl_dat = dma_map_single(cdns_ctrl->dev, ctrl_dat,
  1273						      ctrl_dat_size, dir);
  1274			if (dma_mapping_error(cdns_ctrl->dev, dma_ctrl_dat)) {
  1275				dma_unmap_single(cdns_ctrl->dev, dma_buf,
  1276						 buf_size, dir);
  1277				dev_err(cdns_ctrl->dev, "Failed to map DMA buffer\n");
  1278				return -EIO;
  1279			}
  1280		}
  1281	
  1282		cadence_nand_cdma_desc_prepare(cdns_ctrl, chip_nr, page,
> 1283					       (void *)dma_buf, (void *)dma_ctrl_dat,
  1284					       ctype);
  1285	
  1286		status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr);
  1287	
  1288		dma_unmap_single(cdns_ctrl->dev, dma_buf,
  1289				 buf_size, dir);
  1290	
  1291		if (ctrl_dat && ctrl_dat_size)
  1292			dma_unmap_single(cdns_ctrl->dev, dma_ctrl_dat,
  1293					 ctrl_dat_size, dir);
  1294		if (status)
  1295			return status;
  1296	
  1297		return cadence_nand_cdma_finish(cdns_ctrl);
  1298	}
  1299	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30807 bytes --]

                 reply	other threads:[~2019-11-29  5:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201911291311.GdZNuw5k%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=piotrs@cadence.com \
    /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®