scripts: gen_kobject_list.py: Remove redundant parentheses
No need to put () around 'if' conditions in Python. Fixing pylint warnings for a CI check. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
16041cda0c
commit
d4c851ca57
1 changed files with 4 additions and 4 deletions
|
@ -173,11 +173,11 @@ def write_gperf_table(fp, eh, objs, static_begin, static_end):
|
|||
fp.write("};\n")
|
||||
|
||||
num_futex = eh.get_futex_counter()
|
||||
if (num_futex != 0):
|
||||
if num_futex != 0:
|
||||
fp.write("static struct z_futex_data futex_data[%d] = {\n" % num_futex)
|
||||
for i in range(num_futex):
|
||||
fp.write("Z_FUTEX_DATA_INITIALIZER(futex_data[%d])" % i)
|
||||
if (i != num_futex - 1):
|
||||
if i != num_futex - 1:
|
||||
fp.write(", ")
|
||||
fp.write("};\n")
|
||||
|
||||
|
@ -205,9 +205,9 @@ def write_gperf_table(fp, eh, objs, static_begin, static_end):
|
|||
fp.write(val)
|
||||
|
||||
flags = "0"
|
||||
if (initialized):
|
||||
if initialized:
|
||||
flags += " | K_OBJ_FLAG_INITIALIZED"
|
||||
if (is_driver):
|
||||
if is_driver:
|
||||
flags += " | K_OBJ_FLAG_DRIVER"
|
||||
|
||||
fp.write("\", {}, %s, %s, %s\n" % (obj_type, flags, str(ko.data)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue