From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653AbcAEPnN (ORCPT ); Tue, 5 Jan 2016 10:43:13 -0500 Received: from mta01.ornl.gov ([128.219.177.14]:12923 "EHLO mta01.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbcAEPnI convert rfc822-to-8bit (ORCPT ); Tue, 5 Jan 2016 10:43:08 -0500 X-SG: RELAYLIST X-IronPort-AV: E=Sophos;i="5.20,525,1444708800"; d="scan'208";a="119157260" From: "Simmons, James A." To: "'Niranjan Dighe'" , Greg Kroah-Hartman CC: "devel@driverdev.osuosl.org" , "Patrick Boettcher" , "linux-kernel@vger.kernel.org" , Oleg Drokin , "Mike Rapoport" , Matthew Tyler , "lustre-devel@lists.lustre.org" Subject: RE: [lustre-devel] [PATCH] staging: lustre/lustre/libcfs: Fix type mismatch reported by sparse Thread-Topic: [lustre-devel] [PATCH] staging: lustre/lustre/libcfs: Fix type mismatch reported by sparse Thread-Index: AQHRMqQ49jKEe+m8l0SP3xSMWS6Fgp7safRbgADPfgA= Date: Tue, 5 Jan 2016 15:43:05 +0000 Message-ID: <32b137dddc5d478aa93689889d616567@EXCHCS32.ornl.gov> References: <20151209170813.GA12216@codebox> <20151221234443.GA11245@kroah.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [128.219.12.132] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> On Wed, Dec 09, 2015 at 10:38:13PM +0530, Niranjan Dighe wrote: >>> The third argument to function kportal_memhog_alloc is expected to >>> be gfp_t whereas the actual argument was unsigned int. Fix this by >>> explicitly typecasting to gfp_t >>> >>> Signed-off-by: Niranjan Dighe >>> --- >>> drivers/staging/lustre/lustre/libcfs/module.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c >>> index 96d9d46..9c79f6e 100644 >>> --- a/drivers/staging/lustre/lustre/libcfs/module.c >>> +++ b/drivers/staging/lustre/lustre/libcfs/module.c >>> @@ -268,7 +268,7 @@ static int libcfs_ioctl_int(struct cfs_psdev_file *pfile, unsigned long cmd, >>> /* XXX The ioc_flags is not GFP flags now, need to be fixed */ >>> err = kportal_memhog_alloc(pfile->private_data, >>> data->ioc_count, >>> - data->ioc_flags); >>> + (__force gfp_t)data->ioc_flags); >> >> No, please fix the type to be correct properly, like the comment says >> needs to be done. >> >> thanks, >> >> greg k-h > >Hello Greg, > >I could see that the ioc_flags member of the struct libcfs_ioctl_data >is used as gfp_t only in the >case of the ioctl IOC_LIBCFS_MEMHOG. I can think of following ways to >correct it - IOC_LIBCFS_MEMHOG will be going away. Since this keeps coming up I will prepare some patches. Especially now that out tools no longer uses these obsolete ioctls.