[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y3/HqcdjLI2QQMTC@smile.fi.intel.com>
Date: Thu, 24 Nov 2022 21:36:09 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: kirill@...temov.name, dave.hansen@...el.com,
dave.hansen@...ux.intel.com, jejb@...ux.ibm.com,
linux-kernel@...r.kernel.org, lkp@...el.com,
martin.petersen@...cle.com, oe-kbuild-all@...ts.linux.dev,
x86@...nel.org
Subject: Re: [PATCH 2/2] x86/mm: Fix sparse warnings in untagged_ptr()
On Wed, Nov 16, 2022 at 03:43:53AM +0300, Kirill A. Shutemov wrote:
> Linear Address Masking patchset triggered a lot of sparse warnings.
>
> The root cause is that casting pointer to '__typeof__(*(ptr)) *' will
> strip all sparse tags. The type has to be defined based on the pointer
> type, not based on what the pointer points to.
>
> Fix cast in untagged_ptr() and avoid __typeof__() usage in
> get/put_user().
Without this patch we have
drivers/auxdisplay/charlcd.c:482:21: warning: incorrect type in assignment (different address spaces)
drivers/auxdisplay/charlcd.c:482:21: expected char const [noderef] __user *__ptr_clean
drivers/auxdisplay/charlcd.c:482:21: got char const *
So,
Tested-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Can we have this series applied, please?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists