From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12545C433E0 for ; Thu, 18 Feb 2021 10:41:59 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 842BE64E4B for ; Thu, 18 Feb 2021 10:41:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 842BE64E4B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mev.co.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 25AE5605FD for ; Thu, 18 Feb 2021 10:41:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UJxRxsokWqzn for ; Thu, 18 Feb 2021 10:41:56 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 46A39605F1; Thu, 18 Feb 2021 10:41:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 0B9806059E; Thu, 18 Feb 2021 10:41:54 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id AB2191BF2B9 for ; Thu, 18 Feb 2021 10:41:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A7E7586F67 for ; Thu, 18 Feb 2021 10:41:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qq3-SScSAKXM for ; Thu, 18 Feb 2021 10:41:51 +0000 (UTC) X-Greylist: delayed 00:10:34 by SQLgrey-1.7.6 Received: from smtp85.ord1d.emailsrvr.com (smtp85.ord1d.emailsrvr.com [184.106.54.85]) by hemlock.osuosl.org (Postfix) with ESMTPS id C42A686E88 for ; Thu, 18 Feb 2021 10:41:51 +0000 (UTC) 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 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-Language: en-GB X-Classification-ID: 23395ef8-f0af-4618-b651-66986ee57ebb-1-1 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" 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 )=- _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel