* Re: [offlist] Re: Crash in netlink/sk_filter_trim_cap on ARMv7 on 4.18rc1
From: Daniel Borkmann @ 2018-07-05 7:46 UTC (permalink / raw)
To: Russell King - ARM Linux, Peter Robinson
Cc: netdev, labbott, linux-arm-kernel, Eric Dumazet
In-Reply-To: <20180705073120.GU17271@n2100.armlinux.org.uk>
On 07/05/2018 09:31 AM, Russell King - ARM Linux wrote:
> On Thu, Jul 05, 2018 at 12:41:54AM +0100, Russell King - ARM Linux wrote:
>> Subject says offlist, but this isn't...
>>
>> On Wed, Jul 04, 2018 at 08:33:20AM +0100, Peter Robinson wrote:
>>> Sorry for the delay on this from my end. I noticed there was some bpf
>>> bits land in the last net fixes pull request landed Monday so I built
>>> a kernel with the JIT reenabled. It seems it's improved in that the
>>> completely dead no output boot has gone but the original problem that
>>> arrived in the merge window still persists:
>>>
>>> [ 17.564142] note: systemd-udevd[194] exited with preempt_count 1
>>> [ 17.592739] Unable to handle kernel NULL pointer dereference at
>>> virtual address 0000000c
>>> [ 17.601002] pgd = (ptrval)
>>> [ 17.603819] [0000000c] *pgd=00000000
>>> [ 17.607487] Internal error: Oops: 805 [#10] SMP ARM
>>> [ 17.612396] Modules linked in:
>>> [ 17.615484] CPU: 0 PID: 195 Comm: systemd-udevd Tainted: G D
>>> 4.18.0-0.rc3.git1.1.bpf1.fc29.armv7hl #1
>>> [ 17.626056] Hardware name: Generic AM33XX (Flattened Device Tree)
>>> [ 17.632198] PC is at sk_filter_trim_cap+0x218/0x2fc
>>> [ 17.637102] LR is at (null)
>>> [ 17.640086] pc : [<c0ab03b4>] lr : [<00000000>] psr: 60000013
>>> [ 17.646384] sp : cfe1dd48 ip : 00000000 fp : 00000000
>>> [ 17.651635] r10: d837e000 r9 : d833be00 r8 : 00000000
>>> [ 17.656887] r7 : 00000001 r6 : e003d000 r5 : 00000000 r4 : 00000000
>>> [ 17.663447] r3 : 00000007 r2 : 00000000 r1 : 00000000 r0 : 00000000
>>> [ 17.670009] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
>>> [ 17.677180] Control: 10c5387d Table: 8fe20019 DAC: 00000051
>>> [ 17.682956] Process systemd-udevd (pid: 195, stack limit = 0x(ptrval))
>>> [ 17.689518] Stack: (0xcfe1dd48 to 0xcfe1e000)
>>
>> Can you provide a full disassembly of sk_filter_trim_cap from vmlinux
>> (iow, annotated with its linked address) for the above dump please -
>> alternatively a new dump with matching disassembly. Thanks.
>
> Also probably a good idea to have bpf_jit_enable set to 2 to get a
> dump of the bpf program being run, which I think for your problem,
> you'll have to hack the kernel source to do that.
Agree, that would be good as well. You could use something like the below
to bail out to interpreter after JIT did the dump.
Dump will then land in kernel log which you could paste here.
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index f6a62ae..d6a7dfd 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -1844,6 +1844,13 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
/* there are 2 passes here */
bpf_jit_dump(prog->len, image_size, 2, ctx.target);
+ /* Defer to interpreter after dump. */
+ if (1) {
+ bpf_jit_binary_free(header);
+ prog = orig_prog;
+ goto out_imms;
+ }
+
bpf_jit_binary_lock_ro(header);
prog->bpf_func = (void *)ctx.target;
prog->jited = 1;
^ permalink raw reply related
* Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding
From: Xin Long @ 2018-07-05 7:57 UTC (permalink / raw)
To: David Ahern; +Cc: network dev, davem, Davide Caratti, Ido Schimmel
In-Reply-To: <2d75173b-b6f2-974c-32c2-df29bffd6a6a@gmail.com>
On Thu, Jul 5, 2018 at 2:36 AM, David Ahern <dsahern@gmail.com> wrote:
> On 7/4/18 11:56 AM, Xin Long wrote:
>
>>> your commands are not a proper test. The test should succeed and fail
>>> based on the routing lookup, not iptables rules.
>> A proper test can be done easily with netns, as vrf can't isolate much.
>> I don't want to bother forwarding/ directory with netns, so I will probably
>> just drop this selftest, and let the feature patch go first.
>>
>
> BTW, VRF isolates at the routing layer and this is a routing change. We
> need to understand why it does not work with VRF. Perhaps another tweak
> is needed for VRF.
One problem was that the peer may not use the address on the dev
that echo_request comes from as the src IP of echo_reply when the
echo_request's dst IP is broadcast, but try to get another one by
looking up a route without ".flowi4_oif" set. See:
icmp_reply()->fib_compute_spec_dst():
struct flowi4 fl4 = {
.flowi4_iif = LOOPBACK_IFINDEX,
.daddr = ip_hdr(skb)->saddr,
.flowi4_tos = RT_TOS(ip_hdr(skb)->tos),
.flowi4_scope = scope,
.flowi4_mark = IN_DEV_SRC_VMARK(in_dev) ? skb->mark : 0,
};
if (!fib_lookup(net, &fl4, &res, 0))
return FIB_RES_PREFSRC(net, res);
Without ".flowi4_oif" set, it won't match the vrf route. That's why
I had to make h2 NOT into a vrf so that h1 can get the echo_reply.
But it can't tell if this echo_reply is from h2 or r1, as r1's echo_reply
will also use the same src IP which is actually got from main route
space as ".flowi4_oif" is not set.
(hope I this description is clear to you) :)
So i'm not sure if we can do any tweak for VRF.
^ permalink raw reply
* Re: [PATCH v2 0/4] samples/bpf: simple fixes
From: Daniel Borkmann @ 2018-07-05 8:03 UTC (permalink / raw)
To: Taeung Song, Alexei Starovoitov; +Cc: netdev, linux-kernel
In-Reply-To: <20180704133639.11855-1-treeze.taeung@gmail.com>
On 07/04/2018 03:36 PM, Taeung Song wrote:
> v2:
> - in error cases, do return; instead of break; in loop
>
> Hello,
> This patchset fixes trivial things that I found
> when testing 'samples/bpf/' sample code.
> I'd appreciate it, if you review this.
>
> Thanks,
> Taeung
Applied to bpf, thanks Taeung!
^ permalink raw reply
* Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding
From: Xin Long @ 2018-07-05 8:21 UTC (permalink / raw)
To: Ido Schimmel; +Cc: David Ahern, network dev, davem, Davide Caratti
In-Reply-To: <20180704203951.GA24525@splinter>
On Thu, Jul 5, 2018 at 4:39 AM, Ido Schimmel <idosch@idosch.org> wrote:
> On Thu, Jul 05, 2018 at 01:56:23AM +0800, Xin Long wrote:
>> On Wed, Jul 4, 2018 at 3:23 AM, David Ahern <dsahern@gmail.com> wrote:
>> > your commands are not a proper test. The test should succeed and fail
>> > based on the routing lookup, not iptables rules.
>> A proper test can be done easily with netns, as vrf can't isolate much.
>> I don't want to bother forwarding/ directory with netns, so I will probably
>> just drop this selftest, and let the feature patch go first.
>>
>> What do you think?
>
> You can add a tc rule on the ingress of h2 and make sure that in the
> first case ping succeeds and the tc rule wasn't hit. In the second case
> ping should also succeed, but the tc rule should be hit. This is similar
> to your original netns test.
With netns, it will be much easier to use
sysctl net.ipv4.icmp_echo_ignore_broadcasts
to block the echo_request on r1 or h2, and check if ping works.
(this's more like the idea of using 'iptables' above) :D
>
> You can look at tc_flower.sh for reference and in particular at
> tc_check_packets().
This is a way similar idea of using tcpdump, I just feel it's too much,
this test should be an as simple test as route.sh. :)
^ permalink raw reply
* Re: [PATCH v2 08/14] ravb: fix invalid context bug while calling auto-negotiation by ethtool
From: Sergei Shtylyov @ 2018-07-05 8:27 UTC (permalink / raw)
To: Vladimir Zapolskiy, David S . Miller
Cc: Andrew Lunn, Geert Uytterhoeven, netdev, linux-renesas-soc
In-Reply-To: <fe75ec1c-4288-0cd2-e772-5553cadc5430@mentor.com>
Hello!
On 7/5/2018 9:09 AM, Vladimir Zapolskiy wrote:
>> Since commit 35b5f6b1a82b ("PHYLIB: Locking fixes for PHY I/O
>> potentially sleeping") phy_start_aneg() function utilizes a mutex
>> to serialize changes to phy state, however the helper function is
>> called in atomic context.
>>
>> The bug can be reproduced by running "ethtool -r" command, the bug
>> is reported if CONFIG_DEBUG_ATOMIC_SLEEP build option is enabled.
>>
>> Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver")
>
> Here is an invalid commit specified, the proper tag is
>
> Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
I was just going to tell you that. :-)
> --
> Best wishes,
> Vladimir
MBR, Sergei
^ permalink raw reply
* Re: [PATCH net-next 05/18] tls: Refactor tls_offload variable names
From: kbuild test robot @ 2018-07-05 8:29 UTC (permalink / raw)
To: Boris Pismenny
Cc: kbuild-all, davem, netdev, davejwatson, aviadye, borisp, saeedm
In-Reply-To: <1530711161-14578-6-git-send-email-borisp@mellanox.com>
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]
Hi Boris,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704
config: x86_64-randconfig-s0-07051307 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
Note: the linux-review/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704 HEAD fbaef8a3b3a3283de49a7171144b7471e5c780d9 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
net//tls/tls_device.c: In function 'tls_device_free_ctx':
>> net//tls/tls_device.c:55:22: error: 'TLS_HW' undeclared (first use in this function)
if (ctx->tx_conf == TLS_HW)
^~~~~~
net//tls/tls_device.c:55:22: note: each undeclared identifier is reported only once for each function it appears in
vim +/TLS_HW +55 net//tls/tls_device.c
52
53 static void tls_device_free_ctx(struct tls_context *ctx)
54 {
> 55 if (ctx->tx_conf == TLS_HW)
56 kfree(tls_offload_ctx_tx(ctx));
57
58 kfree(ctx);
59 }
60
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27042 bytes --]
^ permalink raw reply
* Re: [PATCH net-next 05/18] tls: Refactor tls_offload variable names
From: kbuild test robot @ 2018-07-05 8:29 UTC (permalink / raw)
To: Boris Pismenny
Cc: kbuild-all, davem, netdev, davejwatson, aviadye, borisp, saeedm
In-Reply-To: <1530711161-14578-6-git-send-email-borisp@mellanox.com>
[-- Attachment #1: Type: text/plain, Size: 23063 bytes --]
Hi Boris,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=ia64
Note: the linux-review/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704 HEAD fbaef8a3b3a3283de49a7171144b7471e5c780d9 builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
net/tls/tls_device.c: In function 'tls_device_free_ctx':
>> net/tls/tls_device.c:55:22: error: 'TLS_HW' undeclared (first use in this function); did you mean 'TLS_TX'?
if (ctx->tx_conf == TLS_HW)
^~~~~~
TLS_TX
net/tls/tls_device.c:55:22: note: each undeclared identifier is reported only once for each function it appears in
--
In file included from drivers/net/ethernet//mellanox/mlx5/core/en_main.c:45:
>> drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:53:29: error: field 'base' has incomplete type
struct tls_offload_context base;
^~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from include/net/sch_generic.h:5,
from include/net/act_api.h:9,
from include/net/tc_act/tc_gact.h:5,
from drivers/net/ethernet//mellanox/mlx5/core/en_main.c:33:
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h: In function 'mlx5e_get_tls_tx_context':
>> drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:62:8: error: 'TLS_OFFLOAD_CONTEXT_SIZE' undeclared (first use in this function); did you mean 'TLS_OFFLOAD_CONTEXT_SIZE_TX'?
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:62:8: note: each undeclared identifier is reported only once for each function it appears in
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
In file included from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from include/net/sch_generic.h:5,
from include/net/act_api.h:9,
from include/net/tc_act/tc_gact.h:5,
from drivers/net/ethernet//mellanox/mlx5/core/en_main.c:33:
>> drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:63:22: error: implicit declaration of function 'tls_offload_ctx'; did you mean 'tls_offload_ctx_tx'? [-Werror=implicit-function-declaration]
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~~~~
include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
>> include/linux/kernel.h:963:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
void *__mptr = (void *)(ptr); \
^
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from include/net/sch_generic.h:5,
from include/net/act_api.h:9,
from include/net/tc_act/tc_gact.h:5,
from drivers/net/ethernet//mellanox/mlx5/core/en_main.c:33:
>> include/linux/kernel.h:964:32: error: invalid type argument of unary '*' (have 'int')
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:964:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
include/linux/kernel.h:965:18: error: invalid type argument of unary '*' (have 'int')
!__same_type(*(ptr), void), \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:965:6: note: in expansion of macro '__same_type'
!__same_type(*(ptr), void), \
^~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.c:36:
>> drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:53:29: error: field 'base' has incomplete type
struct tls_offload_context base;
^~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.c:34:
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h: In function 'mlx5e_get_tls_tx_context':
>> drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:62:8: error: 'TLS_OFFLOAD_CONTEXT_SIZE' undeclared (first use in this function); did you mean 'TLS_OFFLOAD_CONTEXT_SIZE_TX'?
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:62:8: note: each undeclared identifier is reported only once for each function it appears in
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
In file included from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.c:34:
>> drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:63:22: error: implicit declaration of function 'tls_offload_ctx'; did you mean 'tls_offload_ctx_tx'? [-Werror=implicit-function-declaration]
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~~~~
include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
>> include/linux/kernel.h:963:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
void *__mptr = (void *)(ptr); \
^
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.c:34:
>> include/linux/kernel.h:964:32: error: invalid type argument of unary '*' (have 'int')
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:964:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
include/linux/kernel.h:965:18: error: invalid type argument of unary '*' (have 'int')
!__same_type(*(ptr), void), \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:965:6: note: in expansion of macro '__same_type'
!__same_type(*(ptr), void), \
^~~~~~~~~~~
drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
In file included from drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.c:36:
>> drivers/net/ethernet//mellanox/mlx5/core/en_accel/tls.h:66:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
--
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:36:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:53:29: error: field 'base' has incomplete type
struct tls_offload_context base;
^~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h: In function 'mlx5e_get_tls_tx_context':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: error: 'TLS_OFFLOAD_CONTEXT_SIZE' undeclared (first use in this function); did you mean 'TLS_OFFLOAD_CONTEXT_SIZE_TX'?
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: note: each undeclared identifier is reported only once for each function it appears in
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
In file included from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:22: error: implicit declaration of function 'tls_offload_ctx'; did you mean 'tls_offload_ctx_tx'? [-Werror=implicit-function-declaration]
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~~~~
include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
>> include/linux/kernel.h:963:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
void *__mptr = (void *)(ptr); \
^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
>> include/linux/kernel.h:964:32: error: invalid type argument of unary '*' (have 'int')
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:964:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
include/linux/kernel.h:965:18: error: invalid type argument of unary '*' (have 'int')
!__same_type(*(ptr), void), \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:965:6: note: in expansion of macro '__same_type'
!__same_type(*(ptr), void), \
^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:36:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:66:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
..
vim +55 net/tls/tls_device.c
52
53 static void tls_device_free_ctx(struct tls_context *ctx)
54 {
> 55 if (ctx->tx_conf == TLS_HW)
56 kfree(tls_offload_ctx_tx(ctx));
57
58 kfree(ctx);
59 }
60
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50938 bytes --]
^ permalink raw reply
* Re: [PATCH net-next 09/18] tls: Add rx inline crypto offload
From: kbuild test robot @ 2018-07-05 8:29 UTC (permalink / raw)
To: Boris Pismenny
Cc: kbuild-all, davem, netdev, davejwatson, aviadye, borisp, saeedm
In-Reply-To: <1530711161-14578-10-git-send-email-borisp@mellanox.com>
[-- Attachment #1: Type: text/plain, Size: 3061 bytes --]
Hi Boris,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704
config: x86_64-randconfig-s1-07051503 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
net//tls/tls_sw.c: In function 'decrypt_skb_update':
>> net//tls/tls_sw.c:685:9: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
return err;
^~~
vim +/err +685 net//tls/tls_sw.c
c46234eb Dave Watson 2018-03-22 659
13000621 Boris Pismenny 2018-07-04 660 static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
13000621 Boris Pismenny 2018-07-04 661 struct scatterlist *sgout)
13000621 Boris Pismenny 2018-07-04 662 {
13000621 Boris Pismenny 2018-07-04 663 struct tls_context *tls_ctx = tls_get_ctx(sk);
13000621 Boris Pismenny 2018-07-04 664 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
13000621 Boris Pismenny 2018-07-04 665 struct strp_msg *rxm = strp_msg(skb);
13000621 Boris Pismenny 2018-07-04 666 int err;
13000621 Boris Pismenny 2018-07-04 667
52ffb3bf Boris Pismenny 2018-07-04 668 #ifdef CONFIG_TLS_DEVICE
52ffb3bf Boris Pismenny 2018-07-04 669 err = tls_device_decrypted(sk, skb);
52ffb3bf Boris Pismenny 2018-07-04 670 if (err < 0)
52ffb3bf Boris Pismenny 2018-07-04 671 return err;
52ffb3bf Boris Pismenny 2018-07-04 672 #endif
52ffb3bf Boris Pismenny 2018-07-04 673 if (!ctx->decrypted) {
13000621 Boris Pismenny 2018-07-04 674 err = decrypt_skb(sk, skb, sgout);
13000621 Boris Pismenny 2018-07-04 675 if (err < 0)
13000621 Boris Pismenny 2018-07-04 676 return err;
52ffb3bf Boris Pismenny 2018-07-04 677 }
13000621 Boris Pismenny 2018-07-04 678
13000621 Boris Pismenny 2018-07-04 679 rxm->offset += tls_ctx->rx.prepend_size;
13000621 Boris Pismenny 2018-07-04 680 rxm->full_len -= tls_ctx->rx.overhead_size;
13000621 Boris Pismenny 2018-07-04 681 tls_advance_record_sn(sk, &tls_ctx->rx);
13000621 Boris Pismenny 2018-07-04 682 ctx->decrypted = true;
13000621 Boris Pismenny 2018-07-04 683 ctx->saved_data_ready(sk);
13000621 Boris Pismenny 2018-07-04 684
13000621 Boris Pismenny 2018-07-04 @685 return err;
13000621 Boris Pismenny 2018-07-04 686 }
13000621 Boris Pismenny 2018-07-04 687
:::::: The code at line 685 was first introduced by commit
:::::: 1300062159ee8551834a4371379b82abe20f436e tls: Split decrypt_skb to two functions
:::::: TO: Boris Pismenny <borisp@mellanox.com>
:::::: CC: 0day robot <lkp@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31348 bytes --]
^ permalink raw reply
* Re: [PATCH net-next 09/18] tls: Add rx inline crypto offload
From: kbuild test robot @ 2018-07-05 8:29 UTC (permalink / raw)
To: Boris Pismenny
Cc: kbuild-all, davem, netdev, davejwatson, aviadye, borisp, saeedm
In-Reply-To: <1530711161-14578-10-git-send-email-borisp@mellanox.com>
[-- Attachment #1: Type: text/plain, Size: 16360 bytes --]
Hi Boris,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=ia64
Note: the linux-review/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704 HEAD fbaef8a3b3a3283de49a7171144b7471e5c780d9 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:45:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:53:29: error: field 'base' has incomplete type
struct tls_offload_context base;
^~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from include/net/sch_generic.h:5,
from include/net/act_api.h:9,
from include/net/tc_act/tc_gact.h:5,
from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:33:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h: In function 'mlx5e_get_tls_tx_context':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: error: 'TLS_OFFLOAD_CONTEXT_SIZE' undeclared (first use in this function); did you mean 'TLS_OFFLOAD_CONTEXT_SIZE_TX'?
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: note: each undeclared identifier is reported only once for each function it appears in
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
In file included from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from include/net/sch_generic.h:5,
from include/net/act_api.h:9,
from include/net/tc_act/tc_gact.h:5,
from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:33:
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:22: error: implicit declaration of function 'tls_offload_ctx'; did you mean 'tls_offload_ctx_rx'? [-Werror=implicit-function-declaration]
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~~~~
include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
include/linux/kernel.h:963:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
void *__mptr = (void *)(ptr); \
^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from include/net/sch_generic.h:5,
from include/net/act_api.h:9,
from include/net/tc_act/tc_gact.h:5,
from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:33:
include/linux/kernel.h:964:32: error: invalid type argument of unary '*' (have 'int')
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:964:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
include/linux/kernel.h:965:18: error: invalid type argument of unary '*' (have 'int')
!__same_type(*(ptr), void), \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:965:6: note: in expansion of macro '__same_type'
!__same_type(*(ptr), void), \
^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:36:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:53:29: error: field 'base' has incomplete type
struct tls_offload_context base;
^~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h: In function 'mlx5e_get_tls_tx_context':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: error: 'TLS_OFFLOAD_CONTEXT_SIZE' undeclared (first use in this function); did you mean 'TLS_OFFLOAD_CONTEXT_SIZE_TX'?
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: note: each undeclared identifier is reported only once for each function it appears in
TLS_OFFLOAD_CONTEXT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
^~~~~~~~~~~~
In file included from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:22: error: implicit declaration of function 'tls_offload_ctx'; did you mean 'tls_offload_ctx_rx'? [-Werror=implicit-function-declaration]
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~~~~
include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
include/linux/kernel.h:963:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
void *__mptr = (void *)(ptr); \
^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
include/linux/kernel.h:964:32: error: invalid type argument of unary '*' (have 'int')
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:964:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
include/linux/kernel.h:965:18: error: invalid type argument of unary '*' (have 'int')
!__same_type(*(ptr), void), \
^~~~~~
include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:965:6: note: in expansion of macro '__same_type'
!__same_type(*(ptr), void), \
^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in expansion of macro 'container_of'
return container_of(tls_offload_ctx(tls_ctx),
^~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:36:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:66:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +63 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h
c83294b9 Ilya Lesokhin 2018-04-30 57
c83294b9 Ilya Lesokhin 2018-04-30 58 static inline struct mlx5e_tls_offload_context *
c83294b9 Ilya Lesokhin 2018-04-30 59 mlx5e_get_tls_tx_context(struct tls_context *tls_ctx)
c83294b9 Ilya Lesokhin 2018-04-30 60 {
c83294b9 Ilya Lesokhin 2018-04-30 @61 BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
c83294b9 Ilya Lesokhin 2018-04-30 62 TLS_OFFLOAD_CONTEXT_SIZE);
c83294b9 Ilya Lesokhin 2018-04-30 @63 return container_of(tls_offload_ctx(tls_ctx),
c83294b9 Ilya Lesokhin 2018-04-30 64 struct mlx5e_tls_offload_context,
c83294b9 Ilya Lesokhin 2018-04-30 65 base);
c83294b9 Ilya Lesokhin 2018-04-30 66 }
c83294b9 Ilya Lesokhin 2018-04-30 67
:::::: The code at line 63 was first introduced by commit
:::::: c83294b9efa51e19b582a5962e1366196f684dba net/mlx5e: TLS, Add Innova TLS TX support
:::::: TO: Ilya Lesokhin <ilyal@mellanox.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50928 bytes --]
^ permalink raw reply
* [PATCH][next] net: dsa: fix spelling mistake "waitting" -> "waiting"
From: Colin King @ 2018-07-05 8:30 UTC (permalink / raw)
To: Andrew Lunn, Vivien Didelot, Florian Fainelli, David S . Miller,
netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistake in dev_err error message.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/dsa/vitesse-vsc73xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/vitesse-vsc73xx.c b/drivers/net/dsa/vitesse-vsc73xx.c
index a4fc260006de..3bbd86084119 100644
--- a/drivers/net/dsa/vitesse-vsc73xx.c
+++ b/drivers/net/dsa/vitesse-vsc73xx.c
@@ -930,7 +930,7 @@ static void vsc73xx_adjust_link(struct dsa_switch *ds, int port,
VSC73XX_ARBEMPTY, &val);
if (--maxloop == 0) {
dev_err(vsc->dev,
- "timeout waitting for block arbiter\n");
+ "timeout waiting for block arbiter\n");
/* Continue anyway */
break;
}
--
2.17.1
^ permalink raw reply related
* Re: [PATCH bpf-next 11/11] tools: bpftool: allow reuse of maps with bpftool prog load
From: Daniel Borkmann @ 2018-07-05 8:35 UTC (permalink / raw)
To: Jakub Kicinski, alexei.starovoitov; +Cc: oss-drivers, netdev
In-Reply-To: <20180704025417.8848-12-jakub.kicinski@netronome.com>
On 07/04/2018 04:54 AM, Jakub Kicinski wrote:
> Add map parameter to prog load which will allow reuse of existing
> maps instead of creating new ones.
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
[...]
> +
> + fd = map_parse_fd(&argc, &argv);
> + if (fd < 0)
> + goto err_free_reuse_maps;
> +
> + map_replace = reallocarray(map_replace, old_map_fds + 1,
> + sizeof(*map_replace));
> + if (!map_replace) {
> + p_err("mem alloc failed");
> + goto err_free_reuse_maps;
Series in general looks good to me. However, above reallocarray() doesn't
exist and hence build fails, please see below. Is that from newest glibc?
You probably need some fallback implementation or in general have something
bpftool internal that doesn't make a bet on its availability.
# make
Auto-detecting system features:
... libbfd: [ on ]
... disassembler-four-args: [ OFF ]
CC bpf_jit_disasm.o
LINK bpf_jit_disasm
CC bpf_dbg.o
LINK bpf_dbg
CC bpf_asm.o
BISON bpf_exp.yacc.c
CC bpf_exp.yacc.o
FLEX bpf_exp.lex.c
CC bpf_exp.lex.o
LINK bpf_asm
DESCEND bpftool
Auto-detecting system features:
... libbfd: [ on ]
... disassembler-four-args: [ OFF ]
CC map_perf_ring.o
CC xlated_dumper.o
CC perf.o
CC prog.o
prog.c: In function ‘do_load’:
prog.c:785:18: warning: implicit declaration of function ‘reallocarray’ [-Wimplicit-function-declaration]
map_replace = reallocarray(map_replace, old_map_fds + 1,
^~~~~~~~~~~~
prog.c:785:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
map_replace = reallocarray(map_replace, old_map_fds + 1,
^
CC common.o
CC cgroup.o
CC main.o
CC json_writer.o
CC cfg.o
CC map.o
CC jit_disasm.o
CC disasm.o
Auto-detecting system features:
... libelf: [ on ]
... bpf: [ on ]
Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
CC libbpf.o
CC bpf.o
CC nlattr.o
CC btf.o
LD libbpf-in.o
LINK libbpf.a
LINK bpftool
prog.o: In function `do_load':
prog.c:(.text+0x23d): undefined reference to `reallocarray'
collect2: error: ld returned 1 exit status
Makefile:89: recipe for target 'bpftool' failed
make[1]: *** [bpftool] Error 1
Makefile:99: recipe for target 'bpftool' failed
make: *** [bpftool] Error 2
Thanks,
Daniel
^ permalink raw reply
* RE: [RFC net-next 15/15] net: lora: Add Semtech SX1301
From: Ben Whitten @ 2018-07-05 8:43 UTC (permalink / raw)
To: Andreas Färber
Cc: Mark Brown, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Jian-Hong Pan, Jiri Pirko,
Marcel Holtmann, David S . Miller, Matthias Brugger, Janus Piwek,
Michael Röder, Dollar Chen, Ken Yu, Steve deRosier,
linux-spi@vger.kernel.org, LoRa_Community_Support@semtech.com
In-Reply-To: <8d514feb-41c7-8ec4-ace2-94e627187a0b@suse.de>
> Subject: Re: [RFC net-next 15/15] net: lora: Add Semtech SX1301
>
> Hi Ben,
>
> Am 02.07.2018 um 22:43 schrieb Ben Whitten:
> >> 2) This SPI device is in turn exposing the two SPI masters that you
> >> already found below, and I didn't see a sane way to split that code out
> >> into drivers/spi/, so it's in drivers/net/lora/ here - has there been
> >> any precedence either way?
> >
> > In my work in progress driver I just register one controller for the sx1301
> with two chip selects and use the chip select information to choose the
> correct radio to send to, this is based on the DT reg information. No need to
> register two separate masters.
>
> I had considered that and discarded it. The SX1301 has not just two CS
> registers though but also two pairs of addr, data registers. That speaks
> for two masters with a single chip-select each, unless I'm
> misunderstanding the meaning of the registers.
Based on Marks suggestion I am experimenting with using the SX1301 to expose a regmap_bus that the underlying SX1257 can attach to, so the radio has a core component, a SPI component for direct connection and this concentrator connection component.
> >> Am 02.07.2018 um 18:12 schrieb Mark Brown:
> >>> On Sun, Jul 01, 2018 at 01:08:04PM +0200, Andreas Färber wrote:
> >>>
> >>>> +static void sx1301_radio_spi_set_cs(struct spi_device *spi, bool
> enable)
> >>>> +{
> >>>> + int ret;
> >>>> +
> >>>> + dev_dbg(&spi->dev, "setting SPI CS to %s\n", enable ? "1" : "0");
> >>>> +
> >>>> + if (enable)
> >>>> + return;
> >>>> +
> >>>> + ret = sx1301_radio_set_cs(spi->controller, enable);
> >>>> + if (ret)
> >>>> + dev_warn(&spi->dev, "failed to write CS (%d)\n", ret);
> >>>> +}
> >>>
> >>> So we never disable chip select?
> >>
> >> Not here, I instead did that in transfer_one below.
> >>
> >> Unfortunately there seems to be no documentation, only reference
> code:
> >>
> >> https://github.com/Lora-
> >> net/lora_gateway/blob/master/libloragw/src/loragw_radio.c#L121
> >> https://github.com/Lora-
> >> net/lora_gateway/blob/master/libloragw/src/loragw_radio.c#L165
> >>
> >> It sets CS to 0 before writing to address and data registers, then
> >> immediately sets CS to 1 and back to 0 before reading or ending the
> >> write transaction. I've tried to force the same behavior in this driver.
> >> My guess was that CS is high-active during the short 1-0 cycle, because
> >> if it's low-active during the register writes then why the heck is it
> >> set to 0 again in the end instead of keeping at 1... confusing.
> >>
> >> Maybe the Semtech folks CC'ed can comment how these registers work?
> >>
> >>>> + if (tx_buf) {
> >>>> + ret = sx1301_write(ssx->parent, ssx->regs +
> >> REG_RADIO_X_ADDR, tx_buf ? tx_buf[0] : 0);
> >>>
> >>> This looks confused. We're in an if (tx_buf) block but there's a use of
> >>> the ternery operator that appears to be checking if we have a tx_buf?
> >>
> >> Yeah, as mentioned this RFC is not ready for merging - checkpatch.pl
> >> will complain about lines too long, and TODOs are sprinkled all over or
> >> not even mentioned. It's a Proof of Concept that a net_device could work
> >> for a wide range of spi and serdev based drivers, and on top this device
> >> has more than one channel, which may influence network-level design
> >> discussions.
> >>
> >> That said, I'll happily drop the second check. Thanks for spotting!
> >>
> >>>> + if (ret) {
> >>>> + dev_err(&spi->dev, "SPI radio address write
> >> failed\n");
> >>>> + return ret;
> >>>> + }
> >>>> +
> >>>> + ret = sx1301_write(ssx->parent, ssx->regs +
> >> REG_RADIO_X_DATA, (tx_buf && xfr->len >= 2) ? tx_buf[1] : 0);
> >>>> + if (ret) {
> >>>> + dev_err(&spi->dev, "SPI radio data write failed\n");
> >>>> + return ret;
> >>>> + }
> >>>
> >>> This looks awfully like you're coming in at the wrong abstraction layer
> >>> and the hardware actually implements a register abstraction rather than
> >>> a SPI one so you should be using regmap as the abstraction.
> >>
> >> I don't understand. Ben has suggested using regmap for the SPI _device_
> >> that we're talking to, which may be a good idea. But this SX1301 device
> >> in turn has two SPI _masters_ talking to an SX125x slave each. I don't
> >> see how using regmap instead of my wrappers avoids this spi_controller?
> >> The whole point of this spi_controller is to abstract and separate the
> >> SX1255 vs. SX1257 vs. whatever-radio-attached into a separate driver,
> >> instead of mixing it into the SX1301 driver - to me that looks cleaner
> >> and more extensible. It also has the side-effect that we could configure
> >> the two radios via DT (frequencies, clk output, etc.).
> >
> > You want an SPI controller in the SX1301 as the down stream radios are SPI
> and could be attached directly to a host SPI bus, makes sense to have one
> radio driver and talk through the SX1301.
> > But you should use the regmap to access the SX1301 master controller
> registers.
> > Example I use with one SPI master and some clock info:
> > eg:
> > sx1301: sx1301@0 {
>
> Node names should not repeat the chipset, that goes into compatible.
>
> lora-concentrator@0?
>
Sure
> > compatible = "semtech,sx1301";
> > reg = <0>;
> > #address-cells = <1>;
> > #size-cells = <0>;
>
> I would still find it cleaner to have (a) sub-node(s) for the radios.
How do you mean?
> > spi-max-frequency = <8000000>;
>
> Datasheet says 10 MHz, why 8 MHz?
>
> > gpios-reset = <&pioA 26 GPIO_ACTIVE_HIGH>;
>
> reset-gpios?
Agreed, this seems more common.
> > clocks = <&radio1 0>, <&clkhs 0>;
> > clock-names = "clk32m", "clkhs";
> >
> > radio0: sx1257@0 {
>
> lora@0?
>
> > compatible = "semtech,sx125x";
>
> No wildcards in bindings please, use concrete "semtech,sx1257".
Sure
> > reg = <0>;
> > spi-max-frequency = <8000000>;
>
> Datasheet says 10 ns - I reported to Semtech that it should probably say
> 10 MHz, too.
>
> > tx;
>
> Might we configure that on the sx1301 instead?
Well the ability for a radio to TX is a radio property really. It depends on the board which chain has the PAs on. I don’t think that its appropriate to configure this at the concentrator, it can instead discover this from the radios.
> > clocks = <&tcxo 0>;
> > clock-names = "tcxo";
> > };
> >
> > radio1: sx1257@1 {
> > compatible = "semtech,sx125x";
> > reg = <1>;
> > spi-max-frequency = <8000000>;
> > #clock-cells = <0>;
> > clocks = <&tcxo 0>;
> > clock-names = "tcxo";
> > clock-output-names = "clk32m";
> > };
> > };
> [snip]
>
> Regards,
> Andreas
>
> --
> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)
^ permalink raw reply
* Re: [PATCH] atm: Preserve value of skb->truesize when accounting to vcc
From: David Woodhouse @ 2018-07-05 8:44 UTC (permalink / raw)
To: David Miller; +Cc: eric.dumazet, netdev, ldir
In-Reply-To: <20180616.162742.1463441699843402015.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 782 bytes --]
On Sat, 2018-06-16 at 16:27 -0700, David Miller wrote:
> From: "David Woodhouse" <dwmw2@infradead.org>
> Date: Sat, 16 Jun 2018 20:52:33 -0000
>
> >> This Fixes tag shoots the messenger really.
> >>
> >> I suggest to instead use :
> >>
> >> Fixes: 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()")
> >
> >
> > Oh, I hadn't realised how recent that was. Sure, let's blame you instead :)
>
> Patch applied with adjusted Fixes: tag, and queued up for -stable.
Thanks.... gentle prod about the "stable" part of that. OpenWRT is
lining up for a release it'd be good to ingest the patch properly if
possible.
I periodically whine at them about the number of outstanding patches
not in upstream. It helps if one of them doesn't have my name on :)
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5213 bytes --]
^ permalink raw reply
* [PATCH net-next] net: dsa: vsc73xx: Make some functions static
From: Wei Yongjun @ 2018-07-05 8:59 UTC (permalink / raw)
To: Andrew Lunn, Vivien Didelot, Florian Fainelli, Linus Walleij
Cc: Wei Yongjun, netdev, kernel-janitors
Fixes the following sparse warnings:
drivers/net/dsa/vitesse-vsc73xx.c:1054:6: warning:
symbol 'vsc73xx_get_strings' was not declared. Should it be static?
drivers/net/dsa/vitesse-vsc73xx.c:1113:5: warning:
symbol 'vsc73xx_get_sset_count' was not declared. Should it be static?
drivers/net/dsa/vitesse-vsc73xx.c:1122:6: warning:
symbol 'vsc73xx_get_ethtool_stats' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/dsa/vitesse-vsc73xx.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/vitesse-vsc73xx.c b/drivers/net/dsa/vitesse-vsc73xx.c
index a4fc260..d4ea5cd 100644
--- a/drivers/net/dsa/vitesse-vsc73xx.c
+++ b/drivers/net/dsa/vitesse-vsc73xx.c
@@ -1051,8 +1051,8 @@ static void vsc73xx_port_disable(struct dsa_switch *ds, int port,
return NULL;
}
-void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
- uint8_t *data)
+static void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
+ uint8_t *data)
{
const struct vsc73xx_counter *cnt;
struct vsc73xx *vsc = ds->priv;
@@ -1110,7 +1110,7 @@ void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
}
}
-int vsc73xx_get_sset_count(struct dsa_switch *ds, int port, int sset)
+static int vsc73xx_get_sset_count(struct dsa_switch *ds, int port, int sset)
{
/* We only support SS_STATS */
if (sset != ETH_SS_STATS)
@@ -1119,7 +1119,8 @@ int vsc73xx_get_sset_count(struct dsa_switch *ds, int port, int sset)
return 8;
}
-void vsc73xx_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data)
+static void vsc73xx_get_ethtool_stats(struct dsa_switch *ds, int port,
+ uint64_t *data)
{
struct vsc73xx *vsc = ds->priv;
u8 regs[] = {
^ permalink raw reply related
* [PATCH net-next] net: aquantia: Make some functions static
From: Wei Yongjun @ 2018-07-05 9:00 UTC (permalink / raw)
To: Igor Russkikh, Pavel Belous, Wei Yongjun; +Cc: netdev, kernel-janitors
Fixes the following sparse warnings:
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:525:5: warning:
symbol 'hw_atl_utils_mpi_set_speed' was not declared. Should it be static?
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:536:5: warning:
symbol 'hw_atl_utils_mpi_set_state' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
index e1feba5..c965e65 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
@@ -522,7 +522,7 @@ void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self,
err_exit:;
}
-int hw_atl_utils_mpi_set_speed(struct aq_hw_s *self, u32 speed)
+static int hw_atl_utils_mpi_set_speed(struct aq_hw_s *self, u32 speed)
{
u32 val = aq_hw_read_reg(self, HW_ATL_MPI_CONTROL_ADR);
@@ -533,8 +533,8 @@ int hw_atl_utils_mpi_set_speed(struct aq_hw_s *self, u32 speed)
return 0;
}
-int hw_atl_utils_mpi_set_state(struct aq_hw_s *self,
- enum hal_atl_utils_fw_state_e state)
+static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self,
+ enum hal_atl_utils_fw_state_e state)
{
int err = 0;
u32 transaction_id = 0;
^ permalink raw reply related
* RE: [RFC net-next 15/15] net: lora: Add Semtech SX1301
From: Ben Whitten @ 2018-07-05 8:59 UTC (permalink / raw)
To: Andreas Färber
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Jian-Hong Pan, Jiri Pirko,
Marcel Holtmann, David S . Miller, Matthias Brugger, Janus Piwek,
Michael Röder, Dollar Chen, Ken Yu, Steve deRosier,
Mark Brown, linux-spi@vger.kernel.org, Hasnain Virk
In-Reply-To: <c68e5336-1647-e0e4-0a1d-3efdcfb4fe9c@suse.de>
> Subject: Re: [RFC net-next 15/15] net: lora: Add Semtech SX1301
>
> Hi Ben,
>
> Am 02.07.2018 um 13:51 schrieb Ben Whitten:
> > Excellent work on doing this I have also been working on and off
> > this personally for some time.
>
> Thanks. Colliding work is always unfortunate, I can relate...
>
> > Have a look at my repository [1] for sx1301 and sx1257 drivers,
> > I use regmaps capability of switching pages which should simplify
> > your driver considerably, I also have a full register map and bit field.
>
> Please note that my lora-next branch already has bug fixes and cleanups
> over this patch. The probe error handling was broken, and I implemented
> wrappers for paged reads and writes as well as burst modes, plus the
> firmware loading.
>
> https://github.com/afaerber/linux/commits/lora-next
>
> I took a quick look at your sx1257 and noticed you licensed it as GPLv2.
> Is there any particular reason for that? Since I wrote my driver without
> copying from GPLv2 code, I prefer the less restrictive GPLv2+.
As I was learning about regmap usage and how SPI devices connect to the bus I adopted the most common licence employed in these kernel files, seemed appropriate.
Ultimately I don’t want a licence choice to hamper inclusion to mainline, not a lawyer I don’t find that fun.
>
> So far a work day has passed with no maintainer objecting to or
> commenting on the underlying PF_LORA network layer design. Meanwhile
> there's already three of us with code and more people have inquired
> about testing and contributing, so I'm thinking about setting up a
> staging tree on kernel.org to collaborate on...
>
> Would you be willing to contribute your regmap ideas to my driver as a
> patch to squash? Needs a Signed-off-by of course, which your GitHub
> commits are lacking, so I can't merge them on my own.
I'm sure whichever way we merge it, yours to mine / mine to yours, we can work together on it.
As I already have regmap running and mostly split out SX1257 drivers to Marks suggestions avoiding the extra SPI layer it may by easier to port the various functions you have to mine and share authorship.
> > I have also been trying to use the clk framework to capture the various
> > routing that the cards have.
>
> I thought about clk too, but won't that cause name conflicts when
> probing multiple concentrators? Would be nice to use that for
> configuring the SX1257 clock output instead of my current hack.
Potentially, it maybe that we need to augment the names of the clk with the CS of the concentrator in use.
Or maybe the radio only searches the clk's of its parent device...
I've not explored this area to far yet but there will be a solution I'm sure.
> Another thought I haven't investigated yet is whether we could use
> remoteproc for ARB and AGC. I would at least prefer to have the firmware
> as a binary loaded via the usual request_firmware(), not as byte array.
> But then again the AGC gets firmware loaded twice, so maybe too complex
> for remoteproc.
>
> BTW do you have any insights on what MCU is in there? Would be nice to
> understand in form of source code what the firmware is doing, to avoid
> the hard dependency on a specific firmware version (imagine user
> updating kernel-firmware - containing versions X,Y,Z - and kernel and
> booting two different kernel versions, the older one stops working).
I'm afraid no insight into the internals of this chip, some good guesswork but I think a firmware blob is something we are going to have to live with for the time being.
> https://www.thethingsnetwork.org/forum/t/secret-price-of-a-lora-
> gateway/5730/74
>
> Regards,
> Andreas
>
> > I will dig into this series this evening.
> >
> > [1] https://github.com/BWhitten/linux-
> stable/tree/971aadc8fdfe842020d912449bdd71b33d576fe3/drivers/net/lora
> [...]
> >> diff --git a/drivers/net/lora/sx1301.c b/drivers/net/lora/sx1301.c
> >> new file mode 100644
> >> index 000000000000..5c936c1116d1
> >> --- /dev/null
> >> +++ b/drivers/net/lora/sx1301.c
> >> @@ -0,0 +1,446 @@
> >> +// SPDX-License-Identifier: GPL-2.0-or-later
> [snip]
Ben
^ permalink raw reply
* [PATCH] net: socionext: remove redundant pointer ndev
From: Colin King @ 2018-07-05 9:26 UTC (permalink / raw)
To: Jassi Brar, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer ndev is being assigned but is never used hence it is
redundant and can be removed.
Cleans up clang warning:
warning: variable 'ndev' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/socionext/netsec.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index e080d3e7c582..01589b6982e4 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -780,11 +780,9 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget)
static int netsec_napi_poll(struct napi_struct *napi, int budget)
{
struct netsec_priv *priv;
- struct net_device *ndev;
int tx, rx, done, todo;
priv = container_of(napi, struct netsec_priv, napi);
- ndev = priv->ndev;
todo = budget;
do {
--
2.17.1
^ permalink raw reply related
* [PATCH] net: ethernet: sun: remove redundant variables adv and lpa
From: Colin King @ 2018-07-05 9:37 UTC (permalink / raw)
To: David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variables adv and lpa are being assigned but are never used hence they
are redundant and can be removed.
Cleans up clang warnings:
warning: variable 'lpa' set but not used [-Wunused-but-set-variable]
warning: variable 'adv' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/sun/niu.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 88c12474a0c3..2d6b62c6d9ab 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -1225,17 +1225,13 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p)
bmsr = err;
if (bmsr & BMSR_LSTATUS) {
- u16 adv, lpa;
-
err = mii_read(np, np->phy_addr, MII_ADVERTISE);
if (err < 0)
goto out;
- adv = err;
err = mii_read(np, np->phy_addr, MII_LPA);
if (err < 0)
goto out;
- lpa = err;
err = mii_read(np, np->phy_addr, MII_ESTATUS);
if (err < 0)
--
2.17.1
^ permalink raw reply related
* Re: [PATCH] net: ethernet: sun: remove redundant variables adv and lpa
From: Dan Carpenter @ 2018-07-05 9:52 UTC (permalink / raw)
To: Colin King; +Cc: David S . Miller, netdev, kernel-janitors, linux-kernel
In-Reply-To: <20180705093732.21650-1-colin.king@canonical.com>
On Thu, Jul 05, 2018 at 10:37:32AM +0100, Colin King wrote:
> diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
> index 88c12474a0c3..2d6b62c6d9ab 100644
> --- a/drivers/net/ethernet/sun/niu.c
> +++ b/drivers/net/ethernet/sun/niu.c
> @@ -1225,17 +1225,13 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p)
>
> bmsr = err;
> if (bmsr & BMSR_LSTATUS) {
> - u16 adv, lpa;
> -
> err = mii_read(np, np->phy_addr, MII_ADVERTISE);
> if (err < 0)
> goto out;
> - adv = err;
>
> err = mii_read(np, np->phy_addr, MII_LPA);
> if (err < 0)
> goto out;
> - lpa = err;
I'm fairly sure we could get rid of the mii_read() calls as well.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH] net: ethernet: sun: remove redundant variables adv and lpa
From: Colin Ian King @ 2018-07-05 9:54 UTC (permalink / raw)
To: Dan Carpenter; +Cc: David S . Miller, netdev, kernel-janitors, linux-kernel
In-Reply-To: <20180705095207.3dldyjgqivp5drhc@mwanda>
On 05/07/18 10:52, Dan Carpenter wrote:
> On Thu, Jul 05, 2018 at 10:37:32AM +0100, Colin King wrote:
>> diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
>> index 88c12474a0c3..2d6b62c6d9ab 100644
>> --- a/drivers/net/ethernet/sun/niu.c
>> +++ b/drivers/net/ethernet/sun/niu.c
>> @@ -1225,17 +1225,13 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p)
>>
>> bmsr = err;
>> if (bmsr & BMSR_LSTATUS) {
>> - u16 adv, lpa;
>> -
>> err = mii_read(np, np->phy_addr, MII_ADVERTISE);
>> if (err < 0)
>> goto out;
>> - adv = err;
>>
>> err = mii_read(np, np->phy_addr, MII_LPA);
>> if (err < 0)
>> goto out;
>> - lpa = err;
>
> I'm fairly sure we could get rid of the mii_read() calls as well.
I'm always concerned that removing the reads of H/W registers can affect
the behavior, so I left those in.
Colin
>
> regards,
> dan carpenter
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* [PATCH] net: tehuti: remove redundant pointer skb
From: Colin King @ 2018-07-05 9:55 UTC (permalink / raw)
To: Andy Gospodarek, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer skb is being assigned but is never used hence it is
redundant and can be removed.
Cleans up clang warning:
warning: variable 'skb' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/tehuti/tehuti.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c
index 163d8d16bc24..dc966ddb6d81 100644
--- a/drivers/net/ethernet/tehuti/tehuti.c
+++ b/drivers/net/ethernet/tehuti/tehuti.c
@@ -1151,7 +1151,6 @@ static void bdx_recycle_skb(struct bdx_priv *priv, struct rxd_desc *rxdd)
struct rx_map *dm;
struct rxf_fifo *f;
struct rxdb *db;
- struct sk_buff *skb;
int delta;
ENTER;
@@ -1161,7 +1160,6 @@ static void bdx_recycle_skb(struct bdx_priv *priv, struct rxd_desc *rxdd)
DBG("db=%p f=%p\n", db, f);
dm = bdx_rxdb_addr_elem(db, rxdd->va_lo);
DBG("dm=%p\n", dm);
- skb = dm->skb;
rxfd = (struct rxf_desc *)(f->m.va + f->m.wptr);
rxfd->info = CPU_CHIP_SWAP32(0x10003); /* INFO=1 BC=3 */
rxfd->va_lo = rxdd->va_lo;
--
2.17.1
^ permalink raw reply related
* [PATCH] ieee802154: mcr20a: add missing includes
From: Stefan Schmidt @ 2018-07-05 9:57 UTC (permalink / raw)
To: Arnd Bergmann, Xue Liu, Alexander Aring, Stefan Schmidt,
David S. Miller
Cc: Colin Ian King, Gustavo A. R. Silva, linux-wpan, netdev,
linux-kernel
In-Reply-To: <20180530214732.1021121-1-arnd@arndb.de>
Hello.
[Sorry for the delay here, I was on a few weeks on leave]
On 30.05.2018 23:47, Arnd Bergmann wrote:
> Without CONFIG_GPIOLIB, some headers are not included implicitly,
> leading to a build failure:
>
> drivers/net/ieee802154/mcr20a.c: In function 'mcr20a_probe':
> drivers/net/ieee802154/mcr20a.c:1347:13: error: implicit declaration of function 'irq_get_trigger_type'; did you mean 'irq_get_irqchip_state'? [-Werror=implicit-function-declaration]
>
> This includes gpio/consumer.h and irq.h directly rather through the
> gpiolib header.
>
> Fixes: 8c6ad9cc5157 ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/ieee802154/mcr20a.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c
> index de0d7f28a181..e428277781ac 100644
> --- a/drivers/net/ieee802154/mcr20a.c
> +++ b/drivers/net/ieee802154/mcr20a.c
> @@ -15,10 +15,11 @@
> */
> #include <linux/kernel.h>
> #include <linux/module.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/spi/spi.h>
> #include <linux/workqueue.h>
> #include <linux/interrupt.h>
> +#include <linux/irq.h>
> #include <linux/skbuff.h>
> #include <linux/of_gpio.h>
> #include <linux/regmap.h>
>
This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!
regards
Stefan Schmidt
^ permalink raw reply
* Re: [PATCH] net: ethernet: sun: remove redundant variables adv and lpa
From: Dan Carpenter @ 2018-07-05 10:01 UTC (permalink / raw)
To: Colin Ian King; +Cc: David S . Miller, netdev, kernel-janitors, linux-kernel
In-Reply-To: <22739fd9-1538-9abf-bfbe-5467196b4acf@canonical.com>
On Thu, Jul 05, 2018 at 10:54:51AM +0100, Colin Ian King wrote:
> On 05/07/18 10:52, Dan Carpenter wrote:
> > On Thu, Jul 05, 2018 at 10:37:32AM +0100, Colin King wrote:
> >> diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
> >> index 88c12474a0c3..2d6b62c6d9ab 100644
> >> --- a/drivers/net/ethernet/sun/niu.c
> >> +++ b/drivers/net/ethernet/sun/niu.c
> >> @@ -1225,17 +1225,13 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p)
> >>
> >> bmsr = err;
> >> if (bmsr & BMSR_LSTATUS) {
> >> - u16 adv, lpa;
> >> -
> >> err = mii_read(np, np->phy_addr, MII_ADVERTISE);
> >> if (err < 0)
> >> goto out;
> >> - adv = err;
> >>
> >> err = mii_read(np, np->phy_addr, MII_LPA);
> >> if (err < 0)
> >> goto out;
> >> - lpa = err;
> >
> > I'm fairly sure we could get rid of the mii_read() calls as well.
>
> I'm always concerned that removing the reads of H/W registers can affect
> the behavior, so I left those in.
Yeah... That's true sometimes. Hence my "fairly sure" equivocation. I
looked to see if any of the original devs are around and it's been a
while since anyone worked on this driver.
When we remove these warnings it means that there is no chance that
someone will look at the code again and remove the unneeded mii_read()
calls. I'm 90% sure the reads are unnecessary.
regards,
dan carpenter
^ permalink raw reply
* [PATCH] fjes: use currently unused variable my_epid and max_epid
From: Colin King @ 2018-07-05 10:05 UTC (permalink / raw)
To: David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variables my_epid and max_epid are currently assigned and not being
used - however, I suspect they were intended to be used in the for-loops
to reduce the dereferencing of hw. Replace hw->my_epid and hw->max_epid
with these variables.
Cleans up clang warnings:
warning: variable 'my_epid' set but not used [-Wunused-but-set-variable]
variable 'max_epid' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/fjes/fjes_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index 750954be5a74..d3eae1239045 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -1395,8 +1395,8 @@ static void fjes_watch_unshare_task(struct work_struct *work)
while ((unshare_watch_bitmask || hw->txrx_stop_req_bit) &&
(wait_time < 3000)) {
- for (epidx = 0; epidx < hw->max_epid; epidx++) {
- if (epidx == hw->my_epid)
+ for (epidx = 0; epidx < max_epid; epidx++) {
+ if (epidx == my_epid)
continue;
is_shared = fjes_hw_epid_is_shared(hw->hw_info.share,
@@ -1453,8 +1453,8 @@ static void fjes_watch_unshare_task(struct work_struct *work)
}
if (hw->hw_info.buffer_unshare_reserve_bit) {
- for (epidx = 0; epidx < hw->max_epid; epidx++) {
- if (epidx == hw->my_epid)
+ for (epidx = 0; epidx < max_epid; epidx++) {
+ if (epidx == my_epid)
continue;
if (test_bit(epidx,
--
2.17.1
^ permalink raw reply related
* [PATCH] net/hamradio/6pack: remove redundant variable channel
From: Colin King @ 2018-07-05 10:11 UTC (permalink / raw)
To: Andreas Koensgen, David S . Miller, linux-hams, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable channel is being assigned but is never used hence it is
redundant and can be removed.
Cleans up two clang warnings:
warning: variable 'channel' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/hamradio/6pack.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 32f49c4ce457..d79a69dd2146 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -878,10 +878,8 @@ static void decode_data(struct sixpack *sp, unsigned char inbyte)
static void decode_prio_command(struct sixpack *sp, unsigned char cmd)
{
- unsigned char channel;
int actual;
- channel = cmd & SIXP_CHN_MASK;
if ((cmd & SIXP_PRIO_DATA_MASK) != 0) { /* idle ? */
/* RX and DCD flags can only be set in the same prio command,
@@ -933,10 +931,9 @@ static void decode_prio_command(struct sixpack *sp, unsigned char cmd)
static void decode_std_command(struct sixpack *sp, unsigned char cmd)
{
- unsigned char checksum = 0, rest = 0, channel;
+ unsigned char checksum = 0, rest = 0;
short i;
- channel = cmd & SIXP_CHN_MASK;
switch (cmd & SIXP_CMD_MASK) { /* normal command */
case SIXP_SEOF:
if ((sp->rx_count == 0) && (sp->rx_count_cooked == 0)) {
--
2.17.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox