Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2414327imm; Tue, 4 Sep 2018 04:10:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYoUeBNHyP28Ut9qrWpORRDGzKN9q9kBKX7Vr7Bcc9r0ei5xH7OlrYGdymSSTWCATEd2YCl X-Received: by 2002:a63:bc0a:: with SMTP id q10-v6mr15885315pge.60.1536059437629; Tue, 04 Sep 2018 04:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536059437; cv=none; d=google.com; s=arc-20160816; b=wr3+YdRhywByxwAhjcpkQu6DNwULVz+tt5f87aYcCjnix6hh1JRZpgdcSV45R0MehO jWaTDgnU6hqIjU61tk+i/FiPChWfEf0JtzIyxb/ijl8yIbB1uX0Okvhle5HW6wqla5hx aQyvOlszEqY1o84eMBUnpvY57kkDGR6B8fnPqzWC4tMpzCIufX34Z8C8KsV+nLhC5hp4 byWT/B2ZQjNFfd6K8LvlzmChuyYP814tQdqCrD9WZARwO7KeMaAGj0xHAjZYLAufARY9 AkjSsCJyDi+PYFRrbJx9qE8iALBJJzW9s0Lx7306gv/qcKRV1vGrf38eQxjrkivwnqYY 3f6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=YkBNlTe0iH2j4fSVaIxkknQpdmpI7s+EYcpv3KLaa3s=; b=bgKp7bBnfmBkNo9mCcCa0vDzOEnFwLYoyuslESUGLTt0iIUKxCJKmEMFt2EQ/Ughem 1GkPPifMAWldKv9+tZsvdIaxc/VEzx7hQnmqfXUWEQWjLcWQYMYAw/JJfj9VYhgI+uU+ 7vi3/ZKbhWtYSEwcb4y13yP+6kJ9WrM34bbmmVhUd9+aMHwyEOxiCMP0gDgcZHHWePwk S8Eak+hCKxMRXWlojlgbS5mEAFTuBsEvs4yXKJCngfb5LBoXsH9lIpT0xwrpD46SMQNX 6qxnkUTswo7iic8DEXGAUpei6tZJIq+QxU+VCDrVu8zUcrCyCE/0rmPm2sme/Q5I5keO tv9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=LQnKCItL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9-v6si20612006pff.30.2018.09.04.04.10.21; Tue, 04 Sep 2018 04:10:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=LQnKCItL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727057AbeIDPdz (ORCPT + 99 others); Tue, 4 Sep 2018 11:33:55 -0400 Received: from mail-sn1nam01on0064.outbound.protection.outlook.com ([104.47.32.64]:54352 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726294AbeIDPdy (ORCPT ); Tue, 4 Sep 2018 11:33:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YkBNlTe0iH2j4fSVaIxkknQpdmpI7s+EYcpv3KLaa3s=; b=LQnKCItL4EeHkWlCSRJL0ynOi8wexO7I5/IzrJOtKaDbiONerqNoEvSMxbCVoGLQwW7BjLzCRxKNUz5SckZvwg9YbjweR+7RjaRA792pXwIGuHh0GJWah2YHZV4qDwHKRUCxdfdVVts7AQRYX7/AKiWdlihXJ41y2OvrsotkLB4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (95.104.163.45) by BN7PR07MB4372.namprd07.prod.outlook.com (2603:10b6:406:b5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Tue, 4 Sep 2018 11:09:10 +0000 Date: Tue, 4 Sep 2018 14:08:59 +0300 From: Yury Norov To: Rasmus Villemoes Cc: Andrew Morton , Andy Shevchenko , linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/7] linux/bitmap.h: relax comment on compile-time constant nbits Message-ID: <20180904110859.GA4992@yury-thinkpad> References: <20180818131623.8755-1-linux@rasmusvillemoes.dk> <20180818131623.8755-6-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180818131623.8755-6-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [95.104.163.45] X-ClientProxiedBy: AM0PR01CA0016.eurprd01.prod.exchangelabs.com (2603:10a6:208:69::29) To BN7PR07MB4372.namprd07.prod.outlook.com (2603:10b6:406:b5::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3c0d91a-5f2f-431e-843a-08d61256d746 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BN7PR07MB4372; X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4372;3:ReBYmya0/+HiOC0GlwXwXwp8SNDosnXw+Knjt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HL/iHlie9kVOL23czEaNSEgvE0rpUBaXz/kMP3dQWe74DTuXGwdb8ek/ZhuPX8taJGIxkBe6/EgkQOwjA0L3iaMiQaEoVaq6RGUd0O+bTNy0uEsHRDI6vCRsnnWQ+thu/paSmzB03/6qeiWZI/NUt0p7csYvegtMzPluQxb/J3fvRiDwg09fHTdQZR8ajtU5Z6U9m+f9z2L9aZQHBLRzWU4k6iTec4gsxZHRKmNs+VH48cj/18EGxhSMPumT6wIbj4GSTwEB20aTD/+43XLuxtkFgYXkAL6GuXuECv4u7HaQI+KeHGvDl/ilTaW3Cy3qSrn3r7UdjTGOVHplBdMrexGcnv/K6SDUSbwI+hVWeXdcR9SB7m4mWEwPRRLbQ+4gIScnQIbOS+XW3nAivRkRhgALy4=;4:SgxWNHIUO1m2XUZ/woYNj2J5FP2TgKDPTwN1FjCutjvyvCgg9rgEKESMFKv+mt/sbDl19wA8OXEHF0ay9KBL4Wd4fBZnpoQ/BxKT4fx+1aKsRsx5r4LNkhJ+Ob4d457FAcNWNRyLNyF1gSEtTa2oQcBGKbW96pGoJ4Wv7siAsLlSN/eNngWypaPpRFkufujQbbT58R/D5vApWq/jg03llVxPDS+KBNJTHsrJTI3q81Fq2/xZ9tpqCzrsxuEx5ofvvBYtaNmnTOVpl+tCOIfJNw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016);SRVR:BN7PR07MB4372;BCL:0;PCL:0;RULEID:;SRVR:BN7PR07MB4372; X-Forefront-PRVS: 0785459C39 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(7916004)(366004)(136003)(346002)(376002)(396003)(39860400002)(199004)(189003)(478600001)(5660300001)(58126008)(25786009)(16586007)(33716001)(2906002)(54906003)(4326008)(316002)(575784001)(105586002)(72206003)(81166006)(6916009)(81156014)(50466002)(76506005)(66066001)(68736007)(6666003)(7736002)(6246003)(47776003)(106356001)(33656002)(486006)(446003)(8936002)(8676002)(305945005)(9686003)(26005)(52116002)(956004)(11346002)(476003)(6496006)(53936002)(42882007)(33896004)(229853002)(76176011)(6486002)(16526019)(386003)(6116002)(23726003)(3846002)(97736004)(186003)(1076002)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR07MB4372;H:localhost;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN7PR07MB4372;23:OX6b0LlIQ4kyiDM9KZE862gRE0lfS2aon5mAhmNK/?= =?us-ascii?Q?H3dOZ4HMYo9gASMNu6q1zpd0cGu/dgNmZph0y2U3cfEO1170z6JrnY2aKoZQ?= =?us-ascii?Q?AgQKT15pG//eoF/3+kNLx5KZ/afnIQX6YDdP0kjzggmlg3vhZEI3jRbtJrMl?= =?us-ascii?Q?jqULiPSk1TgWgzUsT0z+5Vvm1ZGnAnGx7kIAaobSwPishcpZE+9i6Iao5p4O?= =?us-ascii?Q?xSozfM35EsmiKOi9cSuKXUZxNWIHyc0JnSyG3g6iOlONpN+V5//EwMs9aJb6?= =?us-ascii?Q?eaRyvV/auL7IMIyfOzJQmGOgUXhO0Ow/SYKxaPlL9BiEn5YposqZzDDWYFzF?= =?us-ascii?Q?enBm1gRN6K7UG229qfqu8e4TFKerZ/OolTVEigqwajq1UxAGg8Luj0w/V51d?= =?us-ascii?Q?T8JvkTxE9Fyxrt3o3IRrongK08FK38BMyllFYtTl7Z8kAxeoXHiiB9SjpQ6l?= =?us-ascii?Q?hYYcaSSPIh0WI+0u9GTgN5vw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yWxk9CuQmd+bbPA3Tk8EHyXA94Oqcp2LV405V18dxeOfneS4=;7:UiOYkTWTtpE3BqUV5cMC9cjCO8a8GrCaqkyykpAu335whk2qQ0XOcO28zOfX6Y7SBdIX62kKjwa/ZToOXRTDq9dnk0JeMVQlfQARuihdv0a/Qi9v/OE+XK89+dn9iioUMlYsgSMkBa6QQUjhN/FfmfzQL+eQlZEsxLnd0pyBFJhWsauuZ4IofOWnVk3nVINMVi2NDoiJkth5+zKZDdkbCiLHlmlWVCIwENsFPkKK/darZ/ua3cnpA6+tjlK5EseE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2018 11:09:10.4001 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3c0d91a-5f2f-431e-843a-08d61256d746 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR07MB4372 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 18, 2018 at 03:16:21PM +0200, Rasmus Villemoes wrote: > It's not clear what's so horrible about emitting a function call to > handle a run-time sized bitmap. Moreover, gcc also emits a function call > for a compile-time-constant-but-huge nbits, so the comment isn't even > accurate. > > Signed-off-by: Rasmus Villemoes Hi Rasmus, Maybe too late, but Acked-by: Yury Norov > --- > include/linux/bitmap.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h > index e34c361f4a92..3f0cac3aedca 100644 > --- a/include/linux/bitmap.h > +++ b/include/linux/bitmap.h > @@ -28,8 +28,8 @@ > * The available bitmap operations and their rough meaning in the > * case that the bitmap is a single unsigned long are thus: > * > - * Note that nbits should be always a compile time evaluable constant. > - * Otherwise many inlines will generate horrible code. > + * The generated code is more efficient when nbits is known at > + * compile-time and at most BITS_PER_LONG. > * > * :: > * > -- > 2.16.4