mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/crypto/sa2ul.c:1349:33: warning: cast from pointer to integer of different size
@ 2020-08-09  0:46 kernel test robot
  2020-08-09  7:37 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-08-09  0:46 UTC (permalink / raw)
  To: Keerthy; +Cc: kbuild-all, linux-kernel, Herbert Xu, Tero Kristo

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
commit: 2dc53d0047458e28ed05b4548844ba78199857bf crypto: sa2ul - add sha1/sha256/sha512 support
date:   2 weeks ago
config: m68k-randconfig-r002-20200809 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 2dc53d0047458e28ed05b4548844ba78199857bf
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/err.h:5,
                    from include/linux/clk.h:12,
                    from drivers/crypto/sa2ul.c:11:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
      33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                  ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   In file included from include/linux/device.h:15,
                    from include/linux/dmaengine.h:8,
                    from drivers/crypto/sa2ul.c:12:
   drivers/crypto/sa2ul.c: In function 'sa_sha_init':
>> drivers/crypto/sa2ul.c:1349:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1349 |   crypto_ahash_digestsize(tfm), (u64)rctx);
         |                                 ^
   include/linux/dev_printk.h:123:47: note: in definition of macro 'dev_dbg'
     123 |   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
         |                                               ^~~~~~~~~~~

vim +1349 drivers/crypto/sa2ul.c

  1341	
  1342	static int sa_sha_init(struct ahash_request *req)
  1343	{
  1344		struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
  1345		struct sa_sha_req_ctx *rctx = ahash_request_ctx(req);
  1346		struct sa_tfm_ctx *ctx = crypto_ahash_ctx(tfm);
  1347	
  1348		dev_dbg(sa_k3_dev, "init: digest size: %d, rctx=%llx\n",
> 1349			crypto_ahash_digestsize(tfm), (u64)rctx);
  1350	
  1351		ahash_request_set_tfm(&rctx->fallback_req, ctx->fallback.ahash);
  1352		rctx->fallback_req.base.flags =
  1353			req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP;
  1354	
  1355		return crypto_ahash_init(&rctx->fallback_req);
  1356	}
  1357	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: drivers/crypto/sa2ul.c:1349:33: warning: cast from pointer to integer of different size
  2020-08-09  0:46 drivers/crypto/sa2ul.c:1349:33: warning: cast from pointer to integer of different size kernel test robot
@ 2020-08-09  7:37 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-08-09  7:37 UTC (permalink / raw)
  To: kernel test robot
  Cc: Keerthy, kbuild-all, Linux Kernel Mailing List, Herbert Xu, Tero Kristo

On Sun, Aug 9, 2020 at 2:49 AM kernel test robot <lkp@intel.com> wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
> commit: 2dc53d0047458e28ed05b4548844ba78199857bf crypto: sa2ul - add sha1/sha256/sha512 support
> date:   2 weeks ago
> config: m68k-randconfig-r002-20200809 (attached as .config)
> compiler: m68k-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 2dc53d0047458e28ed05b4548844ba78199857bf
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k

>    In file included from include/linux/device.h:15,
>                     from include/linux/dmaengine.h:8,
>                     from drivers/crypto/sa2ul.c:12:
>    drivers/crypto/sa2ul.c: In function 'sa_sha_init':
> >> drivers/crypto/sa2ul.c:1349:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>     1349 |   crypto_ahash_digestsize(tfm), (u64)rctx);
>          |                                 ^
>    include/linux/dev_printk.h:123:47: note: in definition of macro 'dev_dbg'
>      123 |   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
>          |                                               ^~~~~~~~~~~

Fix available since last Tuesday:
https://lore.kernel.org/linux-crypto/20200804092927.7417-1-geert@linux-m68k.org/

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-09  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-09  0:46 drivers/crypto/sa2ul.c:1349:33: warning: cast from pointer to integer of different size kernel test robot
2020-08-09  7:37 ` Geert Uytterhoeven

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®