Messages in this thread | | | Date | Thu, 16 Oct 2003 11:40:49 -0500 | From | Colin Ngam <> | Subject | Re: [PATCH] Altix I/O code cleanup |
| |
Jes Sorensen wrote:
> >>>>> "Christoph" == Christoph Hellwig <hch@infradead.org> writes: > > >> ASSERT_ALWAYS checks it, it may not be pretty but it does check > >> it. > > Christoph> No, it's useless. It's not different at all from just > Christoph> derefencing a NULL pointer - both get you an oops.
Hi Christoph,
In the pointer case yes.
> > > I haven't looked at the place right there, however if the intention is > to panic() on a failed kmalloc because the data structure is required > for a core service, then doing ASSERT_ALWAYS isn't that unreasonable.
ASSERT_ALWAYS is used for many other cases other than just for testing NULL Pointers. Whether you call ASSERT_ALWAYS or call panic with a message or just allow it to oops, a descriptive panic message can save some time.
Thanks.
colin
> > > Jes > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |