From mboxrd@z Thu Jan 1 00:00:00 1970 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 374BEC46467 for ; Tue, 27 Dec 2022 08:38:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229760AbiL0Ih7 (ORCPT ); Tue, 27 Dec 2022 03:37:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiL0Ih4 (ORCPT ); Tue, 27 Dec 2022 03:37:56 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D6C31D7; Tue, 27 Dec 2022 00:37:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672130276; x=1703666276; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=JdaJO+fkzogC42+/Cx0uzxpw8R6GdnStKstxrzQC840=; b=CTZxoLaPEn3qMHspEUiYL1sVj9gOPDFewbqwuESqXmtuapYv3XeJbccg wWgJSDHxW3ABdkRzarDyAR6XOqYYl554JycoxOGggC2nRO2uV6dZ+fSTw KDFF7gip+rmS6OzT5+KkuBlv+Xektshv5mwfKYizxfy/B96ElonAHrG+7 YyPrbBZVwRM6DJ9exdnM6Oe9FkUIpa3WQDWDWkP8h/MzBKCKiCY0KPLmo fWXJL2qzzcwlJLoKxnhpvHqkUr4y8fRz8e3/zPQyAyPFFWK71pzdHTmGR LBqU+PNVThOlrYzkNkEtvaX8AdB6MekTiwrqUeaktt6VsQc5Uwfod7NXA A==; X-IronPort-AV: E=McAfee;i="6500,9779,10572"; a="385090269" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="385090269" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 00:37:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10572"; a="760268759" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="760268759" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 27 Dec 2022 00:37:49 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 7B985159; Tue, 27 Dec 2022 10:38:20 +0200 (EET) Date: Tue, 27 Dec 2022 10:38:20 +0200 From: Mika Westerberg To: "Jiri Slaby (SUSE)" Cc: linux-kernel@vger.kernel.org, Martin Liska , Andreas Noever , Michael Jamet , Yehezkel Bernat , linux-usb@vger.kernel.org Subject: Re: [PATCH v2] thunderbolt (gcc13): synchronize tb_port_is_clx_enabled()'s 2nd param Message-ID: References: <20221212102936.23074-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221212102936.23074-1-jirislaby@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 12, 2022 at 11:29:36AM +0100, Jiri Slaby (SUSE) wrote: > 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 former as the parameter is in fact a mask of the > enum values. > > 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) Applied now, thanks! I changed the title slightly to avoid words like "synchronize" because that makes me think this is fixing a race condition somewhere but in fact this is simply fixing a function prototope to match the definition :)