Skip to content

Commit f147a5f

Browse files
pdgendtfabiobaltieri
authored andcommitted
spelling: Replace occurrences of "iff" with "if and only if"
Spell checking tools do not recognize "iff", replace with "if and only if". See https://en.wikipedia.org/wiki/If_and_only_if Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent fe38c70 commit f147a5f

File tree

9 files changed

+15
-14
lines changed

9 files changed

+15
-14
lines changed

drivers/counter/maxim_ds3231.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ int maxim_ds3231_stat_update(const struct device *dev,
234234

235235
/*
236236
* Look for current users of the interrupt/square-wave signal and
237-
* enable monitoring iff at least one consumer is active.
237+
* enable monitoring if and only if at least one consumer is active.
238238
*/
239239
static void validate_isw_monitoring(const struct device *dev)
240240
{

dts/bindings/base/mutable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ properties:
77
zephyr,mutable:
88
type: boolean
99
description: |
10-
True iff the device structure may be mutated.
10+
True if and only if the device structure may be mutated.
1111
1212
Inherit this binding for devices that are runtime-modifiable, in-place.
1313
This places the device structure into SRAM rather than Flash.

include/zephyr/bluetooth/addr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ static inline int bt_addr_le_cmp(const bt_addr_le_t *a, const bt_addr_le_t *b)
108108

109109
/** @brief Determine equality of two Bluetooth LE device addresses.
110110
*
111-
* The Bluetooth LE addresses are equal iff both the types and the 48-bit
112-
* addresses are numerically equal.
111+
* The Bluetooth LE addresses are equal if and only if both the types and
112+
* the 48-bit addresses are numerically equal.
113113
*
114114
* @retval #true if the two addresses are equal
115115
* @retval #false otherwise

kernel/mmu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,9 +1440,9 @@ static bool do_page_fault(void *addr, bool pin)
14401440
* during the page-in/out operation.
14411441
*
14421442
* We do however re-enable interrupts during the page-in/page-out
1443-
* operation iff interrupts were enabled when the exception was taken;
1444-
* in this configuration page faults in an ISR are a bug; all their
1445-
* code/data must be pinned.
1443+
* operation if and only if interrupts were enabled when the exception
1444+
* was taken; in this configuration page faults in an ISR are a bug;
1445+
* all their code/data must be pinned.
14461446
*
14471447
* If interrupts were disabled when the exception was taken, the
14481448
* arch code is responsible for keeping them that way when entering

scripts/pylib/twister/twisterlib/testsuite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ def scan_file(inf_name):
8282
re.MULTILINE)
8383
# Checks if the file contains a definition of "void test_main(void)"
8484
# Since ztest provides a plain test_main implementation it is OK to:
85-
# 1. register test suites and not call the run function iff the test
86-
# doesn't have a custom test_main.
87-
# 2. register test suites and a custom test_main definition iff the test
88-
# also calls ztest_run_registered_test_suites.
85+
# 1. register test suites and not call the run function if and only if
86+
# the test doesn't have a custom test_main.
87+
# 2. register test suites and a custom test_main definition if and only if
88+
# the test also calls ztest_run_registered_test_suites.
8989
test_main_regex = re.compile(
9090
br"^\s*void\s+test_main\(void\)",
9191
re.MULTILINE)

scripts/spelling.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ hypervior||hypervisor
773773
hypter||hyper
774774
idel||idle
775775
identidier||identifier
776+
iff||if and only if
776777
iligal||illegal
777778
illigal||illegal
778779
illgal||illegal

scripts/west_commands/zspdx/scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def normalizeExpression(licsConcluded):
159159
return licsConcluded[0]
160160

161161
# more than one, so we'll need to combine them
162-
# iff an expression has spaces, it needs parens
162+
# if and only if an expression has spaces, it needs parens
163163
revised = []
164164
for lic in licsConcluded:
165165
if lic in ["NONE", "NOASSERTION"]:

subsys/fs/ext2/ext2_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int ext2_open(struct fs_file_t *filp, const char *fs_path, fs_mode_t flag
5959
/* Inodes allocated by lookup. Must be freed in manually. */
6060
struct ext2_inode *found_inode = args.inode;
6161

62-
/* Not NULL iff FS_O_CREATE and found_inode == NULL */
62+
/* Not NULL if FS_O_CREATE and found_inode == NULL */
6363
struct ext2_inode *parent = args.parent;
6464

6565
/* File has to be created */

tests/kernel/workq/work/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ ZTEST(work_1cpu, test_1cpu_immed_reschedule)
12631263
zassert_equal(rc, 1);
12641264
}
12651265

1266-
/* Test no-yield behavior, returns true iff work queue priority is
1266+
/* Test no-yield behavior, returns true if and only if work queue priority is
12671267
* higher than test thread priority
12681268
*/
12691269
static bool try_queue_no_yield(struct k_work_q *wq)

0 commit comments

Comments
 (0)