lkml.org 
[lkml]   [2016]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: suppress sparse warning in copy_to_user()
>>> On 04.10.16 at 09:33, <johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> __compiletime_object_size() is simply defined to __builtin_object_size()
> which gcc declares with (void *, int type) prototype.

If that was the case, everyone should have seen such warnings from
the day the original patch got introduced. And the compiler warnings
I get when testing with all four combinations of const and volatile also
supports this by saying "expected 'const void *' but ..." (arguably the
compiler should accept volatile here too). To be honest, for code in
other trees where I'm maintainer, I'd reject such casting away of
constness, and demand the utility to get fixed instead.

Jan

\
 
 \ /
  Last update: 2016-10-04 09:52    [W:1.313 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site