From patchwork Mon Oct 31 11:43:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 620430 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7996EFA3744 for ; Mon, 31 Oct 2022 11:43:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbiJaLnm (ORCPT ); Mon, 31 Oct 2022 07:43:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230515AbiJaLnc (ORCPT ); Mon, 31 Oct 2022 07:43:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D25BE0F2; Mon, 31 Oct 2022 04:43:30 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id D18B6B815DB; Mon, 31 Oct 2022 11:43:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B74A0C433C1; Mon, 31 Oct 2022 11:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667216607; bh=LGnwjiqFus4lC7lWjIH4WNJZsVUsagb01qZRNxcct+E=; h=From:To:Cc:Subject:Date:From; b=Y0BQvMvmkMXx/sjgMO28MKqSkIRr50j9BqrFXyfrHt+/Li8RopYmwEjlIoxehYT2/ jGMrkNe/FnbgW/B/kKFUTfjiLd+jRchTceGI+A8xTZMlEoGEpeC/JLIjtAol8tmAGH DvzWNqM+JbXlY3+Xvgxt0oa/oXDYkV/2pqug4/ngShlMkqUe/GgZFqLNcUGVzwK5R8 +BlFqOWfHiozTNvhfc/TiJoD2KHC8Kfx7V5OITlEucFC0kJtyj6gLxmH+/LxIn8WC9 Qp1fhMO8P9A9Cpoj644e4tAS9IdOYtX/E+ZAKA1Leypzq0qlfwq2vbQm6DKJ0AKh2R +9i9VW81BBqEw== From: "Jiri Slaby (SUSE)" To: andreas.noever@gmail.com Cc: linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Martin Liska , Michael Jamet , Mika Westerberg , Yehezkel Bernat , linux-usb@vger.kernel.org Subject: [PATCH] thunderbolt (gcc13): synchronize tb_port_is_clx_enabled()'s 2nd param Date: Mon, 31 Oct 2022 12:43:23 +0100 Message-Id: <20221031114323.10356-1-jirislaby@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org tb_port_is_clx_enabled() generates a valid warning with gcc-13: drivers/thunderbolt/switch.c:1286:6: error: conflicting types for 'tb_port_is_clx_enabled' due to enum/integer mismatch; have 'bool(struct tb_port *, unsigned int)' ... drivers/thunderbolt/tb.h:1050:6: note: previous declaration of 'tb_port_is_clx_enabled' with type 'bool(struct tb_port *, enum tb_clx)' ... I.e. the type of the 2nd parameter of tb_port_is_clx_enabled() in the declaration is unsigned int, while the definition spells enum tb_clx. Synchronize them to the latter. And do the same for tb_port_clx_supported() where the enum is propagated. Cc: Martin Liska Cc: Andreas Noever Cc: Michael Jamet Cc: Mika Westerberg Cc: Yehezkel Bernat Cc: linux-usb@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) --- drivers/thunderbolt/switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 363d712aa364..3693395253bb 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -1205,7 +1205,7 @@ static int tb_port_pm_secondary_disable(struct tb_port *port) } /* Called for USB4 or Titan Ridge routers only */ -static bool tb_port_clx_supported(struct tb_port *port, unsigned int clx_mask) +static bool tb_port_clx_supported(struct tb_port *port, enum tb_clx clx_mask) { u32 val, mask = 0; bool ret; @@ -1283,7 +1283,7 @@ static int tb_port_clx_enable(struct tb_port *port, enum tb_clx clx) * * Returns true if any of the given CL states is enabled for @port. */ -bool tb_port_is_clx_enabled(struct tb_port *port, unsigned int clx_mask) +bool tb_port_is_clx_enabled(struct tb_port *port, enum tb_clx clx_mask) { u32 val, mask = 0; int ret;