Received: by 2002:a25:d80d:0:0:0:0:0 with SMTP id p13csp205278ybg; Sat, 23 May 2020 11:36:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjGOxGr6G47VTZTnUpC26Mdb9Z2qUVx8wp/No6oFci8l2u6OMjuE6GFbpDpSkKMhlFz/ro X-Received: by 2002:a05:6402:1adc:: with SMTP id ba28mr8042144edb.14.1590258972218; Sat, 23 May 2020 11:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590258972; cv=none; d=google.com; s=arc-20160816; b=rg99enoPUzdawL46MHYlJV13bWijXQZd0lL6Bbe5iqb5RhAu4DzZtisjs5BlrnfToc tUE9G98h/+D2HwA8XbTJJd0lypcNGXulvsPF13edCF8TxgBvQSYr17NHnl3eQ3G2laDi 8qv7Ot5LIX4Ebrq6VOgQFOujZIX27EIFKVXXAifvSM5M202cZ7hcWPOKTdUTbv8U/A7L j+9XVu7gar/G2MMntnHOnYgPNl4fQHqdbtvH2/m2eCH6gJN0u5DIWRLZyyII7sIEzn7S OK190jCmzRRZntWgedKaHrJmJC5HutOeYe32fGNSRYq04+WjvAofH7R3PPPo3fq/eETN AwFQ== 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:autocrypt:from:references:cc:to:subject; bh=cBFw/ySYPuYh7W7gWO72H2s2PdHaMcpBNHanIcU0gJA=; b=t4nvSAGs3TWAamt0Wl5zlKAUUelM62KDAhrN7Hkj6Fgk6yr8QlLlTA9FNbZEHtzCQ6 9a8TKUzlEWgYrQMbTneNoV7vN5AStbRHE4Q+tMaco3aohtekVUE4bCCSCKTR0yE0oe8Y UqsV00L7/fdYfH5ZF/qfS1T8/Y3CYAWy1hAVkI0uN3ZaxNN2mu8Z1CQwEOZLc9EBVPUV 9I0CJAB3NsA6FqKVK5ogC6q+Vm2aj9TnUY2CiwI1gJS/XkJpttTh7wN6NP8gQW/Agx0u HYSNMLD3IBOZKQJyGsOKAr3EBD5OBBpyp5Phu1CAmEDyIqQDZfNgdVFoA5utHZAj0C1r XAWw== ARC-Authentication-Results: i=1; mx.google.com; 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 w16si6965182ejv.608.2020.05.23.11.35.49; Sat, 23 May 2020 11:36:12 -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; 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 S1728034AbgEWSdT (ORCPT + 99 others); Sat, 23 May 2020 14:33:19 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42426 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727989AbgEWSdS (ORCPT ); Sat, 23 May 2020 14:33:18 -0400 Received: by mail-pg1-f195.google.com with SMTP id 124so352809pgi.9 for ; Sat, 23 May 2020 11:33:18 -0700 (PDT) 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:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=cBFw/ySYPuYh7W7gWO72H2s2PdHaMcpBNHanIcU0gJA=; b=f59khgc9twkPF3qN1vH2IB1s8LNze+vlaQzHe9D8sPy6aSn7veczd0DG4m5sEEoUlo aGCRjpAkMXYf3/yIlpei2XT/oJNt6wWIectbLAOhA0Jbyy+/5uR4zxAOvPrPxkPqEYDe 3iSufJczaekTghDNWJHS3KLXKZJqP983pLoEE9dSiig+Q8rzCfxFlV31MvAe0z6ZENy4 YwUI49ZP5O5cFxB/+VtBHmSYjQAFp86N0zZN+xSPHWnnDiqOb3j9Ncg+87HiRelP2up5 aqbHJoak2P9V7hZ9E4r7Jp6QQ0EyMTfS9b92dP/kDLkb28tZue+vVjtGBtt3k1Mi0BDf dN9w== X-Gm-Message-State: AOAM533+HE0coms6r67YLGnQ2I0b5eNHrnrMCI5jVy5tl/i0YMCsMYMz WkN8pI2s/ChMpQNd38a84KI= X-Received: by 2002:a63:f854:: with SMTP id v20mr1591311pgj.0.1590258797973; Sat, 23 May 2020 11:33:17 -0700 (PDT) Received: from ?IPv6:2601:647:4000:d7:89ea:f77d:d990:dc8c? ([2601:647:4000:d7:89ea:f77d:d990:dc8c]) by smtp.gmail.com with ESMTPSA id m14sm8584739pgn.83.2020.05.23.11.33.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 May 2020 11:33:17 -0700 (PDT) Subject: Re: [PATCH] linux/blkdev.h: Use ilog2() directly in blksize_bits() To: Kaitao Cheng , axboe@kernel.dk 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> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbtBkVoJ/jQsi2H0vBiiCOy fmxMHIPcYxaJdXxrOG2UO4B60Y/BzE6OrPDT44w4cZA9DH5xialliWU447Bts8TJNa3lZKS1 AvW1ZklbvJfAJJAwzDih35L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WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: <714861ac-50aa-465c-c28f-dce7e16d0313@acm.org> Date: Sat, 23 May 2020 11:33:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200523155048.29369-1-pilgrimtao@gmail.com> 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 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()? Thanks, Bart.