On Wed, Jan 6, 2016 at 12:25 AM, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > With the following code: > typedef unsigned long __nocast cputime_t; > > void task_cputime_adjusted(cputime_t *); > > void current_task_runtime_100ns(void) > { > cputime_t utime; > > task_cputime_adjusted(&utime); > } > > sparse emits the following message: > x.c:16:32: warning: incorrect type in argument 1 (different modifiers) > x.c:16:32: expected unsigned long [nocast] [usertype] *<noident> > x.c:16:32: got unsigned long *<noident> > x.c:16:32: warning: implicit cast to nocast type > > In other words, when taking the address of 'utime', sparse drops the 'nocast' > modifier and then complains that task_cputime_adjusted() is not given a > 'nocast' pointer as expected ... I think there is a bug some where else. In the above example, "cputime_t *" and "&utime" should have the same type regardless pointer inherent the nocast attribute or not. I haven't fully understand where the nocast attribute get dropped. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html