]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: streamline SNMP cmd code
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 27 Jun 2019 15:01:29 +0000 (17:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Jun 2019 17:18:23 +0000 (10:18 -0700)
commit34deefdd69609c98849104157a89e5681ef2fef8
tree8437a612d0840fed50a9305b688a9d1814c264f3
parent578540c729095e6aed09886cc1faba108f51a288
s390/qeth: streamline SNMP cmd code

Apply some cleanups to qeth_snmp_command() and its callback:
1. when accessing the user data, use the proper struct instead of
   hard-coded offsets. Also copy the request data straight into the
   allocated cmd, skipping the extra memdup_user() to a tmp buffer.
2. capping the request length is no longer needed, the same check gets
   applied at a base level in qeth_alloc_cmd().
3. clean up some duplicated (and misindented) trace statements.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c