Skip to content

Commit 02962dd

Browse files
matttbekuba-moo
authored andcommitted
tools: ynl: remove assigned but never used variable
These variables are assigned but never used according to Ruff. They can then be safely removed. This is linked to Ruff error F841 [1]: A variable that is defined but not used is likely a mistake, and should be removed to avoid confusion. Link: https://docs.astral.sh/ruff/rules/unused-variable/ [1] Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Reviewed-by: Donald Hunter <[email protected]> Reviewed-by: Asbjørn Sloth Tønnesen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 287bc89 commit 02962dd

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

tools/net/ynl/pyynl/ethtool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def main():
156156
global args
157157
args = parser.parse_args()
158158

159-
script_abs_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
160159
spec = os.path.join(spec_dir(), 'ethtool.yaml')
161160
schema = os.path.join(schema_dir(), 'genetlink-legacy.yaml')
162161

tools/net/ynl/pyynl/ynl_gen_c.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,8 +2803,6 @@ def print_kernel_policy_sparse_enum_validates(family, cw):
28032803
cw.p('/* Sparse enums validation callbacks */')
28042804
first = False
28052805

2806-
sign = '' if attr.type[0] == 'u' else '_signed'
2807-
suffix = 'ULL' if attr.type[0] == 'u' else 'LL'
28082806
cw.write_func_prot('static int', f'{c_lower(attr.enum_name)}_validate',
28092807
['const struct nlattr *attr', 'struct netlink_ext_ack *extack'])
28102808
cw.block_start()

0 commit comments

Comments
 (0)