Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2185946pxb; Thu, 4 Nov 2021 15:41:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD+/E932Ux2Q01f6YCizh7CVz2hA4jQRpdFR/68dkygOOcCHb0Ze501hqVp2WdBHFSuAMv X-Received: by 2002:a17:906:d1d1:: with SMTP id bs17mr64645738ejb.198.1636065703407; Thu, 04 Nov 2021 15:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636065703; cv=none; d=google.com; s=arc-20160816; b=clrNLxVrvBjnpUvcPY0zXc2jEJ2v2HxDyGk1xS0GAtB/nN118w6Fz+3t0wiIYVN45Q /NlhEQyMmrf5cku4a8W/BGg3VQd74ppUnT1Hzb/SJ/Co3DoyT+e9Ai9U6BaMcCGRYPTC kPwX2XIKNtG5D/9nWCFCDClo+d/HvfgUcUmF8BZtGTOqcev5kFFxQ4Me8ijRrK2HN7Vu nh+RGM1j9RbHuww8xw4+Ud9+VTiku6DDiAdDiMHwP/ckUtMspf+bOWyj2Cte/w1apkxb AccNJdBNfmGZRSxo89JIc5eRhjXVHXzU0nVW+QgYotyw0HXNnU7+Ilh14a/KJqLNRJ0m ImPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=StHzO80GoFuDSS/nsnO9ZH+1XVkJ3ByDck18uduunbk=; b=bkyE455c2Sx4sEqmLoX5NHfa5L+Tqslcg6zQxSVjUX0tA0eyMqj31OJM1lF0w6gdf0 DBTMjUOyW5g4QmTMxivNe2tKVeGt8y2FARYkSEo/EoEFJIa0rgYH8BxF1xvZQGfdKJFb 6rOEwh6F0iZoTuh2UfTrRet8wxZE7+8vF3AtXboxurLuyH8sX2GHP15nNp9t2Gap+VSM rM70AxtgGQcfHnk/h9yN1qinoKccow+z+xO+R3gHgHZzW8tLc32OYfCAPjQW9+x3Jb8E cGXWi9BVpP7o+EHY3maX7xtzO41iu2DyzvayPGhCLCn1r7RJAvuln980h+e/n3ct9yrx Gbyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MEDhjRMW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si11108855ejw.588.2021.11.04.15.41.19; Thu, 04 Nov 2021 15:41:43 -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=@kernel.org header.s=k20201202 header.b=MEDhjRMW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232272AbhKDWCW (ORCPT + 99 others); Thu, 4 Nov 2021 18:02:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:41456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232336AbhKDWCN (ORCPT ); Thu, 4 Nov 2021 18:02:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CCC4E61267; Thu, 4 Nov 2021 21:59:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636063175; bh=dpz/Kq034PoEyMdh5IwG1YW0B9x+52MEt1VYusOTdWg=; h=From:To:Cc:Subject:Date:From; b=MEDhjRMWCrE9x1d4o9ANKrw8fpO/JMTKGQg/mSww83t7weUYScm8pmopyV5a86H47 uZLwLUhBPpSYA0BiZlBRDh4MhPSD4g/xMoP0D2t2muOYjoOUH0e2SkpaUBtqxJQttM LwBW+5mBPWNXfVZTuhgxgKRg1O5N0NC+8l6o5OIWmg8dQNglkpmigiBxYQ5xCqOGxe Fk+Th/9GgoATO/VqyQ60oTCRsidnU9vSjm/tE0RA4TQ2W2WNvxCDLp5N2NYcIiyy6u juubWGcXBNgklrVHgVyuxPbi3EiOJcVvDQEMLJk+tEzAvIqR1TUnQEZGhVhFTUzfVa uJTUVr+GxeMng== From: Nathan Chancellor To: Minas Harutyunyan , Greg Kroah-Hartman Cc: Nick Desaulniers , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH] usb: dwc2: hcd_queue: Fix use of floating point literal Date: Thu, 4 Nov 2021 14:59:23 -0700 Message-Id: <20211104215923.719785-1-nathan@kernel.org> X-Mailer: git-send-email 2.34.0.rc0 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A new commit in LLVM causes an error on the use of 'long double' when '-mno-x87' is used, which the kernel does through an alias, '-mno-80387' (see the LLVM commit below for more details around why it does this). drivers/usb/dwc2/hcd_queue.c:1744:25: error: expression requires 'long double' type support, but target 'x86_64-unknown-linux-gnu' does not support it delay = ktime_set(0, DWC2_RETRY_WAIT_DELAY); ^ drivers/usb/dwc2/hcd_queue.c:62:34: note: expanded from macro 'DWC2_RETRY_WAIT_DELAY' #define DWC2_RETRY_WAIT_DELAY (1 * 1E6L) ^ 1 error generated. This happens due to the use of a 'long double' literal. The 'E6' part of '1E6L' causes the literal to be a 'double' then the 'L' suffix promotes it to 'long double'. There is no visible reason for a floating point value in this driver, as the value is only used as a parameter to a function that expects an integer type. Use USEC_PER_SEC, which is the same integer value as '1E6L', to avoid changing functionality but fix the error. Fixes: 6ed30a7d8ec2 ("usb: dwc2: host: use hrtimer for NAK retries") Link: https://github.com/ClangBuiltLinux/linux/issues/1497 Link: https://github.com/llvm/llvm-project/commit/a8083d42b1c346e21623a1d36d1f0cadd7801d83 Signed-off-by: Nathan Chancellor --- drivers/usb/dwc2/hcd_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c index 89a788326c56..bdf1927e1be1 100644 --- a/drivers/usb/dwc2/hcd_queue.c +++ b/drivers/usb/dwc2/hcd_queue.c @@ -59,7 +59,7 @@ #define DWC2_UNRESERVE_DELAY (msecs_to_jiffies(5)) /* If we get a NAK, wait this long before retrying */ -#define DWC2_RETRY_WAIT_DELAY (1 * 1E6L) +#define DWC2_RETRY_WAIT_DELAY (1 * USEC_PER_SEC) /** * dwc2_periodic_channel_available() - Checks that a channel is available for a base-commit: d4439a1189f93d0ac1eaf0197db8e6b3e197d5c7 -- 2.34.0.rc0