Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1574316 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2017-02-06 02:30 +0100 |
| Last post | 2017-02-06 11:20 +0100 |
| Articles | 7 — 4 participants |
Back to article view | Back to linux.kernel
linux-next: build warnings after merge of the crypto tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-02-06 02:30 +0100
Re: linux-next: build warnings after merge of the crypto tree Herbert Xu <herbert@gondor.apana.org.au> - 2017-02-06 10:10 +0100
Re: crypto: atmel - Fix authenc compile test warnings kbuild test robot <lkp@intel.com> - 2017-02-06 18:00 +0100
Re: linux-next: build warnings after merge of the crypto tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-02-10 04:20 +0100
Re: linux-next: build warnings after merge of the crypto tree Herbert Xu <herbert@gondor.apana.org.au> - 2017-02-11 20:00 +0100
Re: linux-next: build warnings after merge of the crypto tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-02-13 00:50 +0100
Re: linux-next: build warnings after merge of the crypto tree Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2017-02-06 11:20 +0100
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-02-06 02:30 +0100 |
| Subject | linux-next: build warnings after merge of the crypto tree |
| Message-ID | <t7GhX-6Ak-1@gated-at.bofh.it> |
Hi Herbert,
After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced these warnings:
warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91)
warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91)
Introduced by commit
89a82ef87e01 ("crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes")
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from drivers/crypto/atmel-sha.c:17:
drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_cpu':
drivers/crypto/atmel-sha.c:571:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/crypto/atmel-sha.c:571:2: note: in expansion of macro 'dev_dbg'
dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
^
drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_pdc':
drivers/crypto/atmel-sha.c:600:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/crypto/atmel-sha.c:600:2: note: in expansion of macro 'dev_dbg'
dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
^
drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_dma':
drivers/crypto/atmel-sha.c:647:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/crypto/atmel-sha.c:647:2: note: in expansion of macro 'dev_dbg'
dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
^
drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_dma_map':
drivers/crypto/atmel-sha.c:726:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_err(dd->dev, "dma %u bytes error\n", ctx->buflen +
^
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from drivers/crypto/atmel-sha.c:17:
drivers/crypto/atmel-sha.c: In function 'atmel_sha_update_dma_slow':
drivers/crypto/atmel-sha.c:747:19: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_dbg(dd->dev, "slow: bufcnt: %u, digcnt: 0x%llx 0x%llx, final: %d\n",
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/crypto/atmel-sha.c:747:2: note: in expansion of macro 'dev_dbg'
dev_dbg(dd->dev, "slow: bufcnt: %u, digcnt: 0x%llx 0x%llx, final: %d\n",
^
drivers/crypto/atmel-sha.c: In function 'atmel_sha_update_dma_start':
drivers/crypto/atmel-sha.c:775:19: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_dbg(dd->dev, "fast: digcnt: 0x%llx 0x%llx, bufcnt: %u, total: %u\n",
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/crypto/atmel-sha.c:775:2: note: in expansion of macro 'dev_dbg'
dev_dbg(dd->dev, "fast: digcnt: 0x%llx 0x%llx, bufcnt: %u, total: %u\n",
^
drivers/crypto/atmel-sha.c:817:21: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_err(dd->dev, "dma %u bytes error\n",
^
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from drivers/crypto/atmel-sha.c:17:
drivers/crypto/atmel-sha.c: In function 'atmel_sha_finish':
drivers/crypto/atmel-sha.c:997:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_dbg(dd->dev, "digcnt: 0x%llx 0x%llx, bufcnt: %d\n", ctx->digcnt[1],
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/crypto/atmel-sha.c:997:2: note: in expansion of macro 'dev_dbg'
dev_dbg(dd->dev, "digcnt: 0x%llx 0x%llx, bufcnt: %d\n", ctx->digcnt[1],
^
I am not sure what caused this, but it may be that this code has not
been built for this platform before?
--
Cheers,
Stephen Rothwell
[toc] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2017-02-06 10:10 +0100 |
| Message-ID | <t7Nt7-30a-7@gated-at.bofh.it> |
| In reply to | #1574316 |
Hi Stephen:
On Mon, Feb 06, 2017 at 12:28:37PM +1100, Stephen Rothwell wrote:
>
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) produced these warnings:
>
> warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91)
> warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91)
>
> Introduced by commit
>
> 89a82ef87e01 ("crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes")
>
> In file included from include/linux/printk.h:329:0,
> from include/linux/kernel.h:13,
> from drivers/crypto/atmel-sha.c:17:
This patch should fix both issues. Thanks,
---8<---
Subject: crypto: atmel - Fix authenc compile test warnings
The authenc code depends on the sha code so in order to allow
compile testing on the former we must allow it on sha as well.
This patch enables compile testing on sha as well as tdes and
fixes the few x86-64 warnings that arise in the sha code.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 7482461..9b7e19e 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -444,7 +444,7 @@ config CRYPTO_DEV_ATMEL_AES
config CRYPTO_DEV_ATMEL_TDES
tristate "Support for Atmel DES/TDES hw accelerator"
- depends on ARCH_AT91
+ depends on ARCH_AT91 || COMPILE_TEST
select CRYPTO_DES
select CRYPTO_BLKCIPHER
help
@@ -457,7 +457,7 @@ config CRYPTO_DEV_ATMEL_TDES
config CRYPTO_DEV_ATMEL_SHA
tristate "Support for Atmel SHA hw accelerator"
- depends on ARCH_AT91
+ depends on ARCH_AT91 || COMPILE_TEST
select CRYPTO_HASH
help
Some Atmel processors have SHA1/SHA224/SHA256/SHA384/SHA512
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index 22d0c0c..b081e78 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -568,7 +568,7 @@ static int atmel_sha_xmit_cpu(struct atmel_sha_dev *dd, const u8 *buf,
int count, len32;
const u32 *buffer = (const u32 *)buf;
- dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
+ dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %zu, final: %d\n",
ctx->digcnt[1], ctx->digcnt[0], length, final);
atmel_sha_write_ctrl(dd, 0);
@@ -597,7 +597,7 @@ static int atmel_sha_xmit_pdc(struct atmel_sha_dev *dd, dma_addr_t dma_addr1,
struct atmel_sha_reqctx *ctx = ahash_request_ctx(dd->req);
int len32;
- dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
+ dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %zu, final: %d\n",
ctx->digcnt[1], ctx->digcnt[0], length1, final);
len32 = DIV_ROUND_UP(length1, sizeof(u32));
@@ -644,7 +644,7 @@ static int atmel_sha_xmit_dma(struct atmel_sha_dev *dd, dma_addr_t dma_addr1,
struct dma_async_tx_descriptor *in_desc;
struct scatterlist sg[2];
- dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
+ dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %zu, final: %d\n",
ctx->digcnt[1], ctx->digcnt[0], length1, final);
dd->dma_lch_in.dma_conf.src_maxburst = 16;
@@ -723,7 +723,7 @@ static int atmel_sha_xmit_dma_map(struct atmel_sha_dev *dd,
ctx->dma_addr = dma_map_single(dd->dev, ctx->buffer,
ctx->buflen + ctx->block_size, DMA_TO_DEVICE);
if (dma_mapping_error(dd->dev, ctx->dma_addr)) {
- dev_err(dd->dev, "dma %u bytes error\n", ctx->buflen +
+ dev_err(dd->dev, "dma %zu bytes error\n", ctx->buflen +
ctx->block_size);
atmel_sha_complete(dd, -EINVAL);
}
@@ -744,7 +744,7 @@ static int atmel_sha_update_dma_slow(struct atmel_sha_dev *dd)
final = (ctx->flags & SHA_FLAGS_FINUP) && !ctx->total;
- dev_dbg(dd->dev, "slow: bufcnt: %u, digcnt: 0x%llx 0x%llx, final: %d\n",
+ dev_dbg(dd->dev, "slow: bufcnt: %zu, digcnt: 0x%llx 0x%llx, final: %d\n",
ctx->bufcnt, ctx->digcnt[1], ctx->digcnt[0], final);
if (final)
@@ -772,7 +772,7 @@ static int atmel_sha_update_dma_start(struct atmel_sha_dev *dd)
if (ctx->bufcnt || ctx->offset)
return atmel_sha_update_dma_slow(dd);
- dev_dbg(dd->dev, "fast: digcnt: 0x%llx 0x%llx, bufcnt: %u, total: %u\n",
+ dev_dbg(dd->dev, "fast: digcnt: 0x%llx 0x%llx, bufcnt: %zu, total: %u\n",
ctx->digcnt[1], ctx->digcnt[0], ctx->bufcnt, ctx->total);
sg = ctx->sg;
@@ -814,7 +814,7 @@ static int atmel_sha_update_dma_start(struct atmel_sha_dev *dd)
ctx->dma_addr = dma_map_single(dd->dev, ctx->buffer,
ctx->buflen + ctx->block_size, DMA_TO_DEVICE);
if (dma_mapping_error(dd->dev, ctx->dma_addr)) {
- dev_err(dd->dev, "dma %u bytes error\n",
+ dev_err(dd->dev, "dma %zu bytes error\n",
ctx->buflen + ctx->block_size);
atmel_sha_complete(dd, -EINVAL);
}
@@ -994,7 +994,7 @@ static int atmel_sha_finish(struct ahash_request *req)
if (ctx->digcnt[0] || ctx->digcnt[1])
atmel_sha_copy_ready_hash(req);
- dev_dbg(dd->dev, "digcnt: 0x%llx 0x%llx, bufcnt: %d\n", ctx->digcnt[1],
+ dev_dbg(dd->dev, "digcnt: 0x%llx 0x%llx, bufcnt: %zu\n", ctx->digcnt[1],
ctx->digcnt[0], ctx->bufcnt);
return 0;
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2017-02-06 18:00 +0100 |
| Subject | Re: crypto: atmel - Fix authenc compile test warnings |
| Message-ID | <t7UNZ-7sP-29@gated-at.bofh.it> |
| In reply to | #1574479 |
Hi Herbert,
[auto build test WARNING on cryptodev/master]
[also build test WARNING on v4.10-rc7 next-20170206]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Herbert-Xu/crypto-atmel-Fix-authenc-compile-test-warnings/20170206-171201
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
include/linux/compiler.h:253:8: sparse: attribute 'no_sanitize_address': unknown attribute
>> drivers/crypto/atmel-tdes.c:157:25: sparse: incompatible types in comparison expression (different type sizes)
drivers/crypto/atmel-tdes.c:528:25: sparse: incompatible types in comparison expression (different type sizes)
drivers/crypto/atmel-tdes.c:529:25: sparse: incompatible types in comparison expression (different type sizes)
In file included from drivers/crypto/atmel-tdes.c:17:0:
drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_sg_copy':
include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast
(void) (&min1 == &min2); \
^
include/linux/kernel.h:756:2: note: in expansion of macro '__min'
__min(typeof(x), typeof(y), \
^~~~~
drivers/crypto/atmel-tdes.c:157:11: note: in expansion of macro 'min'
count = min(count, buflen);
^~~
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from drivers/crypto/atmel-tdes.c:17:
drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_pdc_stop':
include/linux/kern_levels.h:4:18: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^~~~~~~~
include/linux/printk.h:292:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~
drivers/crypto/atmel-tdes.c:339:4: note: in expansion of macro 'pr_err'
pr_err("not all data converted: %u\n", count);
^~~~~~
drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_buff_init':
drivers/crypto/atmel-tdes.c:364:26: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_err(dd->dev, "dma %d bytes error\n", dd->buflen);
^
drivers/crypto/atmel-tdes.c:372:26: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
dev_err(dd->dev, "dma %d bytes error\n", dd->buflen);
^
In file included from drivers/crypto/atmel-tdes.c:17:0:
drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_start':
include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast
(void) (&min1 == &min2); \
^
include/linux/kernel.h:756:2: note: in expansion of macro '__min'
__min(typeof(x), typeof(y), \
^~~~~
drivers/crypto/atmel-tdes.c:528:11: note: in expansion of macro 'min'
count = min(dd->total, sg_dma_len(dd->in_sg));
^~~
include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast
(void) (&min1 == &min2); \
^
include/linux/kernel.h:756:2: note: in expansion of macro '__min'
__min(typeof(x), typeof(y), \
^~~~~
drivers/crypto/atmel-tdes.c:529:11: note: in expansion of macro 'min'
count = min(count, sg_dma_len(dd->out_sg));
^~~
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from drivers/crypto/atmel-tdes.c:17:
drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_dma_stop':
include/linux/kern_levels.h:4:18: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^~~~~~~~
include/linux/printk.h:292:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~
drivers/crypto/atmel-tdes.c:664:5: note: in expansion of macro 'pr_err'
pr_err("not all data converted: %u\n", count);
^~~~~~
vim +157 drivers/crypto/atmel-tdes.c
13802005 Nicolas Royer 2012-07-01 141 struct list_head dev_list;
13802005 Nicolas Royer 2012-07-01 142 spinlock_t lock;
13802005 Nicolas Royer 2012-07-01 143 };
13802005 Nicolas Royer 2012-07-01 144
13802005 Nicolas Royer 2012-07-01 145 static struct atmel_tdes_drv atmel_tdes = {
13802005 Nicolas Royer 2012-07-01 146 .dev_list = LIST_HEAD_INIT(atmel_tdes.dev_list),
13802005 Nicolas Royer 2012-07-01 147 .lock = __SPIN_LOCK_UNLOCKED(atmel_tdes.lock),
13802005 Nicolas Royer 2012-07-01 148 };
13802005 Nicolas Royer 2012-07-01 149
13802005 Nicolas Royer 2012-07-01 150 static int atmel_tdes_sg_copy(struct scatterlist **sg, size_t *offset,
13802005 Nicolas Royer 2012-07-01 151 void *buf, size_t buflen, size_t total, int out)
13802005 Nicolas Royer 2012-07-01 152 {
13802005 Nicolas Royer 2012-07-01 153 unsigned int count, off = 0;
13802005 Nicolas Royer 2012-07-01 154
13802005 Nicolas Royer 2012-07-01 155 while (buflen && total) {
13802005 Nicolas Royer 2012-07-01 156 count = min((*sg)->length - *offset, total);
13802005 Nicolas Royer 2012-07-01 @157 count = min(count, buflen);
13802005 Nicolas Royer 2012-07-01 158
13802005 Nicolas Royer 2012-07-01 159 if (!count)
13802005 Nicolas Royer 2012-07-01 160 return off;
13802005 Nicolas Royer 2012-07-01 161
13802005 Nicolas Royer 2012-07-01 162 scatterwalk_map_and_copy(buf + off, *sg, *offset, count, out);
13802005 Nicolas Royer 2012-07-01 163
13802005 Nicolas Royer 2012-07-01 164 off += count;
13802005 Nicolas Royer 2012-07-01 165 buflen -= count;
:::::: The code at line 157 was first introduced by commit
:::::: 13802005d8f2db244ec1f5d7f6923de8f7a463db crypto: atmel - add Atmel DES/TDES driver
:::::: TO: Nicolas Royer <nicolas@eukrea.com>
:::::: CC: Herbert Xu <herbert@gondor.apana.org.au>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-02-10 04:20 +0100 |
| Message-ID | <t99UB-6os-5@gated-at.bofh.it> |
| In reply to | #1574479 |
Hi Herbert,
On Mon, 6 Feb 2017 17:03:40 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Mon, Feb 06, 2017 at 12:28:37PM +1100, Stephen Rothwell wrote:
> >
> > After merging the crypto tree, today's linux-next build (x86_64
> > allmodconfig) produced these warnings:
> >
> > warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91)
> > warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91)
> >
> > Introduced by commit
> >
> > 89a82ef87e01 ("crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes")
> >
> > In file included from include/linux/printk.h:329:0,
> > from include/linux/kernel.h:13,
> > from drivers/crypto/atmel-sha.c:17:
>
> This patch should fix both issues. Thanks,
I am still getting these warnings ... I have seen no updates to the
crypot tree since Feb 2.
--
Cheers,
Stephen Rothwell
[toc] | [prev] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2017-02-11 20:00 +0100 |
| Message-ID | <t9L3P-4eF-3@gated-at.bofh.it> |
| In reply to | #1578154 |
On Fri, Feb 10, 2017 at 02:12:51PM +1100, Stephen Rothwell wrote: > > I am still getting these warnings ... I have seen no updates to the > crypot tree since Feb 2. Sorry Stephen. I have now applied Arnd's fixes for this problem and it should be pushed out. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-02-13 00:50 +0100 |
| Message-ID | <tac41-4cC-5@gated-at.bofh.it> |
| In reply to | #1579072 |
Hi Herbert, On Sat, 11 Feb 2017 18:56:21 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote: > > On Fri, Feb 10, 2017 at 02:12:51PM +1100, Stephen Rothwell wrote: > > > > I am still getting these warnings ... I have seen no updates to the > > crypot tree since Feb 2. > > Sorry Stephen. I have now applied Arnd's fixes for this problem > and it should be pushed out. Thanks, its much cleaner now. :-) -- Cheers, Stephen Rothwell
[toc] | [prev] | [next] | [standalone]
| From | Cyrille Pitchen <cyrille.pitchen@atmel.com> |
|---|---|
| Date | 2017-02-06 11:20 +0100 |
| Message-ID | <t7OyT-3E0-29@gated-at.bofh.it> |
| In reply to | #1574316 |
Hi all,
Le 06/02/2017 à 02:28, Stephen Rothwell a écrit :
> Hi Herbert,
>
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) produced these warnings:
>
> warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91)
> warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91)
>
> Introduced by commit
>
> 89a82ef87e01 ("crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes")
>
> In file included from include/linux/printk.h:329:0,
> from include/linux/kernel.h:13,
> from drivers/crypto/atmel-sha.c:17:
> drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_cpu':
> drivers/crypto/atmel-sha.c:571:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
> dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
> ^
> include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^
> drivers/crypto/atmel-sha.c:571:2: note: in expansion of macro 'dev_dbg'
> dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
> ^
> drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_pdc':
> drivers/crypto/atmel-sha.c:600:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
> dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
> ^
> include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^
> drivers/crypto/atmel-sha.c:600:2: note: in expansion of macro 'dev_dbg'
> dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
> ^
> drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_dma':
> drivers/crypto/atmel-sha.c:647:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
> dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
> ^
> include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^
> drivers/crypto/atmel-sha.c:647:2: note: in expansion of macro 'dev_dbg'
> dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
> ^
> drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_dma_map':
> drivers/crypto/atmel-sha.c:726:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
> dev_err(dd->dev, "dma %u bytes error\n", ctx->buflen +
> ^
> In file included from include/linux/printk.h:329:0,
> from include/linux/kernel.h:13,
> from drivers/crypto/atmel-sha.c:17:
> drivers/crypto/atmel-sha.c: In function 'atmel_sha_update_dma_slow':
> drivers/crypto/atmel-sha.c:747:19: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
> dev_dbg(dd->dev, "slow: bufcnt: %u, digcnt: 0x%llx 0x%llx, final: %d\n",
> ^
> include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^
> drivers/crypto/atmel-sha.c:747:2: note: in expansion of macro 'dev_dbg'
> dev_dbg(dd->dev, "slow: bufcnt: %u, digcnt: 0x%llx 0x%llx, final: %d\n",
> ^
> drivers/crypto/atmel-sha.c: In function 'atmel_sha_update_dma_start':
> drivers/crypto/atmel-sha.c:775:19: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
> dev_dbg(dd->dev, "fast: digcnt: 0x%llx 0x%llx, bufcnt: %u, total: %u\n",
> ^
> include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^
> drivers/crypto/atmel-sha.c:775:2: note: in expansion of macro 'dev_dbg'
> dev_dbg(dd->dev, "fast: digcnt: 0x%llx 0x%llx, bufcnt: %u, total: %u\n",
> ^
> drivers/crypto/atmel-sha.c:817:21: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
> dev_err(dd->dev, "dma %u bytes error\n",
> ^
> In file included from include/linux/printk.h:329:0,
> from include/linux/kernel.h:13,
> from drivers/crypto/atmel-sha.c:17:
> drivers/crypto/atmel-sha.c: In function 'atmel_sha_finish':
> drivers/crypto/atmel-sha.c:997:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=]
> dev_dbg(dd->dev, "digcnt: 0x%llx 0x%llx, bufcnt: %d\n", ctx->digcnt[1],
> ^
> include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^
> drivers/crypto/atmel-sha.c:997:2: note: in expansion of macro 'dev_dbg'
> dev_dbg(dd->dev, "digcnt: 0x%llx 0x%llx, bufcnt: %d\n", ctx->digcnt[1],
> ^
>
> I am not sure what caused this, but it may be that this code has not
> been built for this platform before?
>
Indeed, the drivers/crypto/atmel-sha.c driver has never been built for x86_64.
CRYPTO_DEV_ATMEL_AUTHENC must select both CRYPTO_DEV_ATMEL_AES and
CRYPTO_DEV_ATMEL_SHA. I thought I could add a dependency to COMPILE_TEST
for CRYPTO_DEV_ATMEL_AUTHENC since CRYPTO_DEV_ATMEL_AES already had such a
dependency, hence could be compiled on architectures other than AT91 but I
didn't check the same for CRYPTO_DEV_ATMEL_SHA.
So maybe the easiest solution could be to remove the COMPILE_TEST
dependency on CRYPTO_DEV_ATMEL_AUTHENC for now, then I could try to fix all
these dev_dbg() format strings to make them become cross-platform compliant.
Herbert, if you think this solution is suitable I can prepare a first patch
to remove the COMPILE_TEST dependency on CRYPTO_DEV_ATMEL_AUTHENC.
Best regards,
Cyrille
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web