Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1986992rwb; Fri, 12 Aug 2022 09:56:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR5xT5uJaxUycMJ3P5elGb+GrS6Nh++XRwU0iNtdV+CORmniGlObRdHezoUY9Bls4McHD7sk X-Received: by 2002:a05:6402:1bcf:b0:443:1c7:cd07 with SMTP id ch15-20020a0564021bcf00b0044301c7cd07mr4468000edb.365.1660323418426; Fri, 12 Aug 2022 09:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660323418; cv=none; d=google.com; s=arc-20160816; b=qVH9bHkTqtFWcRYtxYjzPdEZzYdROcIz+yomvPN81if/CZ7xAkX/e5wGkwVQSIRCni O+ynvMOLEmFNEYPXjcZoKuM7F2hlf2cCbC5SaFdz2QhpWwkACwzBCa4oe2J+AjpmdsDD PoqNGSLJQttL8f20LPapUI6xDquPE4hWIBP1XcAAzixQYXJ8Z2F+ljE4CkqqH1ubiBft PxPnge2quUw2dvxCvCSIkcBf+FypPGtjyIkurlZus8ody4aNiPEbiT9PRl5npGHxnsO3 f14VwRWN057uZ+vnL9a8ANAw+HwXQUSN9D0Z6s6KofiE8vUirrm2YwFyM0kgPy1YMOFw 4znQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=kNxXhkdr74OhUzWIPaRNsxTjWoPYvj2BCzIs18HaIVo=; b=aeBPpyYI3e7jGXdlbl46UGlXWpLbMAFHnqqMiW1jZKZyF7R2YkJ7NTx0N3ffLriIdd h8pgzdCiGLqOiAglPV401dvMZ0NYXbCivEm1PFqN+JvDnAtqoH1hj0fSDVMRY+4u5+jm 8S5jWk/ckNyd/5bWdNIa2bs0cEIRFNu4m5A6H5EF0ZgpD59GjO+C8PnpoLdutPvwPdKC hB889jCQVOU1iRodal/f30r9m+nakkSAasHiL9X0TUq66qpez5SO+lfBej0OmPh2SFTF y0s8wX/RBrU/7FHowKpal8bNd58KDOVk+f2MW+uOdSMuv2hGow1GXj+ZuJaEE1Ua+9tn vCMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=DEuwsuKr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a71-20020a509ecd000000b0043e466cd526si2132140edf.187.2022.08.12.09.56.33; Fri, 12 Aug 2022 09:56:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=DEuwsuKr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239409AbiHLQxH (ORCPT + 99 others); Fri, 12 Aug 2022 12:53:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239118AbiHLQxF (ORCPT ); Fri, 12 Aug 2022 12:53:05 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8E8AACA05; Fri, 12 Aug 2022 09:52:58 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id 839F05FD08; Fri, 12 Aug 2022 19:52:55 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1660323175; bh=kNxXhkdr74OhUzWIPaRNsxTjWoPYvj2BCzIs18HaIVo=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=DEuwsuKrK0IUE/fmPNRTH7bHheRw7wS1s8L53Sl+UjpBa6xdpAZDmjbGMxb036Bdg 6B+OkILYFXRLmIUsWzdAjaZvEaH2ml6PrpeMLzix2uxqipqsHh7rTYiQdJjK2LvQvl /4wicZ3i/UGvJQEPLJ5c1CN268hOkIuHzy9N+vVueef4hFb0oVnyE6Latp82+nXWaC +qzwpgKE4n++0A3IP4zaSbyjv0pefOO0x6Kb8Q8IYRJ6Oniy9lMaXPluDjvZeu0m9/ Zq4xhUnuB79fGjCUsGffGWayE9lQC8U/HqgFu9PMAv7yNMFfU99YXvBnG0tNmndf+J 37/2h7PcJNwtw== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mail.sberdevices.ru (Postfix) with ESMTP; Fri, 12 Aug 2022 19:52:55 +0300 (MSK) From: Dmitry Rokosov To: "akpm@linux-foundation.org" , "jic23@kernel.org" , "robh+dt@kernel.org" , "andriy.shevchenko@linux.intel.com" , "andy.shevchenko@gmail.com" , "christophe.jaillet@wanadoo.fr" , "stano.jakubek@gmail.com" , "shawnguo@kernel.org" , "stephan@gerhold.net" , "daniel.lezcano@linaro.org" , "wsa@kernel.org" , "lars@metafoo.de" , "Michael.Hennerich@analog.com" , "jbhayana@google.com" , "lucas.demarchi@intel.com" , "jani.nikula@intel.com" , "linus.walleij@linaro.org" CC: "linux-iio@vger.kernel.org" , kernel , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Dmitry Rokosov Subject: [PATCH v5 1/7] lib/string_helpers: Add str_read_write() helper Thread-Topic: [PATCH v5 1/7] lib/string_helpers: Add str_read_write() helper Thread-Index: AQHYrmvlXLMGJM4ctk2gw8SerH637Q== Date: Fri, 12 Aug 2022 16:52:25 +0000 Message-ID: <20220812165243.22177-2-ddrokosov@sberdevices.ru> References: <20220812165243.22177-1-ddrokosov@sberdevices.ru> In-Reply-To: <20220812165243.22177-1-ddrokosov@sberdevices.ru> Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/08/12 13:28:00 #20103614 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Shevchenko Add str_read_write() helper to return 'read' or 'write' string literal. Signed-off-by: Andy Shevchenko Signed-off-by: Dmitry Rokosov --- 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"; } =20 +static inline const char *str_read_write(bool v) +{ + return v ? "read" : "write"; +} + #endif --=20 2.36.0