From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759033AbbBHV1r (ORCPT ); Sun, 8 Feb 2015 16:27:47 -0500 Received: from mail-wg0-f47.google.com ([74.125.82.47]:55913 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753858AbbBHV1q (ORCPT ); Sun, 8 Feb 2015 16:27:46 -0500 From: Adrian Remonda Cc: Adrian Remonda , Oleg Drokin , Andreas Dilger , Greg Kroah-Hartman , Luca Ceresoli , Anton Saraev , HPDD-discuss@ml01.01.org (moderated list:STAGING - LUSTRE...), devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: Question regarding sparse warning in staging/lustre Date: Sun, 8 Feb 2015 22:27:23 +0100 Message-Id: <1423430844-28740-1-git-send-email-adrianremonda@gmail.com> X-Mailer: git-send-email 2.1.4 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, I'm cleaning the drivers/staging/lustre driver. I have got the next warning from sparse: drivers/staging/lustre/lnet/selftest//conctl.c:918:30: warning: incorrect type in argument 1 (different address spaces) drivers/staging/lustre/lnet/selftest//conctl.c:918:30: expected void [noderef] *to drivers/staging/lustre/lnet/selftest//conctl.c:918:30: got char *ioc_pbuf2 If I add the __user macro as next: --- a/drivers/staging/lustre/lnet/selftest/conctl.c +++ b/drivers/staging/lustre/lnet/selftest/conctl.c @@ -46,7 +46,7 @@ #include "console.h" static int -lst_session_new_ioctl(lstio_session_new_args_t *args) +lst_session_new_ioctl(lstio_session_new_args_t __user *args) { char *name; int rc; The warning turns to: drivers/staging/lustre/lnet/selftest//conctl.c:825:13: warning: dereference of noderef expression Now the question: Is this right or it is just a false warning from sparse? Should the __user macro should be also inside the structure fields? thanks in advance, Adrian