lkml.org 
[lkml]   [2013]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 02/10] spmi: Linux driver framework for SPMI
On 10/29/13 08:56, Josh Cartwright wrote:
>
>>> +#define to_spmi_controller(d) container_of(d, struct spmi_controller, dev)
>> Should be a inline function for better type safety.
> Sounds good. Will change the to_spmi_*() macros.

I was under the impression that container_of() already does type
checking. At least it will ensure that typeof(d) == typeof(dev) in the
above example which is about as good as it can get.

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation



\
 
 \ /
  Last update: 2013-10-29 18:21    [W:0.095 / U:1.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site