Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp302105ybh; Wed, 15 Jul 2020 02:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMoUHPyjCPG/cUWq5mh+ha/AvQyQBWRiXdqaUarL7j+P2UEXGIvkVHX/uIIP4ET7Mmqdmg X-Received: by 2002:a17:906:6d4d:: with SMTP id a13mr8057922ejt.146.1594804703738; Wed, 15 Jul 2020 02:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594804703; cv=none; d=google.com; s=arc-20160816; b=WSDj5Z0Tn/R1sB4FfJTMWNI81Rl28XJZIB21U2plgNF1YcisTGYU30GBPc2tWzBwaj +cswA4Gqz7bH6CnNkuvc8rUbI45MZOlN+hpD9NeRxFfN18pdGvHXWBZfPUztOw2PQjVs Gt0TW/Vc3oqcQL2LTDjqYdWQquSvkXNazgeYKfBZ5Z5d2RkjmfZE93+OD4fYJi96G0E4 ErkOS6xUl9Chd6VBIbT6mD569FP/L4VjuWzrqGhpCt+WGGY3hsTOwXwirvoyxS4b2zHo KPrddV3L0PrMLpeqrJfOLJHwuG6njZtAVkxdkT/OhyDfEYRcsUQ1tatQJ9+ozilcl429 +QGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Z3hVhufvufXQboj6QREMdbRyVrzG4VOiVEWo0NmaKI8=; b=G0I/JylFMjQPqbE60VcsSy11QBwTws/AOPNUup8gWKK9odfGNAhyxrudvveqkWfCZJ cEmVABANiYZbC4f4zLIL4pgmnhKI6AfPqOO3LDUvzObtA3Kn80NgqLRXgAN4Xcl+F1tv rlWLvtN7gmJQaYC0vqGmp+hsIVrjnR2kcYtbNHe55GrYcvVQpc/i1lbhVanHa5WeVI6M se3YiIaaYQhT3MTf1Hz1IC4i6iYq9wfIzLThGrKdpjV9uD3s++rhiEcXX/NDYayXiwzj WFZIb0uUv+R3Qcvo6D1IZ5vtuo6/6oTZa7LUw0dzHwGbg6+Vc4FPcbw+/vflz8OPXGwL AuQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pesu-pes-edu.20150623.gappssmtp.com header.s=20150623 header.b="zzE/SG3G"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=pes.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gh11si857058ejb.442.2020.07.15.02.17.59; Wed, 15 Jul 2020 02:18:23 -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; dkim=pass header.i=@pesu-pes-edu.20150623.gappssmtp.com header.s=20150623 header.b="zzE/SG3G"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=pes.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730390AbgGOIsD (ORCPT + 99 others); Wed, 15 Jul 2020 04:48:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729377AbgGOIsC (ORCPT ); Wed, 15 Jul 2020 04:48:02 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39606C061755 for ; Wed, 15 Jul 2020 01:48:02 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id b25so1673692ljp.6 for ; Wed, 15 Jul 2020 01:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pesu-pes-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z3hVhufvufXQboj6QREMdbRyVrzG4VOiVEWo0NmaKI8=; b=zzE/SG3GryrZi4INSREvj2bwX++iDiohWUBB1r3DGukCDT0xsnKV+KXePEyUBQWbgk moo0vW2i9w14X/d7AOnBSnD2IeuTtzeH8Ovno4lQ2UO0JxnKYD2z8hk4jYHLnYvKUPOr gmBnaXBrPhucb+aEIg6jGmuJRtgQr6EamgUoutHVqpbaNd17ywxcu2g+t3/M/z0AYKtq lI1Z6EEDSnGhsZNnY0Tu4qURv/4V+jwLcRIBFtfwchcIJxFVUR/5bHnc89uaZPHNa3FD yi2uqWDtAt9S2N6W5ZBgGpd8Q78iaZxXPAURcaCq/KjeZ69R5M/7F1C5xy9gL0KQPODQ +lDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z3hVhufvufXQboj6QREMdbRyVrzG4VOiVEWo0NmaKI8=; b=QNc8Nh5mBeCcCQGdU4ItniX6yO4DJkaYp8vvNT01MV/fnttTjK3+hg+cYwAA9pGE3v OBLSHOJnM/3oNqFQcecxL0xKhsgRlBgVr2yVmNEXu3xl4+M+OgqWjzn44NaJ1hGPBlH3 QqvP/X7AGmtursSb9Ip7PwZd1ePBo5LIQ0GD6HeuD+r2QAC8L90cSaUZ/f50J7n9GXID 0PJI9VzHQcbfQqr+axNeGzVuvNkmo62vL6cVj84tM0MnmsGnl3RFOB6qfsSnwURJkPGj 3fgtvf5RS3aZU6M3F7U5E/ixVCIMXc2BJfPu2xUCCSHtQBl+C22CkdkvwQJ5szWZQXkH F8Ng== X-Gm-Message-State: AOAM532FqsMl/uqvdLqLQ/fa0ObMKByiejfAFbvbmGFnB4RlTNhfRYbX mZOW35bPOVo4mpGeSBsJKZ/FDjA0BDFXu6EdoU5u+A== X-Received: by 2002:a2e:9c59:: with SMTP id t25mr4172548ljj.402.1594802880625; Wed, 15 Jul 2020 01:48:00 -0700 (PDT) MIME-Version: 1.0 References: <20200715044813.fww3regsgsbgyp7b@pesu-pes-edu> <20200715070842.GA2303720@kroah.com> <20200715083144.GA2716443@kroah.com> In-Reply-To: From: B K Karthik Date: Wed, 15 Jul 2020 04:47:48 -0400 Message-ID: Subject: Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int * To: Greg Kroah-Hartman Cc: Ian Abbott , H Hartley Sweeten , Al Viro , Xiyu Yang , Michel Lespinasse , Divyansh Kamboj , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 15, 2020 at 4:41 AM B K Karthik wrote: > > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote: > > > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman < > > > gregkh@linuxfoundation.org> wrote: > > > > > > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote: > > > > > fixed a sparse warning by changing the type in > > > > > assignment from void [noderef] __user * to unsigned int * > > > > > (different address space) > > > > > > > > > > Signed-off-by: B K Karthik > > > > > --- > > > > > 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 3f70e5dfac39..4cc012e231b7 100644 > > > > > --- a/drivers/staging/comedi/comedi_fops.c > > > > > +++ b/drivers/staging/comedi/comedi_fops.c > > > > > @@ -2956,7 +2956,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 *) compat_ptr(v32.chanlist); > > > > > cmd->chanlist_len = v32.chanlist_len; > > > > > cmd->data = compat_ptr(v32.data); > > > > > cmd->data_len = v32.data_len; > > > > > > > > Always run your patches through checkpatch before sending them, so you > > > > do not have a grumpy maintainer telling you that you have to run > > > > checkpatch on your patch before sending them. > > > > > > > > > > I will. Sorry for that. > > > > > > But the error that's being shown in this patch is something that comes up > > > on its own. > > > > No it is not. > > > > > git format-patch leaves trailing whitespace in blank lines. > > > > It does? Where is any trailing whitespace here? That's not the issue. > > To give you an example, > https://lore.kernel.org/lkml/20200714132350.naekk4zqivpuaedi@pesu-pes-edu/ > was a patch i submitted recently. > This is what checkpatch has to say: > > $ perl scripts/checkpatch.pl -f > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch > ERROR: trailing whitespace > #21: FILE: ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:21: > + $ > > ERROR: trailing whitespace > #23: FILE: ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:23: > + $ > > ERROR: trailing whitespace > #30: FILE: ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:30: > + $ > > ERROR: trailing whitespace > #37: FILE: ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:37: > + $ > > ERROR: trailing whitespace > #44: FILE: ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:44: > + $ > > ERROR: trailing whitespace > #51: FILE: ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:51: > +-- $ > > total: 6 errors, 0 warnings, 53 lines checked > > NOTE: For some of the reported defects, checkpatch may be able to > mechanically convert to the typical style using --fix or --fix-inplace. > > NOTE: Whitespace errors detected. > You may wish to use scripts/cleanpatch or scripts/cleanfile > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch > has style problems, please review. > > NOTE: If any of the errors are false positives, please report > them to the maintainer, see CHECKPATCH in MAINTAINERS. > > Does this happen only to patches I make? Am I making a silly mistake > while making a patch? > I use 'git format-patch -1' to generate the patch file. > If I am going wrong somewhere, please let me know. Also, The patch I sent (this thread): $ perl scripts/checkpatch.pl -f ./0001-staging-comedi-comedi_fops.c-changed-void-__user-to-.patch ERROR: trailing whitespace #29: FILE: ./0001-staging-comedi-comedi_fops.c-changed-void-__user-to-.patch:29: +-- $ total: 1 errors, 0 warnings, 31 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile ./0001-staging-comedi-comedi_fops.c-changed-void-__user-to-.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Am I using 'git format-patch' or 'checkpatch.pl' the wrong way? thanks, karthik