Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3045321imb; Mon, 4 Mar 2019 22:45:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxcxO1Rio+RfdUc4/VznJql71gzc+Hyv3BDKaYX8+CXF7NEoSfogkRWsagzJ1voOfcZr2e1 X-Received: by 2002:a65:62c2:: with SMTP id m2mr86941pgv.348.1551768326544; Mon, 04 Mar 2019 22:45:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551768326; cv=none; d=google.com; s=arc-20160816; b=osKrjfVLotLtIdHfo3fuuVFm00bMIe4XG9Hc9G0wp7yQRDbW7ZkTZB0WXjptTQ/1vj uOR9AxYPVMImaoEPSS0rMh1Enoy6EP6JWqVhV+LOf+UOZ5UVmTotIDlbseoN5nsD7QNu LhvEcJ8iheZvk/dOK6NUgUUTtJkaYx62JPRZQaQA50Ie7U+2nxGuRBwGLAiR4lz83tro T+dNcZFPctRbvd4UF1kLzp3Hx9kQvZYqAZHpH1lihvhpV11rmlkm6QX1NIxhZ//f9erM rvnQ+uzs4dYwSGT9pdc7+5b9KUkikdA4izdw52Uarzqr31CXrXVI4+Cm1DWNnJ9AAfIq 0z/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=f/+VdoYayg1ZMET1sBPWnSa7nOsFMyqsz/hILeJzvb0=; b=VmzvTfYdf9UEi2BavIE+ZX/dijdT0YwS0jjLA9FlOTU+yB9r2lhrPoaCjiKK4wvJBM Ul2cJRLU2MiD1+r3hc46STqT4C4Y1ltj7iro97o0qQD31G9/PTUnCbIM521DmzdYprsl uuW5P56S0SAmKCxvb1f+vek+OZj7kmAdlltHJ/NkLwjebxfZ4kYF2vafcFymn5/V3u7S gd9Ftx6mP82mXY4ZJ8QMShsUT+1l0Vswb8NNyFGiQYmZpodN8gxbDQ6TagzPF6CKzvfi ybPrmokEH8ydxsPrXS6HAZkTFWUOMnDDZh0jz/YKSRDfoq8g/5sV4YBGwhz235ggvtyY Rpew== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj2si7541005plb.9.2019.03.04.22.45.11; Mon, 04 Mar 2019 22:45:26 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbfCEGn6 (ORCPT + 99 others); Tue, 5 Mar 2019 01:43:58 -0500 Received: from mga09.intel.com ([134.134.136.24]:48974 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbfCEGn6 (ORCPT ); Tue, 5 Mar 2019 01:43:58 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2019 22:43:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,443,1544515200"; d="scan'208";a="139188762" Received: from kphartnx-mobl1.ger.corp.intel.com ([10.252.28.244]) by orsmga002.jf.intel.com with ESMTP; 04 Mar 2019 22:43:54 -0800 Message-ID: Subject: Re: [PATCH] iwlwifi: fix 64-bit division From: Luciano Coelho To: Arnd Bergmann , Johannes Berg , Emmanuel Grumbach , Intel Linux Wireless , Kalle Valo , "David S. Miller" Cc: Avraham Stern , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 05 Mar 2019 08:43:53 +0200 In-Reply-To: <20190304203924.2111146-1-arnd@arndb.de> References: <20190304203924.2111146-1-arnd@arndb.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Mon, 2019-03-04 at 21:38 +0100, Arnd Bergmann wrote: > do_div() expects unsigned operands and otherwise triggers a warning > like: > > drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: error: > comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka > 'long long *') and 'uint64_t *' (aka 'unsigned long long *')) [- > Werror,-Wcompare-distinct-pointer-types] > do_div(rtt_avg, 6666); > ^~~~~~~~~~~~~~~~~~~~~ > include/asm-generic/div64.h:222:28: note: expanded from macro > 'do_div' > (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ > ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ > 1 error generated. > > Change the do_div() to the simpler div_s64() that can handle > negative inputs correctly. > > Fixes: 937b10c0de68 ("iwlwifi: mvm: add debug prints for FTM") > Signed-off-by: Arnd Bergmann > --- This was already fixed with this patch: https://patchwork.kernel.org/patch/10823267/ ...but it hasn't reached the mainline yet. I'm planning to send it to the v5.1-rc series as soon as the merge window closes. Is that quick enough for you? -- Cheers, Luca.