Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5133984rwb; Tue, 17 Jan 2023 09:33:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXthMFDhW3NGRJjx1aNCx/IrL+yhUMpLZ8UoV5Egn5cbCf4gEETzF6lhBJYHhQQgXyfwboa1 X-Received: by 2002:a17:902:bd41:b0:194:3cef:31 with SMTP id b1-20020a170902bd4100b001943cef0031mr4427656plx.49.1673976825421; Tue, 17 Jan 2023 09:33:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673976825; cv=none; d=google.com; s=arc-20160816; b=L+m8V5Wjp6Ny7crGamhxF3AlAtQ0xkIE+F4jQftVc9YrxsjsxVuO+h9AceUEXYbtLr eP5rYjB5EYTrdBjjcspQ7G7VtzETyoCwCV+oWxJ3ZZ6JkYR4RcIPkP4YkimjDofNvqJ+ 1OrR4BiomeYSI2o/9Kji6WogXoVOkki5HK+zeup27FF5YHxVzI5cEh7lFDlUeMj09n0S +Yz/4ghaB1egZkh4wYkLcz8jjfZEMxgzt7iMSYdyjMWtLG9j5OjBReJGbMh8QWjIZTkm 6WmUqb6h8KPpZicSg3+3Li9Iwvsvt8El7aqEiEXWfyQkBIVYWckUQlV5riqyJVjnLbxB +JLg== 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=XQEA1M2h+VVKkxVD7YIcIFCCJZFIyBDdSuVzUO2nxfc=; b=t6qflDf9TnPvetdizBMKLVUd0YU+kH25qyBnpzy07LB6BUANWQLL1F2Xi/58KBQLUL XO0jEgUIVdzaJ+7u1sGN0dCC0856pKqHSPDVCFsDXG7YM/XG/N06tAIkNYBChkFFD5rF il6pevaZGnuAiUQPlXDGd3tsD2ej/q1xFX1WwE/WGcCVBKi6AIMOsMcuYCw7zcKF/y2S 208haVF171CKMAjSvtlpfNc/JixIu9kxOOshjIce54MdGx2qCN9VvKjwJUK6eCxadmSG FMSc26rVg6SwpXT47TRLpvCZUst9WbPOQHtfnCDkPaP+A8UcQLLq+3q7aJuwtEFKzPKe qsjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wfs8Li5b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020a170903234100b001928c9d771asi35760034plh.517.2023.01.17.09.33.39; Tue, 17 Jan 2023 09:33:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wfs8Li5b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232579AbjAQQi4 (ORCPT + 48 others); Tue, 17 Jan 2023 11:38:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230453AbjAQQik (ORCPT ); Tue, 17 Jan 2023 11:38:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E161303CD; Tue, 17 Jan 2023 08:38:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 27951614DB; Tue, 17 Jan 2023 16:38:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 263ABC433D2; Tue, 17 Jan 2023 16:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673973518; bh=K6sp7vxwz2kbyJDM0TQqlfRJA30AWKr6mOQv83dI0PA=; h=From:To:Cc:Subject:Date:From; b=Wfs8Li5beijwB4/pPLy54lafHB/pKGjIBEDJqNJykOC0XG7rusmyBtaWLETWAGofy iDG2fPKsnqZYSgdCdoxcYOP84l4oIvbEHcv4vI23t+amVbLbhWA2ewK0tvfAUDpbIZ qaLOKpM2kvCzH0nxGXt6ATu/J7NMSKj1ZZM5mpsY3peQASWh+cS6iDI9RlgTAeLIxo XCy2iHVSmDQq4nQGHuCpE5AAEaakJ/GUKKjjQnweunX/D5UArtHUKFioUHDlXA3Pr9 s4wFY/NeVhKCJQcHotuuLdzsy1+JD9ENKh/5aYLjSGgAi10F3bzEDEYLP5jQgf2hqm PcC6ed4Ui6mrw== From: Arnd Bergmann To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: stex: fix MU_MAX_DELAY typecheck Date: Tue, 17 Jan 2023 17:38:27 +0100 Message-Id: <20230117163834.1053763-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann time_after() expects arguments of the same type, but gcc-13 changed the way that typeof(MU_MAX_DELAY) is determined, causing a build warning as 'before + MU_MAX_DELAY * HZ' gets promoted to a 64-bit integer: In file included from include/linux/bitops.h:7, from include/linux/kernel.h:22, from drivers/scsi/stex.c:13: drivers/scsi/stex.c: In function 'stex_common_handshake': include/linux/typecheck.h:12:25: error: comparison of distinct pointer types lacks a cast [-Werror] 12 | (void)(&__dummy == &__dummy2); \ | ^~ include/linux/jiffies.h:106:10: note: in expansion of macro 'typecheck' 106 | typecheck(unsigned long, b) && \ | ^~~~~~~~~ drivers/scsi/stex.c:1035:29: note: in expansion of macro 'time_after' 1035 | if (time_after(jiffies, before + MU_MAX_DELAY * HZ)) { Change the enum definition so all values fit into an unsigned 32-bit number. Signed-off-by: Arnd Bergmann --- drivers/scsi/stex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 8def242675ef..23462d3c9850 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -110,7 +110,7 @@ enum { TASK_ATTRIBUTE_ORDERED = 0x2, TASK_ATTRIBUTE_ACA = 0x4, - SS_STS_NORMAL = 0x80000000, + SS_STS_NORMAL = 0x80000000u, SS_STS_DONE = 0x40000000, SS_STS_HANDSHAKE = 0x20000000, @@ -120,7 +120,7 @@ enum { SS_I2H_REQUEST_RESET = 0x2000, - SS_MU_OPERATIONAL = 0x80000000, + SS_MU_OPERATIONAL = 0x80000000u, STEX_CDB_LENGTH = 16, STATUS_VAR_LEN = 128, @@ -173,7 +173,7 @@ enum { ST_ADDITIONAL_MEM_MIN = 0x80000, PMIC_SHUTDOWN = 0x0D, PMIC_REUMSE = 0x10, - ST_IGNORED = -1, + ST_IGNORED = -1u, ST_NOTHANDLED = 7, ST_S3 = 3, ST_S4 = 4, -- 2.39.0