Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7133946pxb; Thu, 18 Feb 2021 02:15:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCtFJ5vbFG3kb/HU9e2Od9naEcYFySK3AZc9OdAWSC3c5mkiMneEOa1to/bC5+LyQEK9IT X-Received: by 2002:aa7:dd08:: with SMTP id i8mr3408453edv.1.1613643353954; Thu, 18 Feb 2021 02:15:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613643353; cv=none; d=google.com; s=arc-20160816; b=qZcvV42/rKaSiPvZ61Lal40G1rWlszwoY+rTKgZrJNL2C6AUJKIZmur+Pbzltu/d2h e7m6ZG1zj6DGy3un+MzUNv3ML6zVWXaCKWEw8fQlVrCjWSOOzL07O9AvJ8RRDf2MzwKo sLntnqUWVKAU0HUAU/InEu/RaeBqba2CdDAhKLQmiv4OLQrTxW2B5cNgCiPCWWtkeQwj QEfp9oeT3ryWNs2o+9R62ZuyUPm/6p7lQdJS0pivgmVXJG0jOAZOyltLQLRmR7La9JbE 7A9skSJlgU+yLp9ZWoC1LXQ5PZpwyj0Sm1wlU2lJbvaNDpUhUcCezE2eCbuD+ndwqSMy oRzA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ed3oT+OewzwPMtx3xp3F8acYmpBybfyINlaZN6Lx5c4=; b=cKWtOVzyAXC9RpATD3GRYOrvcEIZcOriqG3SlyTwT9EvgBPRkIsVTjWiqIbfVp4rvH LaF4ePpD2Lvfiv0eH2EO/I7sH/1BhWmI4wrSs20ppOmlkETfdLYV7gIbS/xWZgKaqKnJ Ce5q0Qv/fDt0wGvdx0+8bDGDBvtGbs5vYDUmrUQ/syDyybGWeaSxUARxHhZixUMn7Gaa RsYzDTB0uN59Cn9VnYhhOG6WQ8rbzXauv3IwAJaEzxebed83G1q2iJJA5kbeHHzc8pb4 MKu8tam1TgJZ7VnBxtLBmq8IwjQoPdwKvXfv7Xw4/JiJDNXHS5+SWdCAyTGKq/3DXS8r SB0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hqjskiM1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jw1si3591724ejc.74.2021.02.18.02.15.29; Thu, 18 Feb 2021 02:15:53 -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=@gmail.com header.s=20161025 header.b=hqjskiM1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232266AbhBRJ5o (ORCPT + 99 others); Thu, 18 Feb 2021 04:57:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230380AbhBRIy3 (ORCPT ); Thu, 18 Feb 2021 03:54:29 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C910BC061786 for ; Thu, 18 Feb 2021 00:44:33 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id t2so1022416pjq.2 for ; Thu, 18 Feb 2021 00:44:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ed3oT+OewzwPMtx3xp3F8acYmpBybfyINlaZN6Lx5c4=; b=hqjskiM1dcTdIdLHKY6FqQx9B2WAf4ATIFDry3FEwSvqDP2jExxzydONzGn/fwQJnX 1mU63R8Z5HstVm8M/AmDpsq8eSGLxz/wOYPf2pvGICbcgu5djbu6A8epIrNqiJL/Tk04 C0L5YDCvtU90evEj2rHHYnZTpD3irmUSfW2Ls7gE4b8pc2u3hPH3lNf7UEnLMT1jEvhQ qA0YH+dIXRH6wwIu9zkYi9VmfIuvngWIP8WAZqJhBzst16PkcT5rTwSTU9aAwI/8bl6J rE2Xj7eXOcr60Geok91+1V8yxSY3uUlKvXPL6AhNQd8k2JazEWfrx0MkyuE3+2otg+3+ nKtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ed3oT+OewzwPMtx3xp3F8acYmpBybfyINlaZN6Lx5c4=; b=CzmcDnxmO03ZkSMJxqQUD0GuNnMEYbXDffLp8viRpIXgZT0zSaHB5uEwU+xaM5b9K6 R/UuMaNHgfgGwMWeHe+o9NjCVC+ZeS66AaKsbLT0Zrvvcd7/ZebpgjRYlVDyrHTpPlK3 ioYz1LdkWpdO1e/wRCIV4Uv9nl1p1yclqvwocCkLsTfqk2SJ1tKHFhmYeOmwT3zdsBQc 1rrruxCwtQoCRF07D8K1KXyxTKaOlGUJkVG0AvCeoMqPZF+pTPAX1qUSXYUKVaxlzT9H A1YqA5OxRQcAn3WcPLCdfwurQajNdlUbWehNcLv/GIAGTjbwT0MTl2+JUcVWQpQRxwbI 4XQQ== X-Gm-Message-State: AOAM532ER2LlgXLeJ7CdrPqjsaswhcQpyo/0r/miMrrZQlgN8Tz+2NMg xlFM+Ef6F0mW9EOcZ0xD5qY= X-Received: by 2002:a17:902:bd85:b029:e3:11d0:367f with SMTP id q5-20020a170902bd85b02900e311d0367fmr3326951pls.12.1613637872814; Thu, 18 Feb 2021 00:44:32 -0800 (PST) Received: from localhost.localdomain ([106.200.12.142]) by smtp.gmail.com with ESMTPSA id u20sm4941761pjy.36.2021.02.18.00.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 00:44:32 -0800 (PST) From: Atul Gopinathan To: gregkh@linuxfoundation.org Cc: abbotti@mev.co.uk, hsweeten@visionengravers.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Atul Gopinathan Subject: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type Date: Thu, 18 Feb 2021 14:14:03 +0530 Message-Id: <20210218084404.16591-1-atulgopinathan@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.27.0