]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: dynamically allocate vnicc cmds
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 27 Jun 2019 15:01:26 +0000 (17:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Jun 2019 17:18:23 +0000 (10:18 -0700)
commit1ea604e59924d9d52fd09071547032fd80483052
treedd9c8b7fbbbe15edda8ff2951b7c72c35071e52a
parent6972186d518acbabec491b48fecbaf842ac81b66
s390/qeth: dynamically allocate vnicc cmds

The VNICC code is somewhat quirky in that it defers the whole cmd setup
to a common helper qeth_l2_vnicc_request(). Some of the cmd specifics
are then passed in via parameter, while others are simply hard-coded.

Split the whole machinery up into the usual format: one helper that
allocates the cmd & fills in the common fields, while all the cmd
originators take care of their sub-cmd type specific work.
This makes it much easier to calculate the cmd's precise length, and
reduces code complexity.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_mpc.h
drivers/s390/net/qeth_l2_main.c