Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp3077136rdb; Tue, 13 Feb 2024 06:20:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUpCttlvjWlIjlJtZ9kll9DR96JMFwIYy2c8TJNtxoE6LDH81jvhgXeEnobtzR5SkIavFGq7og3tc9IYGvkpxdGGknNx895FrHP2ORgg== X-Google-Smtp-Source: AGHT+IEGsZtoHUBUjRg48yPqBKWpy5h1T6iZCMb1X0MDjcchRkez1HijNwIyATxIMrUYyTfsFjCy X-Received: by 2002:a17:902:da88:b0:1d9:791b:7dda with SMTP id j8-20020a170902da8800b001d9791b7ddamr10884179plx.36.1707834034868; Tue, 13 Feb 2024 06:20:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707834034; cv=pass; d=google.com; s=arc-20160816; b=pZv4jkA+tcsnVxph7Hkf4OjzQAhBYBHzDFKW71hV7jZQIC+Eoyry2eH2gdu5Yh9x7a NJOlVkAy1WIjqMCiIA7NTuRs4mbPz1vlJoU5w1F34YxfhjP8fXUjoF+kiCsonUTJ30Vq IsISLVk8e/K9svobebihOzV2sA/UmR/j9aKZ0LWEHGvHplbG0imVcuSvEBvz616MZSgJ /KiEGJyEVnuyRvSSbFBFb/5Iw8XmQfNYfrJyZ0V+1meZdGhpFP+8yIvk2mcO+LJGPmeL jnPyT31AxOqAi4rHBUwM+u3ySTYo7QP8X3dkJ0x8ER9vbkVMs8EiuBEIQJmdUnkASJKA YWQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=+zhSIt0qtZV5RTWTlLFo90VHqHo8JuZcxOT8dUoT4Nc=; fh=6uMW7d13txtLelUf7s2/ir5hFUbmJsmGJrLaur5JN5Q=; b=jUN65OOHWbBaSfa8cgfUGR5ZqclqKwMIhmh+/8ZRusMzyQXPigZdsUCn1K6fUvn+gi MvPTe2opMOGYNbUSfFpYGbLy2XONjdrj1tJaDEyiqqlIaOHmMoJEXQO3jrjumto3N2Vv 0pcsWc+A6PUaYnPdhGpBNylJ7gG6XHW5Nd9RSx9Ye3swEjhHBE26pq0mZUbAEfi/km7m 4av9/rMENmsX7Op2HCRslmsJDfBEzEpCFMBsnEnWFI/vZtJ4pcDe1/MlrCoWaKy5tGG9 HsmfJ5NZpSjzv49uhFJg1NBJ6tWj09S97KvVFikBr8fdGgIhWrCYxDdUPfmnHw9po+cb MQTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=SESKF8uF; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-63657-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63657-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCVIalmCThFF6/AWWEwRtB9YR6qTzoA7iv5yQgKpx6YoCIPN5sZLWx3tLZBwkvmmTOklhzyX8KtbaFYJBZ/7I6SSLTMtgqBo9Od52Q41YQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k11-20020a170902c40b00b001d8a94d10d9si2064527plk.448.2024.02.13.06.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 06:20:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63657-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=SESKF8uF; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-63657-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63657-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 43AE7287F80 for ; Tue, 13 Feb 2024 14:19:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E01857895; Tue, 13 Feb 2024 14:19:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="SESKF8uF" Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D45B57868 for ; Tue, 13 Feb 2024 14:19:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707833983; cv=none; b=fyAaMUmCUVvIW4m3y+Yr3QbZ/Y0GclaXlqBCFdLu/q1es408adNNJNhTxyYbXHW5oajsSX43ZpzVALMIY7zwJQGBe4fKCKYeZMZdP849cF9u4c2OopyWFxZpbzqFBfDCqksMPWgZWzKzbT851u+VOU+GqmajzpreLVHp2doMugM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707833983; c=relaxed/simple; bh=+zhSIt0qtZV5RTWTlLFo90VHqHo8JuZcxOT8dUoT4Nc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=J4kvhdFMEYepRq0LwqWSSDGqYtE4ukaaeuYgpsWXZ42RWzzQxTwzH1JeDoxGnDib7PteAao8HnoGnoPBy9qdjKhuETvBlQyVQ1aHSN+65WQ0YIri9MRFGfsjfBZq2Ks4J+y21xfUJJj7BbvTPXfe3V4SwWYfO4stVw2AvCZuswI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=SESKF8uF; arc=none smtp.client-ip=209.85.210.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-6ddf26eba3cso636773a34.0 for ; Tue, 13 Feb 2024 06:19:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707833980; x=1708438780; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+zhSIt0qtZV5RTWTlLFo90VHqHo8JuZcxOT8dUoT4Nc=; b=SESKF8uFLIiTAqR9eB1wKmj6RbRRX8cZyvaYJZBQsZGHuGKtBxLKEBdZp/sh3+rW+r vFsxBkYtu7cezK9qwd7kHMDJzIr2Y6YmjKSfMKmaUOFYCgbXJxxnDUT7T9+hjXlGzVZH b/e8x/7gtZr8uJiZcYvQ1T0jMxaRb8LwXqA9RKDkvavXS0PLKxAPeaC6YPIVa1+zQ80t gFppsIWILNhU+TiBfCvF4MUp7SAgTacT/kTUdJo6qheeH0G8fpQI5ZIHSHYR+Bm1rmxk QGmp7LfbCR4Jd2YPCjhvmvoxKOP4O2JonWG59kzVQ9ye3RRyyHgcb4uPGtIbo4fXCmuo lVjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707833980; x=1708438780; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+zhSIt0qtZV5RTWTlLFo90VHqHo8JuZcxOT8dUoT4Nc=; b=QTbkX9TOd42TYpDRWLQObKFuIGgEVWpbZIEDGeKvH3sJqfrt25eG7gwuPp7PXm2Uot SwfsGXnmk89d1z0u7Azbo/p3LkBQ7eUm2gv1e9k9GCeWzDQxwECyPUt4QGmECcsw9Dl4 bYr28mqy6VKJeqon8mfhUQLNL16qOxCvEDZSpxd+pdCsGDMFmYILULRfLzRgJ7FrCo8e b4FlH72l1i5tozEXN2cg8e6VWM2AqCxH9w8EWq8CvYoilEHfULYip0/BhmnAn6WhmAgV chfzDukyXyzZ6ojNFQyEsJjSNeX/0mPDGuDMr+tI4u+nrdnZS/E+BpAmyUt3t2hz+TBL RA0g== X-Forwarded-Encrypted: i=1; AJvYcCWQAdIKdM/ZYxb1OjNHGp9uoHacae59toDeq6HLfH2MjKv3J1ZLTI2LAbsW5nEbYRwzY1DGbMRM1TVjkMzySr98UKL4epIrh02Iiv3j X-Gm-Message-State: AOJu0YwN1jRuAKy6xUSO4UZpGjlFbz1jfrGdSDScO+HcN+xbc8Km14sa WIv7RXncX2J1MRCZJcXW7MIHDl2qSo4lfgzT2C28DipNka7fbWL0t4aZBmbRMgXjsh4HT6Wu97A U4liCMx2aeyNXlAnWlITjILXtttSZvd3xQpFd X-Received: by 2002:a05:6870:8a20:b0:219:3d17:63a5 with SMTP id p32-20020a0568708a2000b002193d1763a5mr12034734oaq.13.1707833979998; Tue, 13 Feb 2024 06:19:39 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240130023843.11512-1-dakr@redhat.com> In-Reply-To: <20240130023843.11512-1-dakr@redhat.com> From: Alice Ryhl Date: Tue, 13 Feb 2024 15:19:29 +0100 Message-ID: Subject: Re: [PATCH v2] rust: str: add {make,to}_{upper,lower}case() to CString To: Danilo Krummrich Cc: ojeda@kernel.org, alex.gaynor@gmail.com, wedsonaf@gmail.com, boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, benno.lossin@proton.me, a.hindborg@samsung.com, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 30, 2024 at 3:38=E2=80=AFAM Danilo Krummrich = wrote: > > Add functions to convert a CString to upper- / lowercase, either > in-place or by creating a copy of the original CString. > > Naming followes the one from the Rust stdlib, where functions starting > with 'to' create a copy and functions starting with 'make' perform an > in-place conversion. > > This is required by the Nova project (GSP only Rust successor of > Nouveau) to convert stringified enum values (representing different GPU > chipsets) to strings in order to generate the corresponding firmware > paths. See also [1]. > > [1] https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/to= pic/String.20manipulation.20in.20kernel.20Rust > > Signed-off-by: Danilo Krummrich Not a deal-breaker, but this comment of mine still applies: https://lore.kernel.org/rust-for-linux/CAH5fLgiwRDcyaxbcUNY8M1c_w11vkCWyRfq= VVrN9Sgc7XYT0xw@mail.gmail.com/ Alice