]> 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)
commit6d060d0847c1dc39f1ab0fca96255768678e3404
tree8437a612d0840fed50a9305b688a9d1814c264f3
parentfed026d4cf163a001fd80f59a828de052f28ad45
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