Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932545AbcLGRXA convert rfc822-to-8bit (ORCPT ); Wed, 7 Dec 2016 12:23:00 -0500 Received: from mga01.intel.com ([192.55.52.88]:42605 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753204AbcLGRW5 (ORCPT ); Wed, 7 Dec 2016 12:22:57 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,310,1477983600"; d="scan'208";a="39878019" Subject: Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Oleg Drokin In-Reply-To: <33d23121-e5ca-0e14-bfbb-632f883e0948@gmail.com> Date: Wed, 7 Dec 2016 12:22:41 -0500 Cc: Andreas Dilger , James Simmons , Greg Kroah-Hartman , , , , Content-Transfer-Encoding: 8BIT Message-Id: <92C79E56-E447-46CB-9D4C-ECC862F2B43E@intel.com> References: <20161202173332.5100-1-lambert.quentin@gmail.com> <306D1D4D-A949-44F6-BAFE-44F08F609D9B@intel.com> <81821426-c32c-c45a-e9a3-82f9818fc986@gmail.com> <33d23121-e5ca-0e14-bfbb-632f883e0948@gmail.com> To: Quentin Lambert X-Mailer: Apple Mail (2.1283) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 823 Lines: 23 On Dec 7, 2016, at 10:20 AM, Quentin Lambert wrote: > Hi all, > > I am looking at the drivers/staging/lustre/lustre/llite/dir.c: > > 1469 /* Call mdc_iocontrol */ > 1470 rc = obd_iocontrol(LL_IOC_FID2MDTIDX, exp, sizeof(fid), &fid, > 1471 &index); > 1472 if (rc) > > and sparse says: > > drivers/staging/lustre/lustre/llite/dir.c:1471:37: warning: incorrect type in argument 5 (different address spaces) > > I was wondering if there was any value to add a cast to fix the warning? These's a sister warning to this one, btw, in drivers/staging/lustre/lustre/lmv/lmv_obd.c:996:19: warning: cast removes address space of expression It is an ugly kludge and I guess needs to just be reworked somehow instead to avoid these ugly games.