Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1928257pxy; Fri, 23 Apr 2021 23:14:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyateeLTQqpgxLT5e8gF/8Rh+TLyix0rXjh6gPy6PjwrTTv0hACacRHgRxfZr2LAEhwbQEh X-Received: by 2002:a50:c004:: with SMTP id r4mr8396797edb.192.1619244879584; Fri, 23 Apr 2021 23:14:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619244879; cv=none; d=google.com; s=arc-20160816; b=GO0ndThjdKLf43k2z/+9glcjrmB2JNP95sW5DQpjieVIKN9n7ahjB2AHJIxMUcbb9L eLvoRW6VT3U98ecspdKq/enKjPwai/SPMB5c0DvqXyHLuOao4R7rEDqNc15U0eqUYITU f+QGG9deqGAqt0WRXFvZjAwiMWD/KFbC0xu9JoET1DyE2DpDGmpyvwPCR/mFtZXBYHls Q+aTUVDXCVhqojF6W5iu+kr/VFeCuwEqJCCftNAU0xolbsR4osQjY23gjfq8hPLxvXaA Iu4HrrMPgc6d+rSURzT6H57JH8Ao0yzzMlyW7RIFMGOEyU652XnykKquEYb26+7PFxaM 5WGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=5VtNk/IXPQA40m8O6T2DN5QC+vRQ8eVwLNTgpz/5W9M=; b=ngN2IoMddrbG24DOQ0xGyynL/jmoVXiSGGp9mFLsO9yvNVkJ30hSkUOPpnLJ4ceg+K hiEumLR7mY7dJjDfmPITBlEpGtwz/SoCl4u8PWHo0qpBhBCHC+k4V53CtdOYTbBub8aW F5GyvPq74t7CApeOHB1WcINUPP3bMUC5uLbSWGGmQtYzzm9Khx4FQC7BqJUpOFzczjMg sxaK2qWbpdSV8uEEygqy+LOMNVivrFjWCYNk8CSC+1e/U8IFhvf7lfiY2l2uFKpMuE7X gFORNd3sstOmN32/axKnUHhbKCUViMvZBNTyts50PoShDgzy8ny7iD3dxJlm7ZLPZWZg LWlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay10si7227144ejb.482.2021.04.23.23.14.13; Fri, 23 Apr 2021 23:14:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbhDXGLx (ORCPT + 99 others); Sat, 24 Apr 2021 02:11:53 -0400 Received: from smtprelay0240.hostedemail.com ([216.40.44.240]:53602 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229626AbhDXGLq (ORCPT ); Sat, 24 Apr 2021 02:11:46 -0400 Received: from omf11.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 9336718001817; Sat, 24 Apr 2021 06:11:08 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA id 0053320A295; Sat, 24 Apr 2021 06:11:06 +0000 (UTC) Message-ID: Subject: Re: [PATCH] staging: wlan-ng: silence incorrect type in argument 1 (different address spaces) warning From: Joe Perches To: Greg Kroah-Hartman , Ashish Kalra Cc: Abheek Dhawan , Johannes Weiner , Romain Perier , Waiman Long , Allen Pais , Ivan Safonov , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Date: Fri, 23 Apr 2021 23:11:05 -0700 In-Reply-To: References: <20210420090142.GA4086@ashish-NUC8i5BEH> <20210423152619.GA2469@ashish-NUC8i5BEH> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: 0053320A295 X-Spam-Status: No, score=1.60 X-Stat-Signature: d46e7ubrbbr1korh9cwe8zg1ikogq443 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18/YY5GKoVs6gq4c54h+z9k+dUCREri/n0= X-HE-Tag: 1619244666-743394 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2021-04-24 at 08:00 +0200, Greg Kroah-Hartman wrote: > On Fri, Apr 23, 2021 at 08:56:19PM +0530, Ashish Kalra wrote: > > On Thu, Apr 22, 2021 at 10:43:13AM +0200, Greg Kroah-Hartman wrote: > > > On Tue, Apr 20, 2021 at 02:31:42PM +0530, Ashish Kalra wrote: > > > > Upon running sparse, "warning: incorrect type in argument 1 (different address spaces) > > > > is brought to notice for this file.let's add correct typecast to make it cleaner and > > > > silence the Sparse warning. [] > > ?struct p80211ioctl_req { > > ????????char name[WLAN_DEVNAMELEN_MAX]; > > - caddr_t data; > > + void __user *data; > > > > Does this looks ok to you and is there any other check possible if this is ok? > > Wait, what is "caddr_t"? Try unwinding that mess first... Might not be that simple. include/linux/types.h:typedef __kernel_caddr_t caddr_t; include/uapi/linux/coda.h:typedef void * caddr_t; include/uapi/asm-generic/posix_types.h:typedef char * __kernel_caddr_t;