Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3772137imw; Mon, 18 Jul 2022 14:19:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uXEAoXG7luah9wVHPHLVJJ24PuR/zkbOzW+EGiEaTakzvuLlgRAKFtt7m89fWSaIeA4TOA X-Received: by 2002:a17:906:ef90:b0:72b:50d5:7383 with SMTP id ze16-20020a170906ef9000b0072b50d57383mr27801449ejb.485.1658179173386; Mon, 18 Jul 2022 14:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658179173; cv=none; d=google.com; s=arc-20160816; b=MHhhNismb80lHL5zisDBR5lKACPr3eSEUtgCp83Oi7z/z+tBq604v9uBOjxJLO5dyW rGc3cnoqB0M2ivOeoCDF1I3VofOLAoXd6/izW4rZVzGjhnpgzFTrkMUSZoO1HsEWi8Fl wXPfZh0PmFpd+yl+wOVCkvbc9LcNLMzXEdFzCh5W8lFE/GWF41XZLlAy7kFNinJ3o1r2 E8Q439PtfTZd6bn1RIWv7kUsEJu3QPUi/+TvsAB/i21UcyXNMVw6ZjMLtHqKyXbY5Ec2 R6q38VHBt28Na9N3eW0kV0PHvhFolpxYYUG0EY9DjqMf5QEFhWquc36QB5iLrQL/l4we XbzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CW/++336tIadQt0pwmfP/KxxdKsx6evrXnLyNr32L2E=; b=P8Y9YRoSp/9JD/2UTs40FjRvO+ogEJW+sAb7vu3PZ8V9hhST/MBMNKJt10sGWdWuvy XArqNzvu8aOpgm9Fl+ajPRjS30qC7hzwqU+k0FL72KLu6Q7b5X3l4kc6XNzKnO3Z4VL6 /mKm0CSKGXI6AGK/N9ZZUnCaHE/3bz9ZcFqakMJoy3GAZMjXfCVSnIvcyiExXQG6m62g 66eDTLE2UfdtvDKiqPQDUAZY450E1BYKv8Qb+r7v7pEx7Xrufp47N3NY2TR2wCzc1nl+ pDBWLLxAFSWKXVGBTbfOD6xQTYGbpoAqBDdmTXplA2tsQF9eRqtstmocH9/EFbKoHm64 og1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CEB2EwYf; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020aa7d9c5000000b0043779a90504si493337eds.606.2022.07.18.14.19.08; Mon, 18 Jul 2022 14:19:33 -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=@intel.com header.s=Intel header.b=CEB2EwYf; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233867AbiGRVMA (ORCPT + 99 others); Mon, 18 Jul 2022 17:12:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233817AbiGRVL7 (ORCPT ); Mon, 18 Jul 2022 17:11:59 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C88A31DD8; Mon, 18 Jul 2022 14:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658178718; x=1689714718; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=B8FiBLFp5csoUvFgk1WR/dfs+8dLITXSfuetGEHiUoY=; b=CEB2EwYfH7GxYV40MJKQETf1mxGKLaW4O4FSayfCf4MjpDgqKE8PEbBQ JbqOhvVEE+XlI1LlkL5EJdN+QDk+m2IefH3FLjPTsaR17pFFXy/8x3phX gK2YV3Dx1o07PGEujgvmEc5a1b4csz9BzdI75ynV4E2KLhenpocdIswFK bAg0VB3Ox4/ITmnU0l0kqzVkgbRTi9ZE5rUW5OreH2HBza3Q5EoujWNRc XZrAHrsKO8KoajaQarJqBv+6LOdlFnLVahsC4ZKahA1UzmrdWoI4xIoiw fT0q5+dWHJvIWDctfpxulclt/U+DKWKJStk/UzvkanyoYO5tm3J3wEFxH A==; X-IronPort-AV: E=McAfee;i="6400,9594,10412"; a="350284486" X-IronPort-AV: E=Sophos;i="5.92,282,1650956400"; d="scan'208";a="350284486" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 14:11:58 -0700 X-IronPort-AV: E=Sophos;i="5.92,282,1650956400"; d="scan'208";a="739614852" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 14:11:48 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oDY1n-001OYv-2P; Tue, 19 Jul 2022 00:11:43 +0300 Date: Tue, 19 Jul 2022 00:11:43 +0300 From: Andy Shevchenko To: Yury Norov Cc: linux-kernel@vger.kernel.org, Alexander Lobakin , Alexei Starovoitov , Alexey Klimov , Andrew Morton , Andrii Nakryiko , Ben Segall , Christoph Lameter , Dan Williams , Daniel Borkmann , Daniel Bristot de Oliveira , Dennis Zhou , Dietmar Eggemann , Eric Dumazet , Frederic Weisbecker , Guenter Roeck , Ingo Molnar , Isabella Basso , John Fastabend , Josh Poimboeuf , Juergen Gross , Juri Lelli , KP Singh , Kees Cook , Martin KaFai Lau , Mel Gorman , Miroslav Benes , Nathan Chancellor , "Paul E . McKenney" , Peter Zijlstra , Randy Dunlap , Rasmus Villemoes , Sebastian Andrzej Siewior , Song Liu , Steven Rostedt , Tejun Heo , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Vlastimil Babka , Yonghong Song , linux-mm@kvack.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH 06/16] lib/test_bitmap: delete meaningless test for bitmap_cut Message-ID: References: <20220718192844.1805158-1-yury.norov@gmail.com> <20220718192844.1805158-7-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220718192844.1805158-7-yury.norov@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 Mon, Jul 18, 2022 at 12:28:34PM -0700, Yury Norov wrote: > One of bitmap_cut() tests passed it with: > nbits = BITS_PER_LONG; > first = BITS_PER_LONG; > cut = BITS_PER_LONG; > > This test is useless because the range to cut is not inside the > bitmap. This should normally raise an error, but bitmap_cut() is > void and returns nothing. > > To check if the test is passed, it just tests that the memory is > not touched by bitmap_cut(), which is probably not correct, because > if a function is passed with wrong parameters, it's too optimistic > to expect a correct, or even sane behavior. > > Now that we have bitmap_check_params(), there's a tool to detect such > things in real code, and we can drop the test. There are no "useless" tests. Same comments as per a couple of previous patches. -- With Best Regards, Andy Shevchenko