Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7216549pxb; Thu, 18 Feb 2021 04:47:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzl1GI9XVCY256hIYUj4t84FgG8Be2ujvCWprAELqS90ZsbrunXa3KncPDNvxiVwbJNZq3S X-Received: by 2002:a17:906:ad90:: with SMTP id la16mr3851812ejb.42.1613652465794; Thu, 18 Feb 2021 04:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613652465; cv=none; d=google.com; s=arc-20160816; b=0s3eS2DB9SVSrhdLR5+34uUw2ANoBGHrUW+ltYLEtbGHmKM3PAi4aq6NdBp4MT4geV 6SeXOudB8Nu+g+WjbY/Tt4KFiDK6LU/mzqKyNE572AOVLz66hJKNVV3howvppXP8ZAX7 ninIScQaETs6JTeyXJaAueNLt5tHLc9adH+g6XrkQ6nc83dtVZwy9BZwpkd4e4oV8mC3 45CdI5K5x2/jPZ0tdhdp1VUhz6V+2Y5PEQk93aQcWR2swvOpejkjssqLlEJJOy3TiDCh mPwhxqyXZ/nTOdmHsZ9FupjiW9kUgYHPIxHM+QpKdsVvx5RcthyPuDoOBDcLUMYvcUdP sfrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature:dkim-signature; bh=J2OpRn740OuVBEA5/N1LNuYG4O5tTstuTHMdUzmkyRE=; b=RvgBwBlMPW/d4AT3OSzmYpUGo2yYtp2cPvSXRT8Zi3OYlzeoyVSat6Ctv0VAZHJNuA 6e1gA8hoXunipubn9TVc+P4TG5Nnv5+ewx8kEw1ek3YMltXYSOt+cOXd0G5Bhsimc8z9 qwNmXQL4UEXzbpWj58fxhfH+V0QP0LGW7IVlna+rgk9Fa5OGi4xLSDCNyhqsMBsdHSH+ kikE1nAZisQBmkGAJDG+Up3NV4kHV3qhHTHEjTfZkWkmQo/GFxggRVMoUKbkynCrVdGQ J0npaAU0lGuiS6oY0ZOK+GATGNFiYAb5TjzGlEm8MHn7A9TKRJJGGvlpRp6bcV3DOVuT pJqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@g001.emailsrvr.com header.s=20190322-9u7zjiwi header.b=OvFu9kgN; dkim=pass header.i=@mev.co.uk header.s=20190130-41we5z8j header.b=Kuns5u1V; 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 j2si3654067ejy.723.2021.02.18.04.47.22; Thu, 18 Feb 2021 04:47:45 -0800 (PST) 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; dkim=pass header.i=@g001.emailsrvr.com header.s=20190322-9u7zjiwi header.b=OvFu9kgN; dkim=pass header.i=@mev.co.uk header.s=20190130-41we5z8j header.b=Kuns5u1V; 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 S231254AbhBRMpI (ORCPT + 99 others); Thu, 18 Feb 2021 07:45:08 -0500 Received: from smtp86.ord1d.emailsrvr.com ([184.106.54.86]:45844 "EHLO smtp86.ord1d.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231331AbhBRK6b (ORCPT ); Thu, 18 Feb 2021 05:58:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=g001.emailsrvr.com; s=20190322-9u7zjiwi; t=1613644276; bh=8ZWVQO/9PZxft2IdiNPG2quxmA7J4sIfRwugGqJyqUA=; h=Subject:To:From:Date:From; b=OvFu9kgNuzR1i/BkRnPVIovr4XZOMmk3qHLM0i/meDCEyGqqINMiXVZnGgFJzU/tJ rL7w2f2Z8f7z8Y4rvfJrnIjmkawzh4oVfVHFDhAorcciNZn9T0Z99w+S5wTNBoEONe Kib78/o2GqtVADGYAihe+PPZKxjZ+r3P0ySbjQe8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20190130-41we5z8j; t=1613644276; bh=8ZWVQO/9PZxft2IdiNPG2quxmA7J4sIfRwugGqJyqUA=; h=Subject:To:From:Date:From; b=Kuns5u1VNsImKPNCPbcBOcBy+5f+p4x8xHmWrbk8dAM/MK8RYVqWiXncROPH0YVJy pGGrXM810BJyCRAuxVXA1ace0G1TDhVVFA0AgfYttltGhd6WTQ4UY4SlRAUFImbr2F WhDpNI0Pzcr3VBQGntUwp5bZJxzMIdyEfgkJYivA= X-Auth-ID: abbotti@mev.co.uk Received: by smtp3.relay.ord1d.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 0F9A8601CC; Thu, 18 Feb 2021 05:31:15 -0500 (EST) Subject: Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type To: Atul Gopinathan , gregkh@linuxfoundation.org Cc: hsweeten@visionengravers.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20210218084404.16591-1-atulgopinathan@gmail.com> From: Ian Abbott Organization: MEV Ltd. Message-ID: <8f73b7a1-02dd-32ef-8115-ad0f38868692@mev.co.uk> Date: Thu, 18 Feb 2021 10:31:15 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210218084404.16591-1-atulgopinathan@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Classification-ID: 23395ef8-f0af-4618-b651-66986ee57ebb-1-1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/02/2021 08:44, Atul Gopinathan wrote: > Fix the following warning generated by sparse: > > drivers/staging//comedi/comedi_fops.c:2956:23: warning: incorrect type in assignment (different address spaces) > drivers/staging//comedi/comedi_fops.c:2956:23: expected unsigned int *chanlist > drivers/staging//comedi/comedi_fops.c:2956:23: got void [noderef] * > > compat_ptr() has a return type of "void __user *" > as defined in "include/linux/compat.h" > > cmd->chanlist is of type "unsigned int *" as defined > in drivers/staging/comedi/comedi.h" in struct > comedi_cmd. > > Signed-off-by: Atul Gopinathan > --- > drivers/staging/comedi/comedi_fops.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c > index e85a99b68f31..fc4ec38012b4 100644 > --- a/drivers/staging/comedi/comedi_fops.c > +++ b/drivers/staging/comedi/comedi_fops.c > @@ -2953,7 +2953,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd, > cmd->scan_end_arg = v32.scan_end_arg; > cmd->stop_src = v32.stop_src; > cmd->stop_arg = v32.stop_arg; > - cmd->chanlist = compat_ptr(v32.chanlist); > + cmd->chanlist = (unsigned int __force *)compat_ptr(v32.chanlist); > cmd->chanlist_len = v32.chanlist_len; > cmd->data = compat_ptr(v32.data); > cmd->data_len = v32.data_len; > This patch and the other one in your series clash with commit 9d5d041eebe3 ("staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings") by B K Karthik. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9d5d041eebe3dcf7591ff7004896c329eb841ca6 -- -=( Ian Abbott || MEV Ltd. is a company )=- -=( registered in England & Wales. Regd. number: 02862268. )=- -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-