Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp310738ybh; Wed, 15 Jul 2020 02:34:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw63T02sl610pW/rJd7noqhCFKJnoviAhbJ7tImCvG6sGiS+eMOe/SUD2opVbS5I+9Gp5tf X-Received: by 2002:a17:906:c096:: with SMTP id f22mr8054853ejz.159.1594805675672; Wed, 15 Jul 2020 02:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594805675; cv=none; d=google.com; s=arc-20160816; b=p2IDT6IaaaTEXHCucatSq/+oQro1xRH5sarnolptuAveC8pvh5DmRYp36589OwRx6X 5mRbTn66RmZzF8wr5TBPRQLpZMDtA15F1m4F3lWTwUlYw126+/f9ino5Bmu+c4RBEhd2 An15ayTv8eTwSrtVdwnBrBtyJFE0mhfZ5PdcV87cAI2xPtqbhoo0/gidvcL7u0L/o+HR tW/qH3L5DbECF7Npi/hA4TOn5BqFHyFXuYfUZ80Z4cnz9aRxYqMkS7D/fIkHYy/1kDRB PZMf4RLNn1WTXqDA9xX2mftAJN21JukMJdqp2BEWwfwi7aUfSN4MnZwWTEGxyPPedbbc lybA== 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=4paLmIU/CwBBLnLr52mkv/Y6S35wXBNCIlDRSWPLwtQ=; b=GPIh7Lw2E0gYLVma9lSWBVQKsSjFSkUnDIqabt5T5uRQnWAfraoa8GW2MeVvfDSkEu gdzKVeKMuxY+lTvuPjKGnLoIgn/K5L4GNJaOBgopD359u+jRcD3blHG+WK5/VUX05K77 ThbHAAivCxbejCUSdHsFn0tAJoQ72feEaaK6bJw8XE+VIhNoQmXFbVgUJ2GPWZ43OEA/ zLH4ib4HWEgclKB6+mx35LpIESKSPKQYow77jbUWMXdmYH31HghEoAloEz+TCL+WuUGE gF0fi0Li9/pqJtj1pPAeGnm64jxuKBpN8RYIl3AYLC4PCM47fvdTNDjvQpmPd9naI3YE qmrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pesu-pes-edu.20150623.gappssmtp.com header.s=20150623 header.b=panp4hN8; 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 qp2si944449ejb.598.2020.07.15.02.34.11; Wed, 15 Jul 2020 02:34:35 -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=panp4hN8; 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 S1730597AbgGOJWg (ORCPT + 99 others); Wed, 15 Jul 2020 05:22:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729912AbgGOJWg (ORCPT ); Wed, 15 Jul 2020 05:22:36 -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 00516C061755 for ; Wed, 15 Jul 2020 02:22:35 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id e4so1802987ljn.4 for ; Wed, 15 Jul 2020 02:22:35 -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=4paLmIU/CwBBLnLr52mkv/Y6S35wXBNCIlDRSWPLwtQ=; b=panp4hN8htxMyL8Po9aDofLEM6+3tWJMkE+qUwzG3GtJAj1jAseuWscgGV9uXybRC4 SeFsh7OLxdItR27o0vGkbUGtGahAfQdGDeUxqZcMoIu+xcdPDqcg0+7R27DAjh5DJX4d O3K6d/bEC55qvAS0lzIANE8tsAQeIfw1oerVg9QacKr46GxgLLMK86GSP/I4SqufbQuj Gj31SSClXsp87GNoazsDRmKUBwuDK//U1UKo+9HtoJ+z7b3Qa4dFDdoztj48mJO+8Eab jJ138nDnsCEglJjTedkT60xyYTNc4WCL2wFVHs5LJv81neXSTMnpE+uXPEgZAmkq2EIi 32RA== 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=4paLmIU/CwBBLnLr52mkv/Y6S35wXBNCIlDRSWPLwtQ=; b=BiifrwhMgkNzWX8s+X+moLNSEnCvuZEJpWw6gQ+1Xiag1J7EgZmCpjgKt5OK1rwvxj /kWBqY+XqRrosiLM0YmztZUXqBkyKZRsgIvCQeON7f2QygYvUE2KEfuiHq2x2pppySBw aJ4gR19CP4xpl2ugTyQOnMHSqpgAYC0Qr7xs4EjAnpcMTKtQvS6YPpFlYgy4DtKKQXhF HLPDGrmYvCs5s38lRcAzGo5Ih3hF3VX6u3NDcFvlO0Wg8GWCaecy4rouEvHMf58WCiWO EQ7q7XcegUjToH/HnZbSAGwqAcraBwzBJht2/BiaoNcpeHyi8EJoWKRh60KtZ0lsjrRQ 6/Sg== X-Gm-Message-State: AOAM5325T6ApUC73Hm8psSsq6Wv8PTVSrqHErQpbck2c3dZXKYnwISN4 CKiT7241KlycxGAyy5UWaaNBvykkK+o06eQQvXGUGA== X-Received: by 2002:a2e:b4ed:: with SMTP id s13mr4423801ljm.296.1594804954409; Wed, 15 Jul 2020 02:22:34 -0700 (PDT) MIME-Version: 1.0 References: <20200715044813.fww3regsgsbgyp7b@pesu-pes-edu> <20200715070842.GA2303720@kroah.com> <20200715083144.GA2716443@kroah.com> <20200715091922.GB2722864@kroah.com> In-Reply-To: <20200715091922.GB2722864@kroah.com> From: B K Karthik Date: Wed, 15 Jul 2020 05:22:22 -0400 Message-ID: Subject: Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int * To: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org, Xiyu Yang , linux-kernel@vger.kernel.org, Ian Abbott , Al Viro , Michel Lespinasse , Divyansh Kamboj 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 5:19 AM Greg Kroah-Hartman wrote: > > On Wed, Jul 15, 2020 at 04:47:48AM -0400, B K Karthik wrote: > > 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? > > Are you checking the right thing here? Here's what I got: > > $ ./scripts/checkpatch.pl --terse x.patch > x.patch:19: CHECK: No space is necessary after a cast > x.patch:25: WARNING: Missing Signed-off-by: line by nominal patch author '' > total: 0 errors, 1 warnings, 1 checks, 8 lines checked > > > I use --terse to make it more obvious what the issue is. > > Heck, check it yourself: > > $ b4 am https://lore.kernel.org/r/20200715044813.fww3regsgsbgyp7b@pesu-pes-edu > Looking up https://lore.kernel.org/r/20200715044813.fww3regsgsbgyp7b%40pesu-pes-edu > Grabbing thread from lore.kernel.org/driverdev-devel > Analyzing 7 messages in the thread > --- > Writing ./20200715_bkkarthik_staging_comedi_comedi_fops_c_changed_type_in_assignment_to_unsigned_int.mbx > [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int * > --- > Total patches: 1 > --- > Link: https://lore.kernel.org/r/20200715044813.fww3regsgsbgyp7b@pesu-pes-edu > Base: not found (applies clean to current tree) > git am ./20200715_bkkarthik_staging_comedi_comedi_fops_c_changed_type_in_assignment_to_unsigned_int.mbx > > $ ./scripts/checkpatch.pl --terse 20200715_bkkarthik_staging_comedi_comedi_fops_c_changed_type_in_assignment_to_unsigned_int.mbx > 20200715_bkkarthik_staging_comedi_comedi_fops_c_changed_type_in_assignment_to_unsigned_int.mbx:32: CHECK: No space is necessary after a cast > 20200715_bkkarthik_staging_comedi_comedi_fops_c_changed_type_in_assignment_to_unsigned_int.mbx:38: WARNING: Missing Signed-off-by: line by nominal patch author 'B K Karthik ' > total: 0 errors, 1 warnings, 1 checks, 8 lines checked > > > I used the b4 tool to download your email in mbox form from > lore.kernel.org and then ran checkpatch on it. > > > And the signed-off-by error is real, you need to also fix that. I will check that. I am sorry for wasting your time. But you have accepted a couple of patches from me before that were created the same way. > > Try the above yourself to verify this. I will. thanks, karthik