Received: by 2002:a25:d80d:0:0:0:0:0 with SMTP id p13csp213761ybg; Sat, 23 May 2020 11:53:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJAQ4L1rruCJNrClrPfFzGWehdIcvFoMFULuSyqAjAbjSyCzVb2n2s9iW89sMlHh7j6ZPO X-Received: by 2002:a50:cccc:: with SMTP id b12mr7993834edj.68.1590259990816; Sat, 23 May 2020 11:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590259990; cv=none; d=google.com; s=arc-20160816; b=hcfP4kc5g2lQj5Qd6+51JqC4XoMfHC2hpASEe8ViYlENQK/irtzaoCHwF6yqTPMmq5 57kEGyywnWjA/XoRRohK4UJT7jNRpvRfZcLojmHwnFG0CFEdBJGpZN6kosfw29kocUqu Pa7QEg90Lq9OsV19fjboJZHdvFm6MomL4AZdQqxLE81wBnVXqfM0nHbX83gThAHZNzzx pKFa+MaPT81NP1LGWfk8hPqvoXGVQoEQDLwLVe5efZDwSpSNO7ThPGszKeY5mfWdU999 F14VxBoD0hGRekCCs2lWpaeQwWrxpYCDzJNOlOxIuoIfQS6SugSw3z303boUgav8VLv2 8yAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=b1mMhxUUXy+J5qvG4lrRGiQpsIcLlIbc98MeN4fSSBs=; b=Fm1tjuHutXxd8KAqs9ND6dHecxZWtT+rEKPROErf16XgkVEtuBLUnw+GTPZqdt6Ct4 E14AFg2w1sb/TWEc+g0ksBR/pbEB3I0W2igKsFDyUFI5zJ4LbJj48cCid4/uVGIDzwI3 /XBtQ1REywjQ+J7CiWN1LYeofmH6AQQR9NgIKekFXxmi/Z6WcLTh71E5Z7kn0AsIBSxc k6BCZFIwbWvs1RbrtKXsDXtJ34fa30LDhAeSACeK9H0zufn0QAp+wJT+l7XCEOKxb3Rl 7HeSCSLRkWbSvgngzeJgci7ONgpTq1uzBujupoDcWj7oNrbroLQ4uXDnnlG2NyU63OKE dMKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=lrQ8W86t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si6362362edo.391.2020.05.23.11.52.46; Sat, 23 May 2020 11:53:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=lrQ8W86t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387880AbgEWSuH (ORCPT + 99 others); Sat, 23 May 2020 14:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387587AbgEWSuH (ORCPT ); Sat, 23 May 2020 14:50:07 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B041C061A0E for ; Sat, 23 May 2020 11:50:06 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id t8so4381750pju.3 for ; Sat, 23 May 2020 11:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=b1mMhxUUXy+J5qvG4lrRGiQpsIcLlIbc98MeN4fSSBs=; b=lrQ8W86t2BzC3p5tK16tu4MyclRomNJ8LUm/DKdmWlSUSP97lTFTpS6eK8zkYiVUlB mOrSnVOFeD0QK+qjS32+811BNDbI1oP668sv7p5ZB6aGDqTaxygTBD8W2F6MRHMk+5te EpsQBjGNaOzcY41VxhGjqQXnik7aEhtUBIOh3fO6bOzEYV51rtT3fRHag/qoZhqhhHMo 1DZXn3COfGxanTs5Y2GAy4mIS7chOe1/hSMqB/Z2VeCoov9mR7NeGL+zN67WP2Zp0Sjj 9tLfw/Rhpx7kW4Ioh5ZDrFUcydqBMZj48j6NHEBJTzkO+e9Ijtq5IIugEKHw7fpRbtNH 7Olg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=b1mMhxUUXy+J5qvG4lrRGiQpsIcLlIbc98MeN4fSSBs=; b=Tv6F2Y8avaTt00AdVte3bCc1ccvcqh4psNi6HoIV4y1DPmYekU0Fly6hmWH/pev/Ip RFhvxZAQ/M08iqZ9jkJgpkLx9TLZNBesWR5nygez+eGhrHNHWrLhEO6K33fccxjmbjPr RCemljVdeH8LCXAWz40g/HWQ7X7KL4ktd55LuVfbToCJU44JCep+olrZkqjPiqo5c9ME rnsZilUnxkvCMkKfIaoo+t7TxOPk88DPSPcUsGr/6/SrKeJPkF5nrjBdlbbkQLN3juoZ qqR7oBquWuAn1HCTB842fRNFk3GqYm/nMIa9hsItap2rnDmpBZO0eRmQtyCHcVo5stP1 U7rg== X-Gm-Message-State: AOAM532/538TY1gzNj6Tghr/joMUZqtl7TUyxRIC7BEp9LPK4fT7yT+6 X8/vt2xh9cpseURxlHER7WMRqw== X-Received: by 2002:a17:90a:2a4a:: with SMTP id d10mr11884967pjg.32.1590259805666; Sat, 23 May 2020 11:50:05 -0700 (PDT) Received: from ?IPv6:2605:e000:100e:8c61:c94:a67a:9209:cf5f? ([2605:e000:100e:8c61:c94:a67a:9209:cf5f]) by smtp.gmail.com with ESMTPSA id e5sm9587517pfe.121.2020.05.23.11.50.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 May 2020 11:50:05 -0700 (PDT) Subject: Re: [PATCH] linux/blkdev.h: Use ilog2() directly in blksize_bits() To: Bart Van Assche , Kaitao Cheng Cc: damien.lemoal@wdc.com, ming.lei@redhat.com, martin.petersen@oracle.com, satyat@google.com, chaitanya.kulkarni@wdc.com, houtao1@huawei.com, asml.silence@gmail.com, ajay.joshi@wdc.com, linux-kernel@vger.kernel.org, songmuchun@bytedance.com References: <20200523155048.29369-1-pilgrimtao@gmail.com> <714861ac-50aa-465c-c28f-dce7e16d0313@acm.org> From: Jens Axboe Message-ID: Date: Sat, 23 May 2020 12:50:03 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <714861ac-50aa-465c-c28f-dce7e16d0313@acm.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/23/20 12:33 PM, Bart Van Assche wrote: > On 2020-05-23 08:50, Kaitao Cheng wrote: >> blksize_bits() can be achieved through ilog2(), and ilog2() is >> more efficient. > > If Jens agrees, how about removing the blksize_bits() function entirely > and to make all callers use ilog2() instead of blksize_bits()? Yeah, if we are going this path, then let's just kill the function completely. -- Jens Axboe