From nobody Sat Feb 17 21:32:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tchq11ckjz59kp5; Sat, 17 Feb 2024 21:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tchq05Wccz4gxB; Sat, 17 Feb 2024 21:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PzHN2jgTUaHDejYDn76QA+1OLTZ9Z0KC251eYDE7w00=; b=egVU+VbzOhd0rcHsZ7kE61QaKEDdmaumfxsiTobShBjNj6e7jfcfK0H7yPauqeJSHwF528 Iq5/J0HSFzuWEpiLmUMevGecyfN+ZKduzbYC1wQCc/qP5Oqh7HvM/mGOcK2wRWm/tffr01 GNXc+KqKwPoAE6L5G+qdv0Fk+vwlczXKW0CO4RWTt6PTmzoSLEo/0+ic/jJyafc6wL9phd IjVnAobMSZaa6Md/ZdbU4dhYKkMz64pno08cAwhy3tbNazZbgzO5tfpNZbnelOoXUKFZAN 8z5dSs6upQSprg+NfpZk/qHMvlRSGerwNqRXtGSySJIGtFDRscZna3ZaC2ycAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PzHN2jgTUaHDejYDn76QA+1OLTZ9Z0KC251eYDE7w00=; b=L3bSAI88n47OOOpKoCm/6ouPHH5MI5/kKGxFwXZyvM/W/1k2PopHXPcCbLB/xPNbrI2i3+ m2EqfeUR+6/RH13UNMqmgSL9SjdrF0FOkqm203YwgQvjYdsGeW9gKBWQ8dhMVR43rRYZDj r5FnK/YAfECAn7Haj0Q9hwgmLnA1Z/sadx8ziUbv16vI86Z4OlDv1Kld8ZkmfWOwn33RNz MbmrB/7l0BqD+Degwh9F1fC4trDObGdnra82AAS+nfGgMQ2SoGQFzxSd7jfNEhJlcRt3D7 Cl4ahmwskqH2RvGc645fjLPid7fhg5weCjVFYjSHG4ZkY4SeNksAUc/Fo3jkRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205564; a=rsa-sha256; cv=none; b=yVdO79lIHBUecra/GOsaKMLBxiVnBZyP6SbiYDl/GexyftgS8f3GsAC1CcRZm12ijHV+su 71AZhMVv2n0tLvB8BTv/+g1ztt+GpsMakuQkGRNGa8tZFs85HW1o9ZH0d1cABVpcC6CXTx btBfDUNQArJMsB1Azel7mq2vceEhdK8v0DHvlAeEVzkFJoM40IoERJ/i85pfgW3oM/5qwa 8GglSg0jPd8N7ACPQnrxpOIXQOU18VsVumraaXLzgdWAPcTEOTHb7SNiX2SZnbWW+2RZ6j elYl7/nPs+Zzsbyx+Wt/rm971OlnBf+PNPEhO0nOZj+yANHj8yCtR/sQKMlbxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tchq04ckKzPZT; Sat, 17 Feb 2024 21:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41HLWisD020174; Sat, 17 Feb 2024 21:32:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLWi4k020171; Sat, 17 Feb 2024 21:32:44 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:32:44 GMT Message-Id: <202402172132.41HLWi4k020171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: daebad715cc1 - stable/14 - linuxkpi: Add and str_yes_no() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: daebad715cc1b4fd1b78b44e75f6cfcd28fc2bb0 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=daebad715cc1b4fd1b78b44e75f6cfcd28fc2bb0 commit daebad715cc1b4fd1b78b44e75f6cfcd28fc2bb0 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-04 21:16:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-17 20:58:36 +0000 linuxkpi: Add and str_yes_no() [Why] This header and str_yes_no() are now used by the i915 DRM driver in Linux 5.18. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43014 (cherry picked from commit 38138beb42d1892dbd8ebb29c01c4471c86d8845) --- .../linuxkpi/common/include/linux/string_helpers.h | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string_helpers.h b/sys/compat/linuxkpi/common/include/linux/string_helpers.h new file mode 100644 index 000000000000..faa097c97a87 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/string_helpers.h @@ -0,0 +1,42 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Jean-Sébastien Pédron + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_LINUX_STRING_HELPERS_H_ +#define _LINUXKPI_LINUX_STRING_HELPERS_H_ + +#include + +static inline const char * +str_yes_no(bool value) +{ + if (value) + return "yes"; + else + return "no"; +} + +#endif /* _LINUXKPI_LINUX_STRING_HELPERS_H_ */