Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7653151rwl; Thu, 23 Mar 2023 07:08:42 -0700 (PDT) X-Google-Smtp-Source: AK7set9lHxqGaOqV7L8hZq6aw7hlb4moRVaIgaj/D/2ObuzqotVFqGMhyDckonAozUiRQHjmlW1F X-Received: by 2002:a05:6a20:41b:b0:d9:4269:4d23 with SMTP id a27-20020a056a20041b00b000d942694d23mr2833746pza.48.1679580522637; Thu, 23 Mar 2023 07:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679580522; cv=none; d=google.com; s=arc-20160816; b=eVwrOaNMrzQLmMZ0PuQb7rjdP4Mfzw515LlM/ehkcLtW5+TLjzP+9vFJwiSAcD49G8 hc5hP/i7AHK05MoHEJBSXE1qtbt83N7I5ykrgDZmsY59O5q1W7JmDKJtiBKcTKoJqmRz M2i8q8jT8AYiJ6/fstdR2jJpqkhR21UKXrsQ8v58nXyilusUefaUWNNQMMjFGx29JTdK rNsfcDZuWV+MQeoFaj5jB16vUv347b4KnDZxwWLzJnXLYV7VW9u4zar7jfkqdnSYBOYA o3nymHtFb9beUGLI36KzLpFw3wumniEv1dxutGsEBqxaM6KiXhH6OTV8LfdAq7VWx2iS /IBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=F/F04h42iKXNKS7J2CWIkt8hItTmIKynjVrxA6M2VhY=; b=hCJUT/eDPyTgnk/vM/a4sMg9d3NzFKBK/VdvtJvAaqMG6inceLB50O7vfqNraFPihh B6/6Tt4EekHTPhoKt1OpkbKY3oBjKgMiIFGco7IGR7iOU+7XTE9GjPCFMj/4GFNds0Ol NvAGGiqylOa/FIqGwMrFngYhHoKgSqwLWlr7Y+CH+88YxMh4FiizUHzUWRDoEfGgMoLp 6KJEKRT3gPn8WfjX675KD634nEVtC3xOA0mj5UAGVy5xyulSBIWOm8MAJz4aIEcyOG5d 0msBGnCj3Z9m9dlPPO4jsttIjDu3XuvZ++uF703i500ZZU4iCroo0O870ewfzK0AtljZ Mp4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@asahilina.net header.s=default header.b=JSXvSaYw; 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=asahilina.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv64-20020a632e43000000b0050f88305906si10021913pgb.611.2023.03.23.07.08.29; Thu, 23 Mar 2023 07:08:42 -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=@asahilina.net header.s=default header.b=JSXvSaYw; 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=asahilina.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbjCWOBe (ORCPT + 99 others); Thu, 23 Mar 2023 10:01:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbjCWOBL (ORCPT ); Thu, 23 Mar 2023 10:01:11 -0400 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC20738664; Thu, 23 Mar 2023 07:00:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (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) (No client certificate requested) (Authenticated sender: lina@asahilina.net) by mail.marcansoft.com (Postfix) with ESMTPSA id C05C2420CF; Thu, 23 Mar 2023 14:00:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=asahilina.net; s=default; t=1679580025; bh=pyc0cPcoQuoGHqD2F1DqtYF/Nqt56WT0AaYfiPSX8UI=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=JSXvSaYwT1LMH3sZ6lGpRKg5J7UhlRfFVca97FNzFtb8lRl4Gw4AP7ISYExqBgKLu YnVgR2at604jbjV/gaj63fx8H8zZrUkZvlFqxJSPHLWAzZxGrYCk9R+rPq99VBsvEJ pZSSlECO2fxeF4MXyfMWT/EbilcDFVi/DPiV1skvWD9j8B2sONJaEwSw+zpLYAzaVf YbSLPzmWVuLHhEpeaYfM/VzPlQXH9/yOF0rPF2UPnAi89yUW0WcKs7k6j3FAHW+iCR EngCFfaOtDEocXoS7yia1fkj+jaQCiSwms8uGB3lP+HeVEbH6p8aXk8H9PNL99dbi6 xIatmpAduZAWQ== Message-ID: Date: Thu, 23 Mar 2023 23:00:20 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v3] rust: ioctl: Add ioctl number manipulation functions Content-Language: en-US To: Miguel Ojeda Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=c3=b6rn_Roy_Baron?= , Arnd Bergmann , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, asahi@lists.linux.dev, linux-arch@vger.kernel.org References: <20230224-rust-ioctl-v3-1-3c5f7a6954b5@asahilina.net> From: Asahi Lina In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On 23/03/2023 22.05, Miguel Ojeda wrote: > On Thu, Mar 23, 2023 at 1:34 PM Asahi Lina wrote: >> >> Changes in v3: >> - Actually made the change intended in v2. >> - Link to v2: https://lore.kernel.org/r/20230224-rust-ioctl-v2-1-5325e76a92df@asahilina.net >> >> Changes in v2: >> - Changed from assert!() to build_assert!() (static_assert!() can't work >> here) >> - Link to v1: https://lore.kernel.org/r/20230224-rust-ioctl-v1-1-5142d365a934@asahilina.net > > It seems `#[inline(always)]` got added to a few of those, right? (The > addition looks fine to me, but just to understand if is it an omission > in the changelog, or an unintended change, or intended for another > reason). Ah yes, I should've mentioned that! build_assert!() only works for stuff that can be const-optimized at build time, which requires inlining. Otherwise this change immediately causes build failures since generic variants of the functions get compiled (and since they're public functions, cannot be optimized out at link time). > > Thanks! > > Cheers, > Miguel > ~~ Lina