From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH v13 2/5] gennvm: Generic NVM manager Date: Thu, 29 Oct 2015 16:34:55 +0900 Message-ID: <5631CC1F.5050107@kernel.dk> References: <1445992233-676-1-git-send-email-m@bjorling.me> <1445992233-676-3-git-send-email-m@bjorling.me> <56315D0F.5010602@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: hch@infradead.org, jg@lightnvm.io, Stephen.Bates@pmcs.com, keith.busch@intel.com To: Dongsheng Yang , =?UTF-8?Q?Matias_Bj=c3=b8rling?= , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Return-path: In-Reply-To: <56315D0F.5010602@cn.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 10/29/2015 08:41 AM, Dongsheng Yang wrote: > On 10/28/2015 08:30 AM, Matias Bj=C3=B8rling wrote: >> The implementation for Open-Channel SSDs is divided into media > [...] >> + lun->reserved_blocks =3D 2; /* for GC only */ >> + lun->vlun.id =3D i; >> + lun->vlun.lun_id =3D i % dev->luns_per_chnl; >> + lun->vlun.chnl_id =3D i / dev->luns_per_chnl; > > Please use do_div(). % would be not supported in some platforms, as > the kbuild pointed in V12. Neither of those are 64-bit variables, which is where you end up with=20 the problem on 32-bit archs. --=20 Jens Axboe