From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933475AbbJHO3w (ORCPT ); Thu, 8 Oct 2015 10:29:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:1103 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933157AbbJHO3u (ORCPT ); Thu, 8 Oct 2015 10:29:50 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,655,1437462000"; d="scan'208";a="822212027" Date: Thu, 8 Oct 2015 14:29:48 +0000 (UTC) From: Keith Busch X-X-Sender: vmware@localhost.lm.intel.com To: Johannes Thumshirn cc: Lee Duncan , Christoph Hellwig , Hannes Reinecke , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, James Bottomley , Tejun Heo , Matthew Wilcox Subject: Re: [PATCH 3/5] block: nvme-core: simplify ida usage In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2 Oct 2015, Johannes Thumshirn wrote: > Lee Duncan writes: >> Simplify ida index allocation and removal by >> using the ida_simple_* helper functions. Looks good to me. Just one comment: >> static void nvme_release_instance(struct nvme_dev *dev) >> { >> spin_lock(&dev_list_lock); >> - ida_remove(&nvme_instance_ida, dev->instance); >> + ida_simple_remove(&nvme_instance_ida, dev->instance); >> spin_unlock(&dev_list_lock); No harm from taking the nvme spin lock here, but it's not necessary with the simple interface. > Reviewed-by: Johannes Thumshirn