From patchwork Mon May 29 10:04:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13258376 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 E9BD3C77B7E for ; Mon, 29 May 2023 10:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbjE2KEi (ORCPT ); Mon, 29 May 2023 06:04:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231907AbjE2KEe (ORCPT ); Mon, 29 May 2023 06:04:34 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32AF3A7 for ; Mon, 29 May 2023 03:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685354672; x=1716890672; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kQc6YG/qIED9NqHZEoGGAm9SFSpB+fTbJkyPb98gsZE=; b=L3NZr7Y8+OC6XzzLIlByqkiUacOihSZke0WJzIW0XznT9WDyCbzqxY75 EFDvFgouOzzZkXIPJfvxPtbPQzAeQDexV7Tn9RglRXIcP1YYk1QYQQM0S ZACylAGOJOxq5juYQywBaRyhEzty/n/WnhLwDJFmx6ynXkMbi3B/+zfcC L2ynTmuVv7cE5oSZqr1ICSzdeqaRn0Skenxf75NrL+/f5m4yMdWZvXXSX Bwup+xHkD/qjLsN9uhwmZFQ0XqAKRAIf0xNAasjwqThefsREnKkx5eidx LW0jW+RrNk3eOwYOymhrpvWzQvw0NkS3UutDECub61gr2IOISFiVRmgqL g==; X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="354684415" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="354684415" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2023 03:04:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="683518281" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="683518281" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 29 May 2023 03:04:21 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id DE15F3B9; Mon, 29 May 2023 13:04:25 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Gil Fine , Mika Westerberg Subject: [PATCH 03/20] thunderbolt: Fix a couple of style issues in TMU code Date: Mon, 29 May 2023 13:04:08 +0300 Message-Id: <20230529100425.6125-4-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230529100425.6125-1-mika.westerberg@linux.intel.com> References: <20230529100425.6125-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Drop extra empty line and get rid of the '__' in function names. No functional changes. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tmu.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/thunderbolt/tmu.c b/drivers/thunderbolt/tmu.c index a46203b33c5f..8614e154be5f 100644 --- a/drivers/thunderbolt/tmu.c +++ b/drivers/thunderbolt/tmu.c @@ -395,7 +395,6 @@ int tb_switch_tmu_disable(struct tb_switch *sw) if (sw->tmu.rate == TB_SWITCH_TMU_RATE_OFF) return 0; - if (tb_route(sw)) { bool unidirectional = sw->tmu.unidirectional; struct tb_port *down, *up; @@ -439,7 +438,7 @@ int tb_switch_tmu_disable(struct tb_switch *sw) return 0; } -static void __tb_switch_tmu_off(struct tb_switch *sw, bool unidirectional) +static void tb_switch_tmu_off(struct tb_switch *sw, bool unidirectional) { struct tb_port *down, *up; @@ -469,7 +468,7 @@ static void __tb_switch_tmu_off(struct tb_switch *sw, bool unidirectional) * This function is called when the previous TMU mode was * TB_SWITCH_TMU_RATE_OFF. */ -static int __tb_switch_tmu_enable_bidirectional(struct tb_switch *sw) +static int tb_switch_tmu_enable_bidirectional(struct tb_switch *sw) { struct tb_port *up, *down; int ret; @@ -500,7 +499,7 @@ static int __tb_switch_tmu_enable_bidirectional(struct tb_switch *sw) return 0; out: - __tb_switch_tmu_off(sw, false); + tb_switch_tmu_off(sw, false); return ret; } @@ -533,7 +532,7 @@ static int tb_switch_tmu_unidirectional_enable(struct tb_switch *sw) * This function is called when the previous TMU mode was * TB_SWITCH_TMU_RATE_OFF. */ -static int __tb_switch_tmu_enable_unidirectional(struct tb_switch *sw) +static int tb_switch_tmu_enable_unidirectional(struct tb_switch *sw) { struct tb_port *up, *down; int ret; @@ -568,11 +567,11 @@ static int __tb_switch_tmu_enable_unidirectional(struct tb_switch *sw) return 0; out: - __tb_switch_tmu_off(sw, true); + tb_switch_tmu_off(sw, true); return ret; } -static void __tb_switch_tmu_change_mode_prev(struct tb_switch *sw) +static void tb_switch_tmu_change_mode_prev(struct tb_switch *sw) { struct tb_port *down, *up; @@ -594,7 +593,7 @@ static void __tb_switch_tmu_change_mode_prev(struct tb_switch *sw) tb_port_tmu_set_unidirectional(up, sw->tmu.unidirectional); } -static int __tb_switch_tmu_change_mode(struct tb_switch *sw) +static int tb_switch_tmu_change_mode(struct tb_switch *sw) { struct tb_port *up, *down; int ret; @@ -632,7 +631,7 @@ static int __tb_switch_tmu_change_mode(struct tb_switch *sw) return 0; out: - __tb_switch_tmu_change_mode_prev(sw); + tb_switch_tmu_change_mode_prev(sw); return ret; } @@ -695,13 +694,13 @@ int tb_switch_tmu_enable(struct tb_switch *sw) */ if (sw->tmu.rate == TB_SWITCH_TMU_RATE_OFF) { if (unidirectional) - ret = __tb_switch_tmu_enable_unidirectional(sw); + ret = tb_switch_tmu_enable_unidirectional(sw); else - ret = __tb_switch_tmu_enable_bidirectional(sw); + ret = tb_switch_tmu_enable_bidirectional(sw); if (ret) return ret; } else if (sw->tmu.rate == TB_SWITCH_TMU_RATE_NORMAL) { - ret = __tb_switch_tmu_change_mode(sw); + ret = tb_switch_tmu_change_mode(sw); if (ret) return ret; }