@@ -593,8 +593,7 @@ static PyObject *set_tso(PyObject *self __unused, PyObject *args)
593593 if (dev_set_int_value (ETHTOOL_STSO , args ) < 0 )
594594 return NULL ;
595595
596- Py_INCREF (Py_None );
597- return Py_None ;
596+ Py_RETURN_NONE ;
598597}
599598
600599static PyObject * get_ufo (PyObject * self __unused , PyObject * args )
@@ -622,8 +621,7 @@ static PyObject *set_gso(PyObject *self __unused, PyObject *args)
622621 if (dev_set_int_value (ETHTOOL_SGSO , args ) < 0 )
623622 return NULL ;
624623
625- Py_INCREF (Py_None );
626- return Py_None ;
624+ Py_RETURN_NONE ;
627625}
628626
629627static PyObject * get_gro (PyObject * self __unused , PyObject * args )
@@ -641,8 +639,7 @@ static PyObject *set_gro(PyObject *self __unused, PyObject *args)
641639 if (dev_set_int_value (ETHTOOL_SGRO , args ) < 0 )
642640 return NULL ;
643641
644- Py_INCREF (Py_None );
645- return Py_None ;
642+ Py_RETURN_NONE ;
646643}
647644
648645static PyObject * get_sg (PyObject * self __unused , PyObject * args )
@@ -826,8 +823,7 @@ static PyObject *set_coalesce(PyObject *self __unused, PyObject *args)
826823 if (send_command (ETHTOOL_SCOALESCE , devname , & coal ))
827824 return NULL ;
828825
829- Py_INCREF (Py_None );
830- return Py_None ;
826+ Py_RETURN_NONE ;
831827}
832828
833829struct struct_desc ethtool_ringparam_desc [] = {
@@ -866,8 +862,7 @@ static PyObject *set_ringparam(PyObject *self __unused, PyObject *args)
866862 if (send_command (ETHTOOL_SRINGPARAM , devname , & ring ))
867863 return NULL ;
868864
869- Py_INCREF (Py_None );
870- return Py_None ;
865+ Py_RETURN_NONE ;
871866}
872867
873868static struct PyMethodDef PyEthModuleMethods [] = {
0 commit comments