Re: [PATCH nf-next,v4] netfilter: nf_tables: add last expression
by kernel test robot
Hi Pablo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on nf/master]
[also build test WARNING on nf-next/master v5.13-rc6 next-20210616]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-nf_t...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: i386-randconfig-s001-20210615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/12cfd8daf813a3f62294bdbe915c1d2cd...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pablo-Neira-Ayuso/netfilter-nf_tables-add-last-expression/20210617-021223
git checkout 12cfd8daf813a3f62294bdbe915c1d2cd6946a30
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/netfilter/nft_last.c:59:46: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be32 [usertype] value @@ got restricted __be16 [usertype] @@
net/netfilter/nft_last.c:59:46: sparse: expected restricted __be32 [usertype] value
net/netfilter/nft_last.c:59:46: sparse: got restricted __be16 [usertype]
vim +59 net/netfilter/nft_last.c
48
49 static int nft_last_dump(struct sk_buff *skb, const struct nft_expr *expr)
50 {
51 struct nft_last_priv *priv = nft_expr_priv(expr);
52 __be64 msecs;
53
54 if (priv->last_set)
55 msecs = nf_jiffies64_to_msecs(jiffies - priv->last_jiffies);
56 else
57 msecs = 0;
58
> 59 if (nla_put_be32(skb, NFTA_LAST_SET, htons(priv->last_set)) ||
60 nla_put_be64(skb, NFTA_LAST_MSECS, msecs, NFTA_LAST_PAD))
61 goto nla_put_failure;
62
63 return 0;
64
65 nla_put_failure:
66 return -1;
67 }
68
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[drm-drm-intel:drm-intel-gt-next 6/8] drivers/gpu/drm/i915/intel_region_ttm.c:202: warning: expecting prototype for intel_region_ttm_node_alloc(). Prototype was for intel_region_ttm_resource_alloc() instead
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-intel drm-intel-gt-next
head: 13c2ceb6addb6b14468e09b75832c98909eed8e7
commit: 687c7d0fcf8014a006416d7dc7474a101a85bf00 [6/8] drm/i915/ttm: remove node usage in our naming
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add drm-drm-intel git://anongit.freedesktop.org/drm/drm-intel
git fetch --no-tags drm-drm-intel drm-intel-gt-next
git checkout 687c7d0fcf8014a006416d7dc7474a101a85bf00
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/intel_region_ttm.c:202: warning: expecting prototype for intel_region_ttm_node_alloc(). Prototype was for intel_region_ttm_resource_alloc() instead
vim +202 drivers/gpu/drm/i915/intel_region_ttm.c
d148738923fdb5 Thomas Hellström 2021-06-02 181
213d5092776345 Thomas Hellström 2021-06-10 182 #ifdef CONFIG_DRM_I915_SELFTEST
d148738923fdb5 Thomas Hellström 2021-06-02 183 /**
d148738923fdb5 Thomas Hellström 2021-06-02 184 * intel_region_ttm_node_alloc - Allocate memory resources from a region
d148738923fdb5 Thomas Hellström 2021-06-02 185 * @mem: The memory region,
d148738923fdb5 Thomas Hellström 2021-06-02 186 * @size: The requested size in bytes
d148738923fdb5 Thomas Hellström 2021-06-02 187 * @flags: Allocation flags
d148738923fdb5 Thomas Hellström 2021-06-02 188 *
d148738923fdb5 Thomas Hellström 2021-06-02 189 * This functionality is provided only for callers that need to allocate
d148738923fdb5 Thomas Hellström 2021-06-02 190 * memory from standalone TTM range managers, without the TTM eviction
d148738923fdb5 Thomas Hellström 2021-06-02 191 * functionality. Don't use if you are not completely sure that's the
d148738923fdb5 Thomas Hellström 2021-06-02 192 * case. The returned opaque node can be converted to an sg_table using
d148738923fdb5 Thomas Hellström 2021-06-02 193 * intel_region_ttm_node_to_st(), and can be freed using
d148738923fdb5 Thomas Hellström 2021-06-02 194 * intel_region_ttm_node_free().
d148738923fdb5 Thomas Hellström 2021-06-02 195 *
d148738923fdb5 Thomas Hellström 2021-06-02 196 * Return: A valid pointer on success, an error pointer on failure.
d148738923fdb5 Thomas Hellström 2021-06-02 197 */
2a7005c8a3982b Dave Airlie 2021-06-11 198 struct ttm_resource *
687c7d0fcf8014 Matthew Auld 2021-06-16 199 intel_region_ttm_resource_alloc(struct intel_memory_region *mem,
d148738923fdb5 Thomas Hellström 2021-06-02 200 resource_size_t size,
d148738923fdb5 Thomas Hellström 2021-06-02 201 unsigned int flags)
d148738923fdb5 Thomas Hellström 2021-06-02 @202 {
:::::: The code at line 202 was first introduced by commit
:::::: d148738923fdb5077089e48ec15555e6008100d0 drm/i915/ttm Initialize the ttm device and memory managers
:::::: TO: Thomas Hellström <thomas.hellstrom(a)linux.intel.com>
:::::: CC: Matthew Auld <matthew.auld(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/crypto/talitos.c:3328:12: warning: stack frame size of 1040 bytes in function 'talitos_probe'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 368094df48e680fa51cedb68537408cfa64b788e
commit: 43a942d27eaaf33bca560121cbe42f3637e92880 crypto: talitos - Fix ctr(aes) on SEC1
date: 4 months ago
config: powerpc-randconfig-r031-20210610 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 43a942d27eaaf33bca560121cbe42f3637e92880
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/crypto/talitos.c:19:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:225:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/crypto/talitos.c:19:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:227:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/crypto/talitos.c:19:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:229:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/crypto/talitos.c:19:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:231:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/crypto/talitos.c:19:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:233:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/crypto/talitos.c:3328:12: warning: stack frame size of 1040 bytes in function 'talitos_probe' [-Wframe-larger-than=]
static int talitos_probe(struct platform_device *ofdev)
^
8 warnings generated.
vim +/talitos_probe +3328 drivers/crypto/talitos.c
c3e337f88a5b37 Kim Phillips 2011-11-21 3327
1c48a5c93da631 Grant Likely 2011-02-17 @3328 static int talitos_probe(struct platform_device *ofdev)
9c4a79653b35ef Kim Phillips 2008-06-23 3329 {
9c4a79653b35ef Kim Phillips 2008-06-23 3330 struct device *dev = &ofdev->dev;
61c7a080a5a061 Grant Likely 2010-04-13 3331 struct device_node *np = ofdev->dev.of_node;
9c4a79653b35ef Kim Phillips 2008-06-23 3332 struct talitos_private *priv;
9c4a79653b35ef Kim Phillips 2008-06-23 3333 int i, err;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3334 int stride;
fd5ea7f011932d LEROY Christophe 2017-10-06 3335 struct resource *res;
9c4a79653b35ef Kim Phillips 2008-06-23 3336
24b92ff276e8f6 LEROY Christophe 2017-10-06 3337 priv = devm_kzalloc(dev, sizeof(struct talitos_private), GFP_KERNEL);
9c4a79653b35ef Kim Phillips 2008-06-23 3338 if (!priv)
9c4a79653b35ef Kim Phillips 2008-06-23 3339 return -ENOMEM;
9c4a79653b35ef Kim Phillips 2008-06-23 3340
f3de9cb1ca6ce3 Kevin Hao 2014-01-28 3341 INIT_LIST_HEAD(&priv->alg_list);
f3de9cb1ca6ce3 Kevin Hao 2014-01-28 3342
9c4a79653b35ef Kim Phillips 2008-06-23 3343 dev_set_drvdata(dev, priv);
9c4a79653b35ef Kim Phillips 2008-06-23 3344
9c4a79653b35ef Kim Phillips 2008-06-23 3345 priv->ofdev = ofdev;
9c4a79653b35ef Kim Phillips 2008-06-23 3346
511d63cb193292 Horia Geanta 2012-03-30 3347 spin_lock_init(&priv->reg_lock);
511d63cb193292 Horia Geanta 2012-03-30 3348
fd5ea7f011932d LEROY Christophe 2017-10-06 3349 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
fd5ea7f011932d LEROY Christophe 2017-10-06 3350 if (!res)
fd5ea7f011932d LEROY Christophe 2017-10-06 3351 return -ENXIO;
fd5ea7f011932d LEROY Christophe 2017-10-06 3352 priv->reg = devm_ioremap(dev, res->start, resource_size(res));
9c4a79653b35ef Kim Phillips 2008-06-23 3353 if (!priv->reg) {
9c4a79653b35ef Kim Phillips 2008-06-23 3354 dev_err(dev, "failed to of_iomap\n");
9c4a79653b35ef Kim Phillips 2008-06-23 3355 err = -ENOMEM;
9c4a79653b35ef Kim Phillips 2008-06-23 3356 goto err_out;
9c4a79653b35ef Kim Phillips 2008-06-23 3357 }
9c4a79653b35ef Kim Phillips 2008-06-23 3358
9c4a79653b35ef Kim Phillips 2008-06-23 3359 /* get SEC version capabilities from device tree */
fa14c6cfcecb00 LEROY Christophe 2017-10-06 3360 of_property_read_u32(np, "fsl,num-channels", &priv->num_channels);
fa14c6cfcecb00 LEROY Christophe 2017-10-06 3361 of_property_read_u32(np, "fsl,channel-fifo-len", &priv->chfifo_len);
fa14c6cfcecb00 LEROY Christophe 2017-10-06 3362 of_property_read_u32(np, "fsl,exec-units-mask", &priv->exec_units);
fa14c6cfcecb00 LEROY Christophe 2017-10-06 3363 of_property_read_u32(np, "fsl,descriptor-types-mask",
fa14c6cfcecb00 LEROY Christophe 2017-10-06 3364 &priv->desc_types);
9c4a79653b35ef Kim Phillips 2008-06-23 3365
9c4a79653b35ef Kim Phillips 2008-06-23 3366 if (!is_power_of_2(priv->num_channels) || !priv->chfifo_len ||
9c4a79653b35ef Kim Phillips 2008-06-23 3367 !priv->exec_units || !priv->desc_types) {
9c4a79653b35ef Kim Phillips 2008-06-23 3368 dev_err(dev, "invalid property data in device tree node\n");
9c4a79653b35ef Kim Phillips 2008-06-23 3369 err = -EINVAL;
9c4a79653b35ef Kim Phillips 2008-06-23 3370 goto err_out;
9c4a79653b35ef Kim Phillips 2008-06-23 3371 }
9c4a79653b35ef Kim Phillips 2008-06-23 3372
f3c85bc1bc72b4 Lee Nipper 2008-07-30 3373 if (of_device_is_compatible(np, "fsl,sec3.0"))
f3c85bc1bc72b4 Lee Nipper 2008-07-30 3374 priv->features |= TALITOS_FTR_SRC_LINK_TBL_LEN_INCLUDES_EXTENT;
f3c85bc1bc72b4 Lee Nipper 2008-07-30 3375
fe5720e2b7c1e8 Kim Phillips 2008-10-12 3376 if (of_device_is_compatible(np, "fsl,sec2.1"))
60f208d7836216 Kim Phillips 2010-05-19 3377 priv->features |= TALITOS_FTR_HW_AUTH_CHECK |
79b3a418e09024 Lee Nipper 2011-11-21 3378 TALITOS_FTR_SHA224_HWINIT |
79b3a418e09024 Lee Nipper 2011-11-21 3379 TALITOS_FTR_HMAC_OK;
fe5720e2b7c1e8 Kim Phillips 2008-10-12 3380
21590888490ce2 LEROY Christophe 2015-04-17 3381 if (of_device_is_compatible(np, "fsl,sec1.0"))
21590888490ce2 LEROY Christophe 2015-04-17 3382 priv->features |= TALITOS_FTR_SEC1;
21590888490ce2 LEROY Christophe 2015-04-17 3383
5fa7fa147b1572 LEROY Christophe 2015-04-17 3384 if (of_device_is_compatible(np, "fsl,sec1.2")) {
5fa7fa147b1572 LEROY Christophe 2015-04-17 3385 priv->reg_deu = priv->reg + TALITOS12_DEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3386 priv->reg_aesu = priv->reg + TALITOS12_AESU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3387 priv->reg_mdeu = priv->reg + TALITOS12_MDEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3388 stride = TALITOS1_CH_STRIDE;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3389 } else if (of_device_is_compatible(np, "fsl,sec1.0")) {
5fa7fa147b1572 LEROY Christophe 2015-04-17 3390 priv->reg_deu = priv->reg + TALITOS10_DEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3391 priv->reg_aesu = priv->reg + TALITOS10_AESU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3392 priv->reg_mdeu = priv->reg + TALITOS10_MDEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3393 priv->reg_afeu = priv->reg + TALITOS10_AFEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3394 priv->reg_rngu = priv->reg + TALITOS10_RNGU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3395 priv->reg_pkeu = priv->reg + TALITOS10_PKEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3396 stride = TALITOS1_CH_STRIDE;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3397 } else {
5fa7fa147b1572 LEROY Christophe 2015-04-17 3398 priv->reg_deu = priv->reg + TALITOS2_DEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3399 priv->reg_aesu = priv->reg + TALITOS2_AESU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3400 priv->reg_mdeu = priv->reg + TALITOS2_MDEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3401 priv->reg_afeu = priv->reg + TALITOS2_AFEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3402 priv->reg_rngu = priv->reg + TALITOS2_RNGU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3403 priv->reg_pkeu = priv->reg + TALITOS2_PKEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3404 priv->reg_keu = priv->reg + TALITOS2_KEU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3405 priv->reg_crcu = priv->reg + TALITOS2_CRCU;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3406 stride = TALITOS2_CH_STRIDE;
5fa7fa147b1572 LEROY Christophe 2015-04-17 3407 }
5fa7fa147b1572 LEROY Christophe 2015-04-17 3408
dd3c0987f5426d LEROY Christophe 2015-04-17 3409 err = talitos_probe_irq(ofdev);
dd3c0987f5426d LEROY Christophe 2015-04-17 3410 if (err)
dd3c0987f5426d LEROY Christophe 2015-04-17 3411 goto err_out;
dd3c0987f5426d LEROY Christophe 2015-04-17 3412
c8c74647b2945e Christophe Leroy 2019-06-17 3413 if (has_ftr_sec1(priv)) {
9c02e2852fcabf LEROY Christophe 2017-10-06 3414 if (priv->num_channels == 1)
9c02e2852fcabf LEROY Christophe 2017-10-06 3415 tasklet_init(&priv->done_task[0], talitos1_done_ch0,
dd3c0987f5426d LEROY Christophe 2015-04-17 3416 (unsigned long)dev);
9c02e2852fcabf LEROY Christophe 2017-10-06 3417 else
9c02e2852fcabf LEROY Christophe 2017-10-06 3418 tasklet_init(&priv->done_task[0], talitos1_done_4ch,
dd3c0987f5426d LEROY Christophe 2015-04-17 3419 (unsigned long)dev);
dd3c0987f5426d LEROY Christophe 2015-04-17 3420 } else {
9c02e2852fcabf LEROY Christophe 2017-10-06 3421 if (priv->irq[1]) {
dd3c0987f5426d LEROY Christophe 2015-04-17 3422 tasklet_init(&priv->done_task[0], talitos2_done_ch0_2,
dd3c0987f5426d LEROY Christophe 2015-04-17 3423 (unsigned long)dev);
dd3c0987f5426d LEROY Christophe 2015-04-17 3424 tasklet_init(&priv->done_task[1], talitos2_done_ch1_3,
dd3c0987f5426d LEROY Christophe 2015-04-17 3425 (unsigned long)dev);
9c02e2852fcabf LEROY Christophe 2017-10-06 3426 } else if (priv->num_channels == 1) {
9c02e2852fcabf LEROY Christophe 2017-10-06 3427 tasklet_init(&priv->done_task[0], talitos2_done_ch0,
9c02e2852fcabf LEROY Christophe 2017-10-06 3428 (unsigned long)dev);
9c02e2852fcabf LEROY Christophe 2017-10-06 3429 } else {
9c02e2852fcabf LEROY Christophe 2017-10-06 3430 tasklet_init(&priv->done_task[0], talitos2_done_4ch,
9c02e2852fcabf LEROY Christophe 2017-10-06 3431 (unsigned long)dev);
dd3c0987f5426d LEROY Christophe 2015-04-17 3432 }
dd3c0987f5426d LEROY Christophe 2015-04-17 3433 }
dd3c0987f5426d LEROY Christophe 2015-04-17 3434
a86854d0c599b3 Kees Cook 2018-06-12 3435 priv->chan = devm_kcalloc(dev,
a86854d0c599b3 Kees Cook 2018-06-12 3436 priv->num_channels,
a86854d0c599b3 Kees Cook 2018-06-12 3437 sizeof(struct talitos_channel),
a86854d0c599b3 Kees Cook 2018-06-12 3438 GFP_KERNEL);
4b992628812137 Kim Phillips 2009-08-13 3439 if (!priv->chan) {
4b992628812137 Kim Phillips 2009-08-13 3440 dev_err(dev, "failed to allocate channel management space\n");
9c4a79653b35ef Kim Phillips 2008-06-23 3441 err = -ENOMEM;
9c4a79653b35ef Kim Phillips 2008-06-23 3442 goto err_out;
9c4a79653b35ef Kim Phillips 2008-06-23 3443 }
9c4a79653b35ef Kim Phillips 2008-06-23 3444
f641ddddc3ad13 Martin Hicks 2015-03-03 3445 priv->fifo_len = roundup_pow_of_two(priv->chfifo_len);
f641ddddc3ad13 Martin Hicks 2015-03-03 3446
c3e337f88a5b37 Kim Phillips 2011-11-21 3447 for (i = 0; i < priv->num_channels; i++) {
5fa7fa147b1572 LEROY Christophe 2015-04-17 3448 priv->chan[i].reg = priv->reg + stride * (i + 1);
2cdba3cf6ffc1f Kim Phillips 2011-12-12 3449 if (!priv->irq[1] || !(i & 1))
c3e337f88a5b37 Kim Phillips 2011-11-21 3450 priv->chan[i].reg += TALITOS_CH_BASE_OFFSET;
ad42d5fc853832 Kim Phillips 2011-11-21 3451
4b992628812137 Kim Phillips 2009-08-13 3452 spin_lock_init(&priv->chan[i].head_lock);
4b992628812137 Kim Phillips 2009-08-13 3453 spin_lock_init(&priv->chan[i].tail_lock);
9c4a79653b35ef Kim Phillips 2008-06-23 3454
a86854d0c599b3 Kees Cook 2018-06-12 3455 priv->chan[i].fifo = devm_kcalloc(dev,
a86854d0c599b3 Kees Cook 2018-06-12 3456 priv->fifo_len,
a86854d0c599b3 Kees Cook 2018-06-12 3457 sizeof(struct talitos_request),
a86854d0c599b3 Kees Cook 2018-06-12 3458 GFP_KERNEL);
4b992628812137 Kim Phillips 2009-08-13 3459 if (!priv->chan[i].fifo) {
9c4a79653b35ef Kim Phillips 2008-06-23 3460 dev_err(dev, "failed to allocate request fifo %d\n", i);
9c4a79653b35ef Kim Phillips 2008-06-23 3461 err = -ENOMEM;
9c4a79653b35ef Kim Phillips 2008-06-23 3462 goto err_out;
9c4a79653b35ef Kim Phillips 2008-06-23 3463 }
9c4a79653b35ef Kim Phillips 2008-06-23 3464
4b992628812137 Kim Phillips 2009-08-13 3465 atomic_set(&priv->chan[i].submit_count,
4b992628812137 Kim Phillips 2009-08-13 3466 -(priv->chfifo_len - 1));
f641ddddc3ad13 Martin Hicks 2015-03-03 3467 }
9c4a79653b35ef Kim Phillips 2008-06-23 3468
81eb024c7e63f5 Kim Phillips 2009-08-13 3469 dma_set_mask(dev, DMA_BIT_MASK(36));
81eb024c7e63f5 Kim Phillips 2009-08-13 3470
9c4a79653b35ef Kim Phillips 2008-06-23 3471 /* reset and initialize the h/w */
9c4a79653b35ef Kim Phillips 2008-06-23 3472 err = init_device(dev);
9c4a79653b35ef Kim Phillips 2008-06-23 3473 if (err) {
9c4a79653b35ef Kim Phillips 2008-06-23 3474 dev_err(dev, "failed to initialize device\n");
9c4a79653b35ef Kim Phillips 2008-06-23 3475 goto err_out;
9c4a79653b35ef Kim Phillips 2008-06-23 3476 }
9c4a79653b35ef Kim Phillips 2008-06-23 3477
9c4a79653b35ef Kim Phillips 2008-06-23 3478 /* register the RNG, if available */
9c4a79653b35ef Kim Phillips 2008-06-23 3479 if (hw_supports(dev, DESC_HDR_SEL0_RNG)) {
9c4a79653b35ef Kim Phillips 2008-06-23 3480 err = talitos_register_rng(dev);
9c4a79653b35ef Kim Phillips 2008-06-23 3481 if (err) {
9c4a79653b35ef Kim Phillips 2008-06-23 3482 dev_err(dev, "failed to register hwrng: %d\n", err);
9c4a79653b35ef Kim Phillips 2008-06-23 3483 goto err_out;
9c4a79653b35ef Kim Phillips 2008-06-23 3484 } else
9c4a79653b35ef Kim Phillips 2008-06-23 3485 dev_info(dev, "hwrng\n");
9c4a79653b35ef Kim Phillips 2008-06-23 3486 }
9c4a79653b35ef Kim Phillips 2008-06-23 3487
9c4a79653b35ef Kim Phillips 2008-06-23 3488 /* register crypto algorithms the device supports */
9c4a79653b35ef Kim Phillips 2008-06-23 3489 for (i = 0; i < ARRAY_SIZE(driver_algs); i++) {
9c4a79653b35ef Kim Phillips 2008-06-23 3490 if (hw_supports(dev, driver_algs[i].desc_hdr_template)) {
9c4a79653b35ef Kim Phillips 2008-06-23 3491 struct talitos_crypto_alg *t_alg;
aeb4c132f33d21 Herbert Xu 2015-07-30 3492 struct crypto_alg *alg = NULL;
9c4a79653b35ef Kim Phillips 2008-06-23 3493
9c4a79653b35ef Kim Phillips 2008-06-23 3494 t_alg = talitos_alg_alloc(dev, &driver_algs[i]);
9c4a79653b35ef Kim Phillips 2008-06-23 3495 if (IS_ERR(t_alg)) {
9c4a79653b35ef Kim Phillips 2008-06-23 3496 err = PTR_ERR(t_alg);
0b2730d8d8b38e Kim Phillips 2011-12-12 3497 if (err == -ENOTSUPP)
79b3a418e09024 Lee Nipper 2011-11-21 3498 continue;
9c4a79653b35ef Kim Phillips 2008-06-23 3499 goto err_out;
9c4a79653b35ef Kim Phillips 2008-06-23 3500 }
9c4a79653b35ef Kim Phillips 2008-06-23 3501
acbf7c627fb59d Lee Nipper 2010-05-19 3502 switch (t_alg->algt.type) {
373960d794d2b0 Ard Biesheuvel 2019-11-09 3503 case CRYPTO_ALG_TYPE_SKCIPHER:
373960d794d2b0 Ard Biesheuvel 2019-11-09 3504 err = crypto_register_skcipher(
373960d794d2b0 Ard Biesheuvel 2019-11-09 3505 &t_alg->algt.alg.skcipher);
373960d794d2b0 Ard Biesheuvel 2019-11-09 3506 alg = &t_alg->algt.alg.skcipher.base;
acbf7c627fb59d Lee Nipper 2010-05-19 3507 break;
aeb4c132f33d21 Herbert Xu 2015-07-30 3508
aeb4c132f33d21 Herbert Xu 2015-07-30 3509 case CRYPTO_ALG_TYPE_AEAD:
aeb4c132f33d21 Herbert Xu 2015-07-30 3510 err = crypto_register_aead(
aeb4c132f33d21 Herbert Xu 2015-07-30 3511 &t_alg->algt.alg.aead);
aeb4c132f33d21 Herbert Xu 2015-07-30 3512 alg = &t_alg->algt.alg.aead.base;
aeb4c132f33d21 Herbert Xu 2015-07-30 3513 break;
aeb4c132f33d21 Herbert Xu 2015-07-30 3514
acbf7c627fb59d Lee Nipper 2010-05-19 3515 case CRYPTO_ALG_TYPE_AHASH:
acbf7c627fb59d Lee Nipper 2010-05-19 3516 err = crypto_register_ahash(
acbf7c627fb59d Lee Nipper 2010-05-19 3517 &t_alg->algt.alg.hash);
aeb4c132f33d21 Herbert Xu 2015-07-30 3518 alg = &t_alg->algt.alg.hash.halg.base;
acbf7c627fb59d Lee Nipper 2010-05-19 3519 break;
acbf7c627fb59d Lee Nipper 2010-05-19 3520 }
9c4a79653b35ef Kim Phillips 2008-06-23 3521 if (err) {
9c4a79653b35ef Kim Phillips 2008-06-23 3522 dev_err(dev, "%s alg registration failed\n",
aeb4c132f33d21 Herbert Xu 2015-07-30 3523 alg->cra_driver_name);
24b92ff276e8f6 LEROY Christophe 2017-10-06 3524 devm_kfree(dev, t_alg);
991155bacb91c9 Horia Geanta 2013-03-20 3525 } else
9c4a79653b35ef Kim Phillips 2008-06-23 3526 list_add_tail(&t_alg->entry, &priv->alg_list);
9c4a79653b35ef Kim Phillips 2008-06-23 3527 }
9c4a79653b35ef Kim Phillips 2008-06-23 3528 }
5b859b6ebb18b3 Kim Phillips 2011-11-21 3529 if (!list_empty(&priv->alg_list))
5b859b6ebb18b3 Kim Phillips 2011-11-21 3530 dev_info(dev, "%s algorithms registered in /proc/crypto\n",
5b859b6ebb18b3 Kim Phillips 2011-11-21 3531 (char *)of_get_property(np, "compatible", NULL));
9c4a79653b35ef Kim Phillips 2008-06-23 3532
9c4a79653b35ef Kim Phillips 2008-06-23 3533 return 0;
9c4a79653b35ef Kim Phillips 2008-06-23 3534
9c4a79653b35ef Kim Phillips 2008-06-23 3535 err_out:
9c4a79653b35ef Kim Phillips 2008-06-23 3536 talitos_remove(ofdev);
9c4a79653b35ef Kim Phillips 2008-06-23 3537
9c4a79653b35ef Kim Phillips 2008-06-23 3538 return err;
9c4a79653b35ef Kim Phillips 2008-06-23 3539 }
9c4a79653b35ef Kim Phillips 2008-06-23 3540
:::::: The code at line 3328 was first introduced by commit
:::::: 1c48a5c93da63132b92c4bbcd18e690c51539df6 dt: Eliminate of_platform_{,un}register_driver
:::::: TO: Grant Likely <grant.likely(a)secretlab.ca>
:::::: CC: Grant Likely <grant.likely(a)secretlab.ca>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[xlnx:master 425/513] drivers/gpu/drm/xlnx/xlnx_bridge.h:97:15: warning: duplicate 'inline' declaration specifier
by kernel test robot
Hi Jianqiang,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx master
head: 256af411ba94859adc39c4319a269892ab28f4a5
commit: 9d18453b9ae7efad1ab60ce9330182737976af8a [425/513] drm: xlnx: zynqmp: Rebase downstream Display port crtc features
config: riscv-randconfig-r024-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/Xilinx/linux-xlnx/commit/9d18453b9ae7efad1ab60ce933018...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx master
git checkout 9d18453b9ae7efad1ab60ce9330182737976af8a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/xlnx/zynqmp_disp.c:40:
>> drivers/gpu/drm/xlnx/xlnx_bridge.h:97:15: warning: duplicate 'inline' declaration specifier [-Wduplicate-decl-specifier]
static inline inline int xlnx_bridge_helper_init(void)
^
include/linux/compiler_types.h:144:16: note: expanded from macro 'inline'
#define inline inline __gnu_inline __inline_maybe_unused notrace
^
drivers/gpu/drm/xlnx/zynqmp_disp.c:1924:2: error: implicit declaration of function 'zynqmp_dp_set_color' [-Werror,-Wimplicit-function-declaration]
zynqmp_dp_set_color(disp->dpsub->dp, zynqmp_disp_color_enum[id].name);
^
drivers/gpu/drm/xlnx/zynqmp_disp.c:1924:2: note: did you mean 'zynqmp_disp_clr'?
drivers/gpu/drm/xlnx/zynqmp_disp.c:308:13: note: 'zynqmp_disp_clr' declared here
static void zynqmp_disp_clr(void __iomem *base, int offset, u32 clr)
^
drivers/gpu/drm/xlnx/zynqmp_disp.c:2575:2: error: implicit declaration of function 'zynqmp_dp_encoder_mode_set_stream' [-Werror,-Wimplicit-function-declaration]
zynqmp_dp_encoder_mode_set_stream(disp->dpsub->dp, adjusted_mode);
^
drivers/gpu/drm/xlnx/zynqmp_disp.c:2620:20: error: no member named 'external_crtc_attached' in 'struct zynqmp_dpsub'
if (!disp->dpsub->external_crtc_attached)
~~~~~~~~~~~ ^
drivers/gpu/drm/xlnx/zynqmp_disp.c:2756:2: error: implicit declaration of function 'zynqmp_dp_set_color' [-Werror,-Wimplicit-function-declaration]
zynqmp_dp_set_color(disp->dpsub->dp, zynqmp_disp_color_enum[0].name);
^
drivers/gpu/drm/xlnx/zynqmp_disp.c:2767:20: error: no member named 'external_crtc_attached' in 'struct zynqmp_dpsub'
if (!disp->dpsub->external_crtc_attached)
~~~~~~~~~~~ ^
drivers/gpu/drm/xlnx/zynqmp_disp.c:2775:20: error: no member named 'external_crtc_attached' in 'struct zynqmp_dpsub'
if (!disp->dpsub->external_crtc_attached)
~~~~~~~~~~~ ^
drivers/gpu/drm/xlnx/zynqmp_disp.c:2818:19: error: no member named 'external_crtc_attached' in 'struct zynqmp_dpsub'
if (disp->dpsub->external_crtc_attached)
~~~~~~~~~~~ ^
drivers/gpu/drm/xlnx/zynqmp_disp.c:2828:19: error: no member named 'external_crtc_attached' in 'struct zynqmp_dpsub'
if (disp->dpsub->external_crtc_attached && layer->id == ZYNQMP_DISP_LAYER_VID)
~~~~~~~~~~~ ^
1 warning and 8 errors generated.
vim +/inline +97 drivers/gpu/drm/xlnx/xlnx_bridge.h
8942bb49a6afe8 Hyun Kwon 2018-01-23 96
232986daee13b1 Hyun Kwon 2018-02-08 @97 static inline inline int xlnx_bridge_helper_init(void)
8942bb49a6afe8 Hyun Kwon 2018-01-23 98 {
8942bb49a6afe8 Hyun Kwon 2018-01-23 99 return 0;
8942bb49a6afe8 Hyun Kwon 2018-01-23 100 }
8942bb49a6afe8 Hyun Kwon 2018-01-23 101
:::::: The code at line 97 was first introduced by commit
:::::: 232986daee13b17e61a456fd3a0a6419fe05cc83 drm: xlnx: bridge: Fix the multiple definition error
:::::: TO: Hyun Kwon <hyun.kwon(a)xilinx.com>
:::::: CC: Michal Simek <michal.simek(a)xilinx.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [RFC PATCH 06/10] arm64: read thread flags
by kernel test robot
Hi Mark,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on powerpc/next linus/master tip/core/entry v5.13-rc6 next-20210616]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Mark-Rutland/thread_info-use-hel...
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-randconfig-p001-20210615 (attached as .config)
compiler: aarch64-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
# https://github.com/0day-ci/linux/commit/a1022e40673660308b0f52aa06bc5798d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mark-Rutland/thread_info-use-helpers-to-snapshot-thread-flags/20210616-183127
git checkout a1022e40673660308b0f52aa06bc5798d7575eba
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm64/kernel/signal.c:927:17: warning: no previous prototype for 'do_notify_resume' [-Wmissing-prototypes]
927 | asmlinkage void do_notify_resume(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~
arch/arm64/kernel/signal.c: In function 'do_notify_resume':
>> arch/arm64/kernel/signal.c:974:18: error: implicit declaration of function 'read_thead_flags'; did you mean 'read_thread_flags'? [-Werror=implicit-function-declaration]
974 | thread_flags = read_thead_flags();
| ^~~~~~~~~~~~~~~~
| read_thread_flags
cc1: some warnings being treated as errors
vim +974 arch/arm64/kernel/signal.c
926
927 asmlinkage void do_notify_resume(struct pt_regs *regs,
928 unsigned long thread_flags)
929 {
930 do {
931 if (thread_flags & _TIF_NEED_RESCHED) {
932 /* Unmask Debug and SError for the next task */
933 local_daif_restore(DAIF_PROCCTX_NOIRQ);
934
935 schedule();
936 } else {
937 local_daif_restore(DAIF_PROCCTX);
938
939 if (thread_flags & _TIF_UPROBE)
940 uprobe_notify_resume(regs);
941
942 if (thread_flags & _TIF_MTE_ASYNC_FAULT) {
943 clear_thread_flag(TIF_MTE_ASYNC_FAULT);
944 send_sig_fault(SIGSEGV, SEGV_MTEAERR,
945 (void __user *)NULL, current);
946 }
947
948 if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
949 do_signal(regs);
950
951 if (thread_flags & _TIF_NOTIFY_RESUME) {
952 tracehook_notify_resume(regs);
953 rseq_handle_notify_resume(NULL, regs);
954
955 /*
956 * If we reschedule after checking the affinity
957 * then we must ensure that TIF_NOTIFY_RESUME
958 * is set so that we check the affinity again.
959 * Since tracehook_notify_resume() clears the
960 * flag, ensure that the compiler doesn't move
961 * it after the affinity check.
962 */
963 barrier();
964
965 if (cpu_affinity_invalid(regs))
966 force_sig(SIGKILL);
967 }
968
969 if (thread_flags & _TIF_FOREIGN_FPSTATE)
970 fpsimd_restore_current_state();
971 }
972
973 local_daif_mask();
> 974 thread_flags = read_thead_flags();
975 } while (thread_flags & _TIF_WORK_MASK);
976 }
977
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months