Skip to contentSkip to conversation

libata janitor project

DISCUSSION Jeff Garzik 2 participants 3 messages Feb 10, 2006 libata

lore
Share & tools
lore
#0 lore raw

Long term, we should work to replace the assert() in libata with standard kernel WARN_ON().

If someone wanted to handle that conversion, that would be useful. Make sure to pay attention, the sense of each test must be reversed.

Jeff

#1 lore raw
Quoted 8 lines · Jeff Garzik <jgarzik <at> pobox.com> writes:

Long term, we should work to replace the assert() in libata with standard kernel WARN_ON().

If someone wanted to handle that conversion, that would be useful. Make sure to pay attention, the sense of each test must be reversed.

Quoted 8 lines

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo <at> vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Just so stupid little me understands this:
replace for example:
assert(sg != NULL)
with
WARN_ON(sg == NULL)

right?
...What about WARN_ON being defined bu HAVE_ARCH_BUG_ON and assert by ATA_DEBUG?

#2 lore raw
Quoted 1 line · Philippe Seewer

Jeff Garzik <jgarzik <at> pobox.com> writes:

(please don't cut CC's, particularly linux-ide)

Quoted 14 lines
Quoted 12 lines

Long term, we should work to replace the assert() in libata with standard kernel WARN_ON().

If someone wanted to handle that conversion, that would be useful. Make sure to pay attention, the sense of each test must be reversed.

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo <at> vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 7 lines

Just so stupid little me understands this:
replace for example:
assert(sg != NULL)
with
WARN_ON(sg == NULL)

right?

Correct.

Quoted 1 line

...What about WARN_ON being defined bu HAVE_ARCH_BUG_ON and assert by ATA_DEBUG?

I would rather just unconditionally use WARN_ON(), and eliminate assert().

Jeff