From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com ([141.146.126.69]:32032 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753736AbcEPTCd (ORCPT ); Mon, 16 May 2016 15:02:33 -0400 To: Bart Van Assche Cc: , , , , Subject: Re: [PATCH 2/2] target: fix max discard sectors calculation From: "Martin K. Petersen" References: <1463424410-17196-1-git-send-email-mchristi@redhat.com> <1463424410-17196-3-git-send-email-mchristi@redhat.com> <573A1826.3050007@sandisk.com> Date: Mon, 16 May 2016 15:02:22 -0400 In-Reply-To: <573A1826.3050007@sandisk.com> (Bart Van Assche's message of "Mon, 16 May 2016 11:57:42 -0700") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: stable-owner@vger.kernel.org List-ID: >>>>> "Bart" == Bart Van Assche writes: Bart> That's a good catch. But seeing this patch makes me wonder whether Bart> this patch introduces a 64-bit division? If so, I'm afraid this Bart> patch will make 32-bit users unhappy. Have you considered to use Bart> do_div() or >> (ilog2(block_size) - 9) instead? For the latter Bart> alternative no 64-bit cast is needed. Please use logical_to_sectors(). -- Martin K. Petersen Oracle Linux Engineering