[openib-general][PATCH][kdapl]: inc/dec module ref count

James Lentini jlentini at netapp.com
Mon Aug 1 11:51:24 PDT 2005



On Sun, 31 Jul 2005, Muli Ben-Yehuda wrote:

> On Thu, Jul 28, 2005 at 03:01:24PM -0400, James Lentini wrote:
>
>> We've been using the following convention to indicate that we don't
>> care about the return value:
>>
>>  (void) try_module_get(THIS_MODULE);
>
> This seems counter intuitive to me (the idea, not the syntax) -
> try_module_get() can and will fail. If it doesn't matter that it
> succeeds or fails, why call it at all?

There are cases when a function can fail and there is no intelligent 
way to handle the error or report it to a user (e.g. printf(3), 
although I don't use the void cast convention when calling printf).

james



More information about the general mailing list