>On 29/01/15 15:40, Bryan O'Donoghue wrote: >>> It would be nice to have two variants (1) index based & (2) address >>> based. >> >> Understood. The direction from Ingo was to have address based external >> interface imr_del_range() and support an index based internal >> imr_clear() - internally. >> >> So - in order to get test coverage - I'll move the self-test code back >> into the main IMR code It will be nice to have the separation of test code. However, that also means the index-based variant needs to be external function. Ingo, what is your preference?
>> >> Not as pretty that way - but better coverage :) > >Talking to myself in public... > >Second (third) thought - there's no advantage to moving the test code back in - >since imr_add_range() won't return the index anymore... It does. See below from v6: + ret = imr_write(idev, reg, &imr, lock); ^^ =========== IMR ID + +done: + mutex_unlock(&idev->lock); + return ret == 0 ? reg : ret; ^^ ============ IMR ID +} +EXPORT_SYMBOL(imr_add_range); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/