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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 31066C433E0 for ; Fri, 19 Jun 2020 09:05:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15EF5208DB for ; Fri, 19 Jun 2020 09:05:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731541AbgFSJFC (ORCPT ); Fri, 19 Jun 2020 05:05:02 -0400 Received: from mga17.intel.com ([192.55.52.151]:53543 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731538AbgFSJFC (ORCPT ); Fri, 19 Jun 2020 05:05:02 -0400 IronPort-SDR: qWFhVEpIFMwAmVoHNHT2Kz2TlDx806AY1pjC+SSgkm5lXuZgDj6z9xlEK9VflUA+EaMA/yfqPg HstDcgPOc9Hw== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="123160675" X-IronPort-AV: E=Sophos;i="5.75,254,1589266800"; d="scan'208";a="123160675" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 02:05:01 -0700 IronPort-SDR: kF7t/FU4z5wGAUzCozSJdjd4BBAbdDGgBBHDlB9u9WN/LIQDdScZQmzCyhb/NdB4JlLBMi1ZDx 6ziPktrLxEQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,254,1589266800"; d="scan'208";a="310110943" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga002.fm.intel.com with ESMTP; 19 Jun 2020 02:04:58 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1jmCxI-00ERf1-JA; Fri, 19 Jun 2020 12:05:00 +0300 Date: Fri, 19 Jun 2020 12:05:00 +0300 From: Andy Shevchenko To: Syed Nayyar Waris Cc: kernel test robot , Linus Walleij , Andrew Morton , kbuild-all@lists.01.org, William Breathitt Gray , Bartosz Golaszewski , Michal Simek , "open list:GPIO SUBSYSTEM" , linux-arm Mailing List , Linux Kernel Mailing List Subject: Re: [PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro Message-ID: <20200619090500.GC2428291@smile.fi.intel.com> References: <46c05c5deeada60a13ee0de83c68583d578f42fd.1592224129.git.syednwaris@gmail.com> <202006160420.iatdr9ab%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Fri, Jun 19, 2020 at 11:38:59AM +0300, Andy Shevchenko wrote: > On Fri, Jun 19, 2020 at 10:02 AM Syed Nayyar Waris wrote: > > ... > > > > config: sparc64-randconfig-s032-20200615 (attached as .config) > > > compiler: sparc64-linux-gcc (GCC) 9.3.0 > > > reproduce: > > > # apt-get install sparse > > > # sparse version: v0.6.2-rc1-3-g55607964-dirty > > > # save the attached .config to linux build tree > > > make W=1 C=1 ARCH=sparc64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' > > ... > > > > sparse warnings: (new ones prefixed by >>) > > > > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long > > > include/linux/bitmap.h:594:63: sparse: sparse: shift too big (64) for type unsigned long > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long > > > >> include/linux/bitmap.h:638:17: sparse: sparse: invalid access past the end of 'old' (8 8) > > > It seems to me that to reproduce this warning, I have to use the > > sparc64 compiler. I have installed 'sparc64-linux-gnu-gcc' on my > > computer. > > Sparse is not a compiler. On x86_64: CHECK drivers/gpio/gpio-xilinx.c include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsigned long include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsigned long include/linux/bitmap.h:594:63: warning: shift too big (64) for type unsigned long include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsigned long include/linux/bitmap.h:638:17: warning: invalid access past the end of 'old' (8 8) > > I have to specify that this compiler needs to be used for build > > process. How/ Where do I specify this? > > > > I have downloaded the config.gz (has config file) and placed it at the > > root of the linux kernel project tree. But the Makefile STILL has > > 'gcc' as the compiler. When I build, it is the 'gcc' compiler being > > used and not 'sparc64-linux-gnu-gcc'. I know I can manually change the > > Makefile to use sparc64 compiler, but I think there must be some more > > elegant way to do this, perhaps using make menuconfig? > > If you wish to run a compilation, download a compiler from [1], and, > after adding its bin/ folder to PATH, run > make CROSS_COMPILE=sparc64-linux- ARCH=sparc64 ... # first generate .config > > > Kindly illuminate as to how shall I reproduce the compiler warning. > > > > 803024b6c8a375 Syed Nayyar Waris 2020-06-15 @638 map[index + 1] &= ~BITMAP_LAST_WORD_MASK(start + nbits); > > > 803024b6c8a375 Syed Nayyar Waris 2020-06-15 @639 map[index + 1] |= (value >> space); > > Hmm... I think I sent a reply [2] where I explained how space can be > 64. Do you agree with analysis? > > [1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/ > [2]: https://lore.kernel.org/lkml/20200616081428.GP2428291@smile.fi.intel.com/ -- With Best Regards, Andy Shevchenko 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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 2A5D6C433E0 for ; Fri, 19 Jun 2020 09:05:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 F054A2053B for ; Fri, 19 Jun 2020 09:05:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l8Pf/3s4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F054A2053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RQtQm9RzqZ+771+6T2dg5ze6O73ueOUFbPZ20SBi3qc=; b=l8Pf/3s4AgI7/B cVO3xqTHre8R8dQJYCD9MkFJBA+jSF10jmUbsN15ShOs/AbOSUzCZDCRaMrFYGJm60e+yV1c1Pghs GvUg9yBLWNInNJanzC8n1xQ9QZfGpW8CAHs3INibEXZCxsGR3U3srP+4tPfQFNGL0Mrk4A0ukK360 BmDnoy1T3XkZ+SO0hLDrWfRErpSxqdQ8oTYi3Oiaug0rOX5KSZTrJnPYfDuiHj0OPzWwI9/9An0Rt HzVOMANwtOlcja+vrztr2UZksHb3BER/O8dNGHvVUv1GiM7xwNX1FUNOgu1dbLljRIi7zM0X5/AU6 BTPpz0qqqTin3npxAmaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmCxP-0001cF-Ao; Fri, 19 Jun 2020 09:05:07 +0000 Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmCxK-0000uP-QE for linux-arm-kernel@lists.infradead.org; Fri, 19 Jun 2020 09:05:04 +0000 IronPort-SDR: R/LCN//fq7w4zv+6W/bOs8hg7IoYi9yoXGOtwTjvo2QL3cIudiAQWa1IS9soytN6cTrtf7uqCf uWu4DEcthmBg== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="130261274" X-IronPort-AV: E=Sophos;i="5.75,254,1589266800"; d="scan'208";a="130261274" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 02:05:01 -0700 IronPort-SDR: kF7t/FU4z5wGAUzCozSJdjd4BBAbdDGgBBHDlB9u9WN/LIQDdScZQmzCyhb/NdB4JlLBMi1ZDx 6ziPktrLxEQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,254,1589266800"; d="scan'208";a="310110943" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga002.fm.intel.com with ESMTP; 19 Jun 2020 02:04:58 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1jmCxI-00ERf1-JA; Fri, 19 Jun 2020 12:05:00 +0300 Date: Fri, 19 Jun 2020 12:05:00 +0300 From: Andy Shevchenko To: Syed Nayyar Waris Subject: Re: [PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro Message-ID: <20200619090500.GC2428291@smile.fi.intel.com> References: <46c05c5deeada60a13ee0de83c68583d578f42fd.1592224129.git.syednwaris@gmail.com> <202006160420.iatdr9ab%lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200619_020502_934326_F97495A6 X-CRM114-Status: GOOD ( 20.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kbuild-all@lists.01.org, kernel test robot , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Linus Walleij , William Breathitt Gray , Michal Simek , Bartosz Golaszewski , Andrew Morton , linux-arm Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 19, 2020 at 11:38:59AM +0300, Andy Shevchenko wrote: > On Fri, Jun 19, 2020 at 10:02 AM Syed Nayyar Waris wrote: > > ... > > > > config: sparc64-randconfig-s032-20200615 (attached as .config) > > > compiler: sparc64-linux-gcc (GCC) 9.3.0 > > > reproduce: > > > # apt-get install sparse > > > # sparse version: v0.6.2-rc1-3-g55607964-dirty > > > # save the attached .config to linux build tree > > > make W=1 C=1 ARCH=sparc64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' > > ... > > > > sparse warnings: (new ones prefixed by >>) > > > > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long > > > include/linux/bitmap.h:594:63: sparse: sparse: shift too big (64) for type unsigned long > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long > > > >> include/linux/bitmap.h:638:17: sparse: sparse: invalid access past the end of 'old' (8 8) > > > It seems to me that to reproduce this warning, I have to use the > > sparc64 compiler. I have installed 'sparc64-linux-gnu-gcc' on my > > computer. > > Sparse is not a compiler. On x86_64: CHECK drivers/gpio/gpio-xilinx.c include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsigned long include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsigned long include/linux/bitmap.h:594:63: warning: shift too big (64) for type unsigned long include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsigned long include/linux/bitmap.h:638:17: warning: invalid access past the end of 'old' (8 8) > > I have to specify that this compiler needs to be used for build > > process. How/ Where do I specify this? > > > > I have downloaded the config.gz (has config file) and placed it at the > > root of the linux kernel project tree. But the Makefile STILL has > > 'gcc' as the compiler. When I build, it is the 'gcc' compiler being > > used and not 'sparc64-linux-gnu-gcc'. I know I can manually change the > > Makefile to use sparc64 compiler, but I think there must be some more > > elegant way to do this, perhaps using make menuconfig? > > If you wish to run a compilation, download a compiler from [1], and, > after adding its bin/ folder to PATH, run > make CROSS_COMPILE=sparc64-linux- ARCH=sparc64 ... # first generate .config > > > Kindly illuminate as to how shall I reproduce the compiler warning. > > > > 803024b6c8a375 Syed Nayyar Waris 2020-06-15 @638 map[index + 1] &= ~BITMAP_LAST_WORD_MASK(start + nbits); > > > 803024b6c8a375 Syed Nayyar Waris 2020-06-15 @639 map[index + 1] |= (value >> space); > > Hmm... I think I sent a reply [2] where I explained how space can be > 64. Do you agree with analysis? > > [1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/ > [2]: https://lore.kernel.org/lkml/20200616081428.GP2428291@smile.fi.intel.com/ -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3409085611176684517==" MIME-Version: 1.0 From: Andy Shevchenko To: kbuild-all@lists.01.org Subject: Re: [PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro Date: Fri, 19 Jun 2020 12:05:00 +0300 Message-ID: <20200619090500.GC2428291@smile.fi.intel.com> In-Reply-To: List-Id: --===============3409085611176684517== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, Jun 19, 2020 at 11:38:59AM +0300, Andy Shevchenko wrote: > On Fri, Jun 19, 2020 at 10:02 AM Syed Nayyar Waris wrote: > = > ... > = > > > config: sparc64-randconfig-s032-20200615 (attached as .config) > > > compiler: sparc64-linux-gcc (GCC) 9.3.0 > > > reproduce: > > > # apt-get install sparse > > > # sparse version: v0.6.2-rc1-3-g55607964-dirty > > > # save the attached .config to linux build tree > > > make W=3D1 C=3D1 ARCH=3Dsparc64 CF=3D'-fdiagnostic-prefix -D_= _CHECK_ENDIAN__' > = > ... > = > > > sparse warnings: (new ones prefixed by >>) > > > > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) = for type unsigned long > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) = for type unsigned long > > > include/linux/bitmap.h:594:63: sparse: sparse: shift too big (64) = for type unsigned long > > > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) = for type unsigned long > > > >> include/linux/bitmap.h:638:17: sparse: sparse: invalid access past= the end of 'old' (8 8) > = > > It seems to me that to reproduce this warning, I have to use the > > sparc64 compiler. I have installed 'sparc64-linux-gnu-gcc' on my > > computer. > = > Sparse is not a compiler. On x86_64: CHECK drivers/gpio/gpio-xilinx.c include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsig= ned long include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsig= ned long include/linux/bitmap.h:594:63: warning: shift too big (64) for type unsig= ned long include/linux/bitmap.h:639:45: warning: shift too big (64) for type unsig= ned long include/linux/bitmap.h:638:17: warning: invalid access past the end of 'o= ld' (8 8) > > I have to specify that this compiler needs to be used for build > > process. How/ Where do I specify this? > > > > I have downloaded the config.gz (has config file) and placed it at the > > root of the linux kernel project tree. But the Makefile STILL has > > 'gcc' as the compiler. When I build, it is the 'gcc' compiler being > > used and not 'sparc64-linux-gnu-gcc'. I know I can manually change the > > Makefile to use sparc64 compiler, but I think there must be some more > > elegant way to do this, perhaps using make menuconfig? > = > If you wish to run a compilation, download a compiler from [1], and, > after adding its bin/ folder to PATH, run > make CROSS_COMPILE=3Dsparc64-linux- ARCH=3Dsparc64 ... # first generate .= config > = > > Kindly illuminate as to how shall I reproduce the compiler warning. > = > > > 803024b6c8a375 Syed Nayyar Waris 2020-06-15 @638 map[i= ndex + 1] &=3D ~BITMAP_LAST_WORD_MASK(start + nbits); > > > 803024b6c8a375 Syed Nayyar Waris 2020-06-15 @639 map[i= ndex + 1] |=3D (value >> space); > = > Hmm... I think I sent a reply [2] where I explained how space can be > 64. Do you agree with analysis? > = > [1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/ > [2]: https://lore.kernel.org/lkml/20200616081428.GP2428291(a)smile.fi.int= el.com/ -- = With Best Regards, Andy Shevchenko --===============3409085611176684517==--