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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E3563C43334 for ; Sat, 2 Jul 2022 14:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=knLr309Hbj9jSCefveP6qSRQC3jDonDfRiB+zmy29/I=; b=3YJS6HvIGURs52 4OUatqHfB8wJXF+iwsuV5COldaTXMjd9vFOjojgLhKQA5/D/I1wwTxHV2rDSh69VepiN1cfRcvfVE WbjRLX01ciG9KWlIgadR1pnH+X33nK+Gw8PpwMGccGKvU7mT2SsTkMpO3KC3fi6a8d7RazRbn/esB BKmBMdbyqg/klABpszvWXYWqmSnnzZPsqiCIkSrqPy1Ksan+0FRQ8YeVX+EmyPKDpB+uVTdmCkMRn 7ZlwY0J2tmthI0KEzvJf1++7a/ohrcgcP9pfMTOOOdZ+O2A+WZ66D+b1zdC+DtZheG4K3aJ2ne2cu KkiD6Lp+Ls5p3xBabwpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7der-009sK7-Qe; Sat, 02 Jul 2022 13:59:37 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7deo-009sJL-Rq for linux-arm-kernel@lists.infradead.org; Sat, 02 Jul 2022 13:59:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656770374; x=1688306374; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5+9mOmrkQARlLFpA6fKyHF3zesf+qeyZln9SHF45wiE=; b=Ov/YObM6XQPUPK4M7K9dCIiuZAisGFz68gMr815drFwiKc6ryU7AMgLW v1y0ub7hCHUC9fTuo+tgFXkiz2/a0jlUn/uifKDJ9SqZc+GqbV9OKCmN+ 6f0p1ijcb4xCRrLwGcLFRFnLXy/BDzTQSVDTMMLeKNgNfbu3mNRU6htpy 2xuQjT4EdEOZVVtXa5lfF5uJnHCI+W9Mb55NSD1RferQe/7Q4Xq7Vj2Ke ff7PnWhMEtd/EEroSfGAHAFTM0/JO+DD9gQnLNW3FFRNgUntnsYStDm/y fNgovUa5TCeOrjCskVKpco67UHfKmb5kkrRS5/Ge66ti7hq8/WEQxkcRB g==; X-IronPort-AV: E=McAfee;i="6400,9594,10395"; a="262630731" X-IronPort-AV: E=Sophos;i="5.92,240,1650956400"; d="scan'208";a="262630731" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2022 06:59:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,240,1650956400"; d="scan'208";a="566635210" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 02 Jul 2022 06:59:29 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9869C11D; Sat, 2 Jul 2022 16:59:35 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Wolfram Sang , Michael Walle , Krzysztof Kozlowski , Sam Protsenko , Lucas De Marchi , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v1 1/2] lib/string_helpers: Add str_read_write() helper Date: Sat, 2 Jul 2022 16:59:24 +0300 Message-Id: <20220702135925.73406-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220702_065934_986855_86CB2FD1 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Wolfram Sang , Krzysztof Kozlowski , Till Harbaum , Alim Akhtar , Codrin Ciubotariu , Claudiu Beznea Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add str_read_write() helper to retun 'read' or 'write' string literal. Signed-off-by: Andy Shevchenko --- include/linux/string_helpers.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index 4d72258d42fd..9e22cd78f3b8 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h @@ -126,4 +126,9 @@ static inline const char *str_enabled_disabled(bool v) return v ? "enabled" : "disabled"; } +static inline const char *str_read_write(bool v) +{ + return v ? "read" : "write"; +} + #endif -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel