lkml.org 
[lkml]   [2003]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.088 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site