Received: by 10.223.185.116 with SMTP id b49csp3966807wrg; Tue, 13 Feb 2018 10:30:18 -0800 (PST) X-Google-Smtp-Source: AH8x224XhTD0cLTblaI33kBFVlTGR8BpIOHWEjKsXgXLQe+Pv26Ia1lL6PxPT19JVguTXmrmgL7y X-Received: by 2002:a17:902:2823:: with SMTP id e32-v6mr1972748plb.44.1518546618848; Tue, 13 Feb 2018 10:30:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518546618; cv=none; d=google.com; s=arc-20160816; b=FA+qIEa0zT7XGboy9NyHRh2xTOOXBY2bbqpKBCN0PM0/DgaQhUcjKxMPwX+wVcvz5u RpGq6k3sBwoWpGuWoMj+Alxx59GP0LCfXYustiOOk+4iNQOMJ3PiRcrqkjt0X7no5TcE Fsw6uspA+lXqlrh7Wn0pY+t6ipQ/eO4Q1tNkmYeP2qPrUtlsxTu3Bh5P4ka+s7xQhMl1 K9F4hDuN47t1mYNSZOKe6fdyYO8xUYxTg4rx6B23t9mxD10YHirIjF7NG0QNUISQwjUv qAOu9GZFg6kod1y/UDTyWCk4tCTiS1QXUGiYVgHW0+/XjA/ZjFODQoQfTDvLxUfVPqa/ nOiQ== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=nQ3vZ04ZpaCpIYfHexLpNQGIBTLajmzwv8QGXkePzkE=; b=my3gu9pOOiIUHlZ/GGwdEWsuOJOxTy1210yM1RCrVSJFDP+ihNZnK5Td3u2ulLR5v2 X0/QnVzaezrrFdwEyzPSBEzw2bAcZ7qHf2Cy2VrGLoR9f/wX5EECzfL11kTv+D964zyD rPwzoUsSlf/QtAy79zX6EmFdjLGdBna3JBAA9/CwmxjshBDHFNm6CIYWe6cjuaIRr+L7 GcY4TVoKyh3weBdDZ1VFMi+xv3gJj7Q/u8cQJ8GLMZVO4J3ngiKGP0DROv+5gYYM+BH+ xMMHJbO7rNtF5uVUgqLcPw9KigPBmx5p067WwDnv4gppTiuPvebhscWfwfQgdRQeb1q4 8BXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VYf+ZtU4; 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 34-v6si1473516plc.368.2018.02.13.10.30.04; Tue, 13 Feb 2018 10:30:18 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VYf+ZtU4; 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 S965490AbeBMS30 (ORCPT + 99 others); Tue, 13 Feb 2018 13:29:26 -0500 Received: from mail-qk0-f170.google.com ([209.85.220.170]:36833 "EHLO mail-qk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965344AbeBMS3X (ORCPT ); Tue, 13 Feb 2018 13:29:23 -0500 Received: by mail-qk0-f170.google.com with SMTP id 15so23580435qkl.3; Tue, 13 Feb 2018 10:29:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nQ3vZ04ZpaCpIYfHexLpNQGIBTLajmzwv8QGXkePzkE=; b=VYf+ZtU4FocohsNTjKR1lyuCNdIzYmrsAFCymRAimJzp0bkqElDesaQZuZ2/5T40Hh QbTpH/rTPuVwZ7DFreSZJFETwkn/j223iUhjcun7Mw/nxJ/z+hH4wgrpKcaculhCmOEU f9tNSLed0IDRFvpJSU+kHhIyB9sqOJ7d8QBfvnDpFyfj/JyEUw5qD+WT6Ctyvr9Ak9Cs TpChgdfxnZ7i9RSW1JKRQJaGh3CHC+ZeZ/fd0K9nfX4NdaHjUTjN5ambBPVxqE94quyr IHZNqLTJOwz8IdMeFzvMeCQf5inr3rXz5baZQIeGPwwLJIpZqsCKvK3vXMxHCCHHz7F0 SQdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nQ3vZ04ZpaCpIYfHexLpNQGIBTLajmzwv8QGXkePzkE=; b=nDoVvoxNqRSDF4ADLXUwSsjRTT0i7RZtJWGD3AXxcn75AgpaooempcxfjBf5liu+5U W959r+jarm/iffOuJR5isUvi8Pf960pn7pgFYFHKN6op4MemcmRjjrh6cqXD0PCLE9wC F/P6YJLK9YAkCEZ26NeGZCYaafTTaYQWQL6dp6sWt7i06aP6Y/2ok06PNlaT1Aw65nnq JjQB+Te8xB9pQwhUbwjflYS6Sk5Ebm2m2UuJIIU4/PukEYNijYOS95mL8bUdWpU14M5B 1W3pIb/40GBDOR0ekr2vHNM6WVSRUoON8l3prZAnvPTVFrnipbxsiL8S0UjLCbGwSqCL Kd8w== X-Gm-Message-State: APf1xPCmneW7+U10BhcpLfYaCIqUoJx03BCKDctR6E0DJOYQLWylZG25 VyFvNEp3bg7S7bwPUPcaw6o7EcZ4qdvLEFCRUFI= X-Received: by 10.55.120.66 with SMTP id t63mr3147543qkc.345.1518546562121; Tue, 13 Feb 2018 10:29:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.195.82 with HTTP; Tue, 13 Feb 2018 10:29:21 -0800 (PST) In-Reply-To: <20180213165948.GA14035@embeddedor.com> References: <20180213165948.GA14035@embeddedor.com> From: Andy Shevchenko Date: Tue, 13 Feb 2018 20:29:21 +0200 Message-ID: Subject: Re: [PATCH] PCI/ASPM: Use 64-bit arithmetic instead of 32-bit To: "Gustavo A. R. Silva" Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Linux Kernel Mailing List 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 Tue, Feb 13, 2018 at 6:59 PM, Gustavo A. R. Silva wrote: > Add suffix ULL to constant 1000 in order to give the compiler complete > information about the proper arithmetic to use. Notice that this > constant is used in a context that expects an expression of type > u64 (64 bits, unsigned). > > The expression threshold_us * 1000 is currently being evaluated > using 32-bit arithmetic. > - u64 threshold_ns = threshold_us * 1000; > + u64 threshold_ns = threshold_us * 1000ULL; Shouldn't be other way around, i.e. (u64)threshold_us ? But still the question. have you checked all callers? Does it even makes sense? -- With Best Regards, Andy Shevchenko