Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5807498imm; Wed, 12 Sep 2018 11:24:21 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda23h87ld7Gvh0MvwuH8VaOO3wmKeHXnuPG7limy7n15DO93bSuUF2MHoDsQwR2W8Lq9w2G X-Received: by 2002:a17:902:7c0a:: with SMTP id x10-v6mr3669465pll.77.1536776661725; Wed, 12 Sep 2018 11:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536776661; cv=none; d=google.com; s=arc-20160816; b=sow0BZAPMOW5Cxm5x0XkgomfFJHWlVqrAG2ZGSkd14LGGxU628jhf5o70auztrOyjd 7rXOjZ+DDRhS+jF49g3WjoIb0+LC1aL+3BiinsE8/69NBLo1lWBuZA5D41UwQm9ED4sN g5oeJMX4aiR88XbeVDer4tRKqRFu2gpzog+ZSKa6lIOkbzYMhIdWZswHO00uw3Gg+lmb Gs27hVxCEm5O5WL0isbPI6Ycsg6mU1oZheYnj9k+7pfE+S1XA9kaSpwmXebpqCZTtton dXddMSJNd7fN/U83YTlSx+KR7loY74IuHJGtvppcSQ6gxtfxPD1yHyjlavPCK73+N7Fj vyiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=78zE2RUYart1eDswnsALitXSy4kUO5QJEClvYaLU1Mc=; b=RCLxxYx1jvIIFLmKDfYCYjmhbEBAHj5vLfzsuVwCfMezU/tsLsQxA91NiOCp0fx85z u6yuJxKeDmiTisu1QzqgmtMPsnj35NTpcTrMEZXBQaT0ELmIB6XICQtcV/Ld52ri/Do3 OAOmANj7ofiQEQ2AGTP2XMLON8kY252dYDgTmC+vIuPxI8WWP8GgH1PX/rAB69eIQiV8 aWFpJVaqk+NariVc2GaXreCiwQcbI8rHAHM0U7fIJYr7gQjM5WlS6gMI0U0XBrCkIiQS Y0X4ZNPIxXJ3v6YmnDJymCqtf9Yk7kPc+HuvUE0TEdXHYcqABMwKSX9KjJJk6HqJPhyF z6hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UfzNanpI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id j8-v6si1564962plk.196.2018.09.12.11.24.05; Wed, 12 Sep 2018 11:24:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UfzNanpI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727837AbeILX3m (ORCPT + 99 others); Wed, 12 Sep 2018 19:29:42 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46239 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727332AbeILX3m (ORCPT ); Wed, 12 Sep 2018 19:29:42 -0400 Received: by mail-pl1-f195.google.com with SMTP id t19-v6so1358411ply.13; Wed, 12 Sep 2018 11:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=78zE2RUYart1eDswnsALitXSy4kUO5QJEClvYaLU1Mc=; b=UfzNanpIOjJUIPL3DTRf3xsBBOaUfpGDVlNipp/9CDfM/E0ki5CRuBmvxW/B1I4uRz IRfHFC1m8wOpBJ+TPMhkjogZOjxLF9yoYSue5ozRFvbuToNgxqzPwdM17Txz8cGCgMdM FE/eLb33HbmLJOO3IXipLu8TPhGvIEv5M4wlFM5whgvczzinSx4FCJS/O5YfAt9UgCfv PkuopU1FzdDli0zBbHwBlj2Dg6YNWHeRiWe8K5iQe05U9ER0zbm0L77Vbg6MeSxE7Xxy y8osktfCUbR+YuqVKD3Qpy1GqaQz825kX5o9GRfQ2fOXH2xYmrbYWZd4hTxG2bjouOeq 2tEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=78zE2RUYart1eDswnsALitXSy4kUO5QJEClvYaLU1Mc=; b=Vrc30UMIWZ3TMGFQBXN+pU4c2xx5gILtDzLUvvgVO8XYOotIlil6q2omoTPBArxPNh BlykuJVatwvLxX79EM9Ppl/9dvYiv8OAwJdGmQZBKRBGbSNVeXhV9a2NXmMS139pjRVZ WVgpgKwtJyTl6OGPD/Y77WAz0dMJ12KU0vh+WMB422WmjFcKYDlP6ejaRTOaTukq+i4D eB8ruEoEcgTI1NW+yr0xAT1iIoKzdiXJbiCh1QKZfjziUQ+7Hd5Pl7li+RzIK1HGX+F9 GDb8fwT1s6dAfKkkwGmsbxNvls9g4qt07b2Fc4+tLKzR38yxW4vvE1EDrxNuO45j+IVf F9iw== X-Gm-Message-State: APzg51DuXIo4R4GH6pRV9whY3Fx6Z+isSTWJztb3sTwF2e+7w2sT3gVA 3v4n++oyVaUgD/wMsaLOxd97vxq1 X-Received: by 2002:a17:902:1681:: with SMTP id h1-v6mr3662698plh.262.1536776638172; Wed, 12 Sep 2018 11:23:58 -0700 (PDT) Received: from himanshu-Vostro-3559 ([103.233.116.134]) by smtp.gmail.com with ESMTPSA id j184-v6sm2155672pge.77.2018.09.12.11.23.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Sep 2018 11:23:57 -0700 (PDT) Date: Wed, 12 Sep 2018 23:53:50 +0530 From: Himanshu Jha To: Afonso Bordado Cc: kbuild-all@01.org, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v4 4/5] iio: fxas21002c: add ODR/Scale support Message-ID: <20180912182350.GA13032@himanshu-Vostro-3559> References: <20180911150011.31964-4-afonsobordado@az8.co> <201809121715.5Babt1QC%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201809121715.5Babt1QC%fengguang.wu@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Afonso, On Wed, Sep 12, 2018 at 05:26:01PM +0800, kbuild test robot wrote: > Hi Afonso, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on iio/togreg] > [also build test ERROR on v4.19-rc3 next-20180912] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Afonso-Bordado/iio-gyro-add-support-for-fxas21002c/20180912-084443 > base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg > config: i386-allmodconfig (attached as .config) > compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 > reproduce: > # save the attached .config to linux build tree > make ARCH=i386 > > All errors (new ones prefixed by >>): > > >> ERROR: "__divdi3" [drivers/iio/gyro/fxas21002c.ko] undefined! > >> ERROR: "__udivdi3" [drivers/iio/gyro/fxas21002c.ko] undefined! Hmm. This is nasty error that had hit me back and occurs when you do 64 bit arithmetic in your code and assume it will also build for 32 bit environment(i386). https://lists.01.org/pipermail/kbuild-all/2018-July/050481.html But looking at the code seems like there is no such 64 bit division which is why 0-day didn't inform you the exact line of error unlike my case in above link. And I suspect it may be originating from your code snippet: #define FXAS21002C_SCALE(scale) (IIO_DEGREE_TO_RAD(62500U >> (scale))) and looking at the implementation: include/linux/iio/iio.h /** * IIO_DEGREE_TO_RAD() - Convert degree to rad * @deg: A value in degree * * Returns the given value converted from degree to rad */ #define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL) This '/' operator might be the culprit! Just for checking that the error, remove the macro declaration `FXAS21002C_SCALE` plus its usage and re-cross compile using `make ARCH=i386`. In my case I used the `div64_s64` function handles builds for both 32/64 arch accordingly. Thanks -- Himanshu Jha Undergraduate Student Department of Electronics & Communication Guru Tegh Bahadur Institute of Technology