Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1140458rwb; Thu, 10 Nov 2022 11:43:17 -0800 (PST) X-Google-Smtp-Source: AMsMyM4B4lYclwj1p9Zc/NmAYBLeQ9Dzbe1Z5WppMw7q+SNmippXUDCD6ww201GwCp839egbqQBS X-Received: by 2002:aa7:cd5b:0:b0:461:7f5a:e04e with SMTP id v27-20020aa7cd5b000000b004617f5ae04emr3201654edw.389.1668109397685; Thu, 10 Nov 2022 11:43:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668109397; cv=none; d=google.com; s=arc-20160816; b=wqge7+m4XJiGAZgVSLD5I+yCRg/mA/VSmk5oUs9vMFvt/m38soHVul6fYcYY9RMAhj twiPn1upvtvnv7bgoG7GuBLAbZWqA5M85v/QoNiF++KoKAHezZLIkjxYAESsHcgeQQ3j XQnj2SjOY1jiX2LITdB65K5XaOMB90rBUwLCXGbSHZaRz/rdKx6rARG5/7LEeAoUuxtZ kRCMqAjHe3gtU4iA92pTXr1TYA0VXag/IaVQSXYr7rZuSfxviPYgJ2UGl4zruj8XKyYK s/Zqo8TYQgUM2sIHGDpD1HOyj0Jjtgkn1N4E3VX8OdsHa48B71ELV+4Rzg1cdrcLw2o4 eIHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=Qnf+7Iz/AC6v/1QCMpsQVXmtrt+7PcPrgj9ldvBanC4=; b=huwaFesJAPMgZyJYSXCiUpRZoIqjZcAcA2F1dZ4bczGYfpvPY8E+9b0pwHhwCvQl16 KBJzt5pDX3b6yoKgMf/p/czefmYFqlK8JVzsS0k9jss8eXlgVs8NFyRFp78qVV7objQl /ppE+QiNpgskCET+AEULAnGDSu4lVUr3/vaxsMRo2fzcVG8giCnBwS83ezU0oEeX2AYk h0pmpMP76bz9q9Dw5q+V2IEMAvWUPcbSxgBIf3P5cM7i0G7N37EBu9/DATI5/5q26174 gtdwwTGo0z1p/cdxQpolUc4m6YVZIM424ImMACQa2JGgJ/h25Htkg6BfHlnw1TyU09y9 ABzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CwQfgbI4; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cz9-20020a0564021ca900b00461ed1fe6ffsi415396edb.85.2022.11.10.11.42.49; Thu, 10 Nov 2022 11:43:17 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=CwQfgbI4; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbiKJTQR (ORCPT + 92 others); Thu, 10 Nov 2022 14:16:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiKJTQP (ORCPT ); Thu, 10 Nov 2022 14:16:15 -0500 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 327812CE10; Thu, 10 Nov 2022 11:16:14 -0800 (PST) Received: by mail-qk1-x736.google.com with SMTP id z1so1738631qkl.9; Thu, 10 Nov 2022 11:16:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=Qnf+7Iz/AC6v/1QCMpsQVXmtrt+7PcPrgj9ldvBanC4=; b=CwQfgbI4DuFardVNcz0uqADSJZuog7DfOLMB0DlZyNtKNN+/AAvh2LRxwZmgilOF+X I3JtdfoWwEbKsnfFl1ndsT7C54El7cEafRsjlAtAXO38NZfW3+qb142sIyialkF1EuJX UD9EcBweatojlCkpb5Xr8x1O8QBTlj04tsUOUolfhW4n1y8HfrWjaYPTIuvl3/009lpJ 8VD2xtqbopwqA/5hMaE58taNq6ZXzAjlMiPwf3GB8QeNFLLnX62bkRAPOXaqF+xn+i1a ef2xc9uWHo3hD/OChu60GI34be8uAb879KS9rVYmyuW06KnyaqoyjtPix72a54DCvkkP PDDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qnf+7Iz/AC6v/1QCMpsQVXmtrt+7PcPrgj9ldvBanC4=; b=oxvEp1pIXOyqHwlZjwPqOap7yZ5UEUw1zLsskIQ38QpN2dX7fmfZTUUmVx2kUTGTr8 eG22tZvF61G7opymYCyBcqVtC8Ql73PiRqjzba4VtBmiOwpiPREMIDuCSQU7xNqLYl47 C84uybc23mYSaiLpLQEz5Q6jTVNNq/KJEo6JHmd96LkHZJMSw6nPYL/ocNnMcSvOcdIn Ydp4G0ixvM5hgmn3K2Ddr3F2EJbVi6H9gd9xUYd4Jsyoo+wc7jkFf5SJQpSta5c9+YOy ZNRpuBc1m3zMYCkdy+ZQAfJQcC+ueR8BfJqEn7nnaPfzLg33O7Q25Yv3TbFVo8FT8BSm bjnA== X-Gm-Message-State: ANoB5plIqbK16/XHvrSJL+SiBEc+VwzOrxkBeMtxhaqdznvTM02xKHd7 Ke6aqU5ULwpmEGRrnYabplo= X-Received: by 2002:a05:620a:1184:b0:6fb:176e:1dbe with SMTP id b4-20020a05620a118400b006fb176e1dbemr5159880qkk.249.1668107773309; Thu, 10 Nov 2022 11:16:13 -0800 (PST) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id c8-20020a05620a268800b006eecc4a0de9sm76608qkp.62.2022.11.10.11.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 11:16:11 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 0D82A27C0054; Thu, 10 Nov 2022 14:16:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 10 Nov 2022 14:16:11 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfeeggdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeehudfgudffffetuedtvdehueevledvhfelleeivedtgeeuhfegueeviedu ffeivdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Nov 2022 14:16:09 -0500 (EST) Date: Thu, 10 Nov 2022 11:16:08 -0800 From: Boqun Feng To: Miguel Ojeda Cc: Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Niklas Mohrin Subject: Re: [PATCH v1 23/28] rust: std_vendor: add `dbg!` macro based on `std`'s one Message-ID: References: <20221110164152.26136-1-ojeda@kernel.org> <20221110164152.26136-24-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On Thu, Nov 10, 2022 at 08:14:17PM +0100, Miguel Ojeda wrote: > On Thu, Nov 10, 2022 at 7:02 PM Boqun Feng wrote: > > > > and I'm almost convinced ;-) Better add the gist of discussion into > > comment/document/commit log? Users need to know when to use `dbg!` and > > when to use `pr_debug!`, right? > > The docs talk about it a bit: > > +/// Note that the macro is intended as a debugging tool and therefore you > +/// should avoid having uses of it in version control for long periods > +/// (other than in tests and similar). > > That is the original wording from the standard library, but we can > definitely make the rules more concrete on our end with something Yeah, having some kernel contexts is better ;-) > like: > > `dbg!` is intended as a temporary debugging tool to be used during > development. Therefore, avoid committing `dbg!` macro invocations > into the kernel tree. > > For debug output that is intended to be kept, use `pr_debug!` and > similar facilities instead. > Look good to me, thank you! Regards, Boqun > Cheers, > Miguel