Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6626575pxb; Wed, 17 Feb 2021 09:07:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9r8uXAJpYGb/Qv0//43KxmlZcx5tuB+QTIgbVtsyi3RTAxtHADYbzHnffxsTmm74G1QSN X-Received: by 2002:a05:6402:208:: with SMTP id t8mr27183995edv.189.1613581637427; Wed, 17 Feb 2021 09:07:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613581637; cv=none; d=google.com; s=arc-20160816; b=cJNDfSfzalA6hJFd5vcjlH4AdePVazeDeuTyT38EP4IRsbDXLUL2hKJzcgcIwRqRfr CbK36k53N0uXFmlj3M+zlrmDGcMBoIRb912Rx6pkITPwBKpJpnK95sVGBdo29K3DoTct xQOCmCENvNjkH39KzUUOOu4s0tSJqH2XJqFV1zfI7rl2GwbnmRmbEM+8wlPmWWNj549I RyNanzD7vRrKcePV7ANVH1EuaqwHkf1xoYW3URfEcoS4gNpLNv+zWoovvKcgJklVFtIo cEFnQGWyrvGBmkI+jJ3rmMYxrsV8cHbBW0EsjpchKkW54Pb5Dt0a5h8SrasDSxZw93xn 7t0A== 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=/Ld/ShzShm5KDKAgwYyvO0aBML/jn8k0pry3XCWAfd0=; b=BkbPrBc2hw33p/qzsFP2jv2ukp2b7lCaiEeJ8NQze61FD8A8GI2jAOBKsX2L49C7yP QUqcedsC2GXjJuRj4k8CA1W/SRMWoXiiTn/B5a8yuCiV0/1Pkco9NY4NITYehyb4Pfng RG3DFFggf+SZMl13+Zr4KpcDnZNIK8Ff4jNGacu1gSzE0wMdlMEUK2PmM+saQviPc4w9 Q4U5PJ26rlPc6t3vWsR/rw7cEEApnOm+fiLzKXdwdVhBeCZNRBXBrW3mt4aYLuhk7du3 mwvxFGjKdZaVAENlrFetRrKZZILVdhObxGEdKbEwzx2pDbkXydrMHtv3/IcdSS+4pagh KKIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NNmnKat9; 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 qh10si1864811ejb.256.2021.02.17.09.06.52; Wed, 17 Feb 2021 09:07:17 -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=NNmnKat9; 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 S234313AbhBQREq (ORCPT + 99 others); Wed, 17 Feb 2021 12:04:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234250AbhBQREp (ORCPT ); Wed, 17 Feb 2021 12:04:45 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F114C061574 for ; Wed, 17 Feb 2021 09:04:03 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id gx20so2035862pjb.1 for ; Wed, 17 Feb 2021 09:04:03 -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=/Ld/ShzShm5KDKAgwYyvO0aBML/jn8k0pry3XCWAfd0=; b=NNmnKat9LAdeDIp7dqqwINwu/xuel5bwjWV2AhyFHnv1G3xHwim1kZA4VfaG5+3LxE +kTEGs36EnXR35RRYWe21MTJ3noNUDZ28NgnVWkcNyanqcNUlxtzUdOCkz5bzy01y0KV ob1uzbj1OdkOguh92oZW72e7vMu1EH/k4r6gT1wbvvrdkfRl6Vtn1vfXWgv6ttqsLxBR Jl+2nwPlkw0pJBtQZOUJCzbhF4mA05FSLzIykMbN2ljUjLVe7x9kR2OS+mMTqPkQgdBr 1rN+AaBgusw2bdDfCFRbeaJHPX3K0roEq7KyVX8q5mkr8ligkaLtzWyRqxRXvmStky2H Zadw== 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=/Ld/ShzShm5KDKAgwYyvO0aBML/jn8k0pry3XCWAfd0=; b=REAg+KbLlZstsWOTfuXzsENhcweMITVmMFAR+ZaLhKKdetp1uRYn93P0irGZ717uCJ qozMUPJoAapd53JqEKSvOa54OzC+8nEujd59rAWPAnxh6RKpu9VDUVU3T32Ouoh45+UF Ib0FEkqWneN7P5BekX96wWUTkn1LB6zgaxVF+vicxhKiAE9nyoeC6cNUAdClKN7M4RXY HpdP/btWgEKkFHTLinyDDSxO//fZzyjskTXkdlRYiRIFvdLV1jaKb0S000THcsx6i91A Nm9i+juMfTeYacRDawZCzr77V0X9BLtf8tWokG4V9Bq9ufXxFGnCtf3PnjFtSomm1Q1a igTA== X-Gm-Message-State: AOAM533hp9+KNq8u4rStNlO7Ttnnd8vOlCCMeIzdKcwEWAOs1TiQMp3b fF/f4Czmp3T5iGf8u96FVWw= X-Received: by 2002:a17:902:6bca:b029:e2:c5d6:973e with SMTP id m10-20020a1709026bcab02900e2c5d6973emr25292018plt.40.1613581442936; Wed, 17 Feb 2021 09:04:02 -0800 (PST) Received: from localhost.localdomain ([27.61.15.122]) by smtp.gmail.com with ESMTPSA id 9sm3200539pgw.61.2021.02.17.09.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 09:04:01 -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] staging: comedi: cast to (unsigned int *) Date: Wed, 17 Feb 2021 22:29:08 +0530 Message-Id: <20210217165907.9777-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 Resolve 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