From patchwork Sat Oct 8 19:45:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 613493 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 D261FC433FE for ; Sat, 8 Oct 2022 19:44:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229900AbiJHTou (ORCPT ); Sat, 8 Oct 2022 15:44:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229928AbiJHTop (ORCPT ); Sat, 8 Oct 2022 15:44:45 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F7E2E0D3; Sat, 8 Oct 2022 12:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665258284; x=1696794284; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9lmz04rN+kLTMcQl6akRYapYbLeumDWgsbmmCsC6CtU=; b=WwLoRxANyePd6/AGKdL1KfiF92b/LIthMsuLpQ0WJcc7DG7Fu4ni3sTl sNETUMCieVwsPuUWdABqjin5uym3LOtv+Qi1bnmGhZUqKczh9NZnzvoGJ mb/AzvfCaeNkZjXJadTTpeMtNErWvWkQpmCZXewFERUPqPse05hcaitb4 teRizaUltkxjnmv24RH8yFG/82CV3TEYKMjZ3+ocFp5a7MrQcs68ALe0y ALh9SPjQdorLQyKr5jGDpiBPQyiRoLZ6icAjwBEdxazDlxC6U40T+foFS JUb41YP4KtOWmT9hM+jVlXYO4atPSMUS+7MZUSsAu5Kh7UucoCaOdIW3k Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10494"; a="303961674" X-IronPort-AV: E=Sophos;i="5.95,170,1661842800"; d="scan'208";a="303961674" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2022 12:44:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10494"; a="730041067" X-IronPort-AV: E=Sophos;i="5.95,170,1661842800"; d="scan'208";a="730041067" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 08 Oct 2022 12:44:41 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1C797D0; Sat, 8 Oct 2022 22:45:02 +0300 (EEST) From: Andy Shevchenko To: Mika Westerberg , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andreas Noever , Michael Jamet , Yehezkel Bernat , Andy Shevchenko Subject: [PATCH v1 1/1] thunderbolt: Use str_enabled_disabled() helper Date: Sat, 8 Oct 2022 22:45:01 +0300 Message-Id: <20221008194501.38157-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use str_enabled_disabled() helper instead of open coding the same. Signed-off-by: Andy Shevchenko --- drivers/thunderbolt/switch.c | 5 +++-- drivers/thunderbolt/xdomain.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 60da5c23ccaf..363d712aa364 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -8,12 +8,13 @@ #include #include +#include #include #include #include #include #include -#include +#include #include "tb.h" @@ -644,7 +645,7 @@ static int __tb_port_enable(struct tb_port *port, bool enable) if (ret) return ret; - tb_port_dbg(port, "lane %sabled\n", enable ? "en" : "dis"); + tb_port_dbg(port, "lane %s\n", str_enabled_disabled(enable)); return 0; } diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c index f00b2f62d8e3..ddd8fd2d06f8 100644 --- a/drivers/thunderbolt/xdomain.c +++ b/drivers/thunderbolt/xdomain.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -1344,7 +1345,7 @@ static int tb_xdomain_bond_lanes_uuid_high(struct tb_xdomain *xd) tb_port_update_credits(port); tb_xdomain_update_link_attributes(xd); - dev_dbg(&xd->dev, "lane bonding %sabled\n", width == 2 ? "en" : "dis"); + dev_dbg(&xd->dev, "lane bonding %s\n", str_enabled_disabled(width == 2)); return 0; }