Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp716616lqb; Fri, 15 Mar 2024 04:48:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5ezj97j7Pcmi0ofAiQZYcXi1QNDSmjO0ub+yV6C2laWjRa72LVhQF4IHeJHCwIo3yABh/tED/AoFuoxTKacMuSPOEIuy24XUTnRNJYg== X-Google-Smtp-Source: AGHT+IEVWP6+9OiKSUu0eeQQAax0MrYLFjWplyUU4aa42GWPEDc3QarMkODYH3qM4q4ZRxshecTG X-Received: by 2002:a25:c7d4:0:b0:dc6:bd4c:b119 with SMTP id w203-20020a25c7d4000000b00dc6bd4cb119mr4833472ybe.55.1710503286592; Fri, 15 Mar 2024 04:48:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710503286; cv=pass; d=google.com; s=arc-20160816; b=k6t34t/Bb0LCD1am/8BY4AOkaHtYxI3Ne26XY4C4cC7p/MjKL9Gen6MIDEP86r7/eE Ets6UEREWBW/nKUM+OXbXNzB12PFQBOGn9whs8+M14WTbpiupabyV0X7weQjl2KDC1WX 9WuK/fXaHu8sYb6nT4g90JDVRypxacCbLzx1lIlCowdn21YkRlJfUzyFAhl2j7jG/x5o tqvKftq/9kr+UyQm3GkBSLd0KU2IUGnpd4fUdR1dXEdS2NTyt1s7fsgyXmuotdUm7a9x TqmfwFfyP41Xq82DpuZgeg7krnMvkW44ANqN8WryGo0aOzGqg+BKrDm60i5VtWl4Tjef fBwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=DIdRQO9TomTqaIppjsY3vBeLiORYCIQp/cqE8Gy6rSU=; fh=TM7ZdgvtjXmLGYOU2LceMNoC87o4WmscaiAyzwaKQnA=; b=YAigMvOe59vS0i0LXbcGRoxmbO9cYMEIz0SZcH3FsmpLAofperC1a+OMGI29Oc6LKC VeQGw08+rVDiITSjetX9n8CF3U9crOpWzb5veZXfsQhjPibYh7PQvZ2bbvpR7rXpoFFO J6UqbuqjQiFA6Xu7N8in7IpjwVtkLJjkTm342wDW9dJa1HK3BxNGyepBnbix+zRKg3oK tYXVJ4MVEX60aQ24/qlZClVj/EXcJ0HaqpLlCNMlkDaV74XrFSZKv9XFWJz8/72Lc3ku IM2pkhpaD/Ik9jUwNn8z9nFClQ02EP26+8lP6OQI/xuFoworJNlQhRc4ZMVthrFaHRwg hASg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=af59ePWn; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-104368-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104368-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u7-20020a05622a010700b0042ee3385939si3654368qtw.560.2024.03.15.04.48.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 04:48:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104368-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=af59ePWn; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-104368-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104368-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 511C61C2114E for ; Fri, 15 Mar 2024 11:48:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74F921C6B5; Fri, 15 Mar 2024 11:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="af59ePWn" Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8FE21C696; Fri, 15 Mar 2024 11:47:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710503278; cv=none; b=V0gHG4s+mu5VP4s+HtFWZxLbM1BnaIxjgGhnTjJh1Lf5fAnfYvKcWCaYFWMvET/NDUIIhl3uYNTPSd1OWFDzVImmdyFt4x8vMqg1guYSaN/tKx02hIuHOHgLbofKSXGP8oW5wN6hPz1lHuZKk3XEhfEXlg+5yGMa/QrPnHjw2L0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710503278; c=relaxed/simple; bh=DIdRQO9TomTqaIppjsY3vBeLiORYCIQp/cqE8Gy6rSU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J1sNOlCFeOq5Y8rrC4rNr+VLhtyfZyrHU+Wc84NGF/y7lqd03gmtcgMj48wpuDtg+donULnXd3SaLqR9bUP/RrRDnCRilLTyWf0iveCorN1Q1MWUlO3voZ/tp2+J3AIHLP6frQQhNySlfpKuJfZcXQYVNLtQ7xvp8HWU22a0y18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=af59ePWn; arc=none smtp.client-ip=185.70.43.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1710503270; x=1710762470; bh=DIdRQO9TomTqaIppjsY3vBeLiORYCIQp/cqE8Gy6rSU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=af59ePWnDHD5CkENDFXlGwJHEGBodI2k8rc+F7MzCWlhRTga6dWCAJCHEsfxdPP3l 6jUZcVBAz6tHDHAVhd+QKD2xaJFRF+gQq8dWGkHEBgKs4V+Gvra+cKtuegoYKjtDUp XUGqr+H7oBZZXpbO/afI6jTIcOVdnJCEW/aC0Z2h1I2BQEscTEXq1iFldzKKtyaWpY X+vmL1MUhimIIwDrDk3HQspw2IvmYLQmvQNLJ0XULPXF9goIvkSHWPXoU/k4bICq8k O7UHvf70Ar4ON6oZX2DLZmQ/AIeMZqi9/YCKJX1D3HQfmJ+jgcMr2VM62fLRmGJEzU +sGy2W1WpPBnA== Date: Fri, 15 Mar 2024 11:47:41 +0000 To: Danilo Krummrich , ojeda@kernel.org, alex.gaynor@gmail.com, wedsonaf@gmail.com, boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, a.hindborg@samsung.com, aliceryhl@google.com From: Benno Lossin Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5] rust: str: add {make,to}_{upper,lower}case() to CString Message-ID: In-Reply-To: <20240223163726.12397-1-dakr@redhat.com> References: <20240223163726.12397-1-dakr@redhat.com> Feedback-ID: 71780778:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/23/24 17:37, Danilo Krummrich wrote: > Add functions to convert a CString to upper- / lowercase, either > in-place or by creating a copy of the original CString. >=20 > 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. >=20 > 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]. >=20 > [1] https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/to= pic/String.20manipulation.20in.20kernel.20Rust >=20 > Reviewed-by: Alice Ryhl > Signed-off-by: Danilo Krummrich Reviewed-by: Benno Lossin --=20 Cheers, Benno