From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EB82C3DA7A for ; Tue, 20 Dec 2022 18:56:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233662AbiLTS4o (ORCPT ); Tue, 20 Dec 2022 13:56:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233234AbiLTS4l (ORCPT ); Tue, 20 Dec 2022 13:56:41 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0113F12AB1 for ; Tue, 20 Dec 2022 10:56:40 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id ay40so9470808wmb.2 for ; Tue, 20 Dec 2022 10:56:40 -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:from:to:cc:subject:date:message-id:reply-to; bh=hPsXopC8VlOGBjVqyvv0STceQYDc5rKNyXXZ+5W5wLk=; b=OqHxK/ijy0pwjrnJ7CgrfppgL8g+E2Bcu0/llP444kXxELGG+uatHkv0kONDPi0kEi 8ft56IFxKCb0fd3kryO7Ov2DWx9jkuYkBps9fPLVWX3FK1m8VX8l91Psekv2KqZCjR1t nU1jqUyHU8x++rwNdEVSIaQ1laQ5YRKCQHFeNeStN3UU6qt4pVIOy/NcLC8u7IJZkuvp L7ibMa2Cj7fI3e9W5y+3Qqt+a/IX4KIm/RBcDP7rpOXLf9lW4ge4d18cVrQVmI8SgCef QaZGdfyrLntWA/80w2k0Yex0cNMGV+IzQsiI5CDeY8dMAIpgBT8nibx31fvW53veRE+T mcng== 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:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hPsXopC8VlOGBjVqyvv0STceQYDc5rKNyXXZ+5W5wLk=; b=fgxHJ2OqOWCbHrWFjzEeBfyB+4BEHixn0kpUtadum8mTutbRbgG9ji2GD0hqj/xu2L vVLzSBR+jDNpmjJl1urAHPZXch8mub7MF88S+GiIbOOGe2mw6BYbetuEpUaN3fBavq2d SjDMQLT04xB4pDwNeEvWxbtwL0LjISFlXerkzt/oKW1vJibIOlOKJJwVneo9e0VfWiZ6 mszHWwRETjHlVjSuzAIPseaQBMU7ZZkD2Fz6ulXBHE3uek/h/xYWrT89OKnH7XXGBH8R Y41qaBCq/kKyt8hdJwVF1+CAPOUL0zmTWelzx24QHXbLhRW3esoBAJC/3DO+wUByJ2FG MxnA== X-Gm-Message-State: AFqh2koC2/kL3MYpN/ERf07dfML4tMwYEREaChzOYJTiVmiWoifo0xTr hFStJzRz57CJSuigh7Z4/Lg= X-Google-Smtp-Source: AMrXdXu11W1GwRxdfJAqPTr6zCnU20ODFhQVmowwREDaFmTSTS7SG34Ko2229fWjO5IpJxn/erV3hQ== X-Received: by 2002:a05:600c:a53:b0:3d3:5d47:271c with SMTP id c19-20020a05600c0a5300b003d35d47271cmr4087178wmq.12.1671562599405; Tue, 20 Dec 2022 10:56:39 -0800 (PST) Received: from localhost ([2a00:23c5:dc8c:8701:1663:9a35:5a7b:1d76]) by smtp.gmail.com with ESMTPSA id u21-20020a7bc055000000b003c6bd91caa5sm16874912wmc.17.2022.12.20.10.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 10:56:38 -0800 (PST) Date: Tue, 20 Dec 2022 18:56:38 +0000 From: Lorenzo Stoakes To: "Uladzislau Rezki (Sony)" Cc: Andrew Morton , linux-mm@kvack.org, LKML , Baoquan He , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Oleksiy Avramchenko Subject: Re: [PATCH 2/2] mm: vmalloc: Replace BUG_ON() by WARN_ON_ONCE() Message-ID: References: <20221220182704.181657-1-urezki@gmail.com> <20221220182704.181657-2-urezki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 20, 2022 at 06:53:18PM +0000, Lorenzo Stoakes wrote: [snip > Absolutely in favour of this in principle (BUG_ON() is something we should > resort to in only the direst of circumstances), one small nit - perhaps it'd be > neater to simply make this a guard clause? E.g.:- > > if (!WARN_ON_ONCE(!va)) > return; > > ... Made a mistake here, meant to say if (WARN_ON_ONCE(!va)) return; Of course :) Apologies, only just noticed you are sending a v2, perhaps something to consider for it? But will hold off further review until you send it! :)