Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758374AbXH2Sdl (ORCPT ); Wed, 29 Aug 2007 14:33:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753183AbXH2Sde (ORCPT ); Wed, 29 Aug 2007 14:33:34 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:34470 "EHLO e3.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753006AbXH2Sde (ORCPT ); Wed, 29 Aug 2007 14:33:34 -0400 Message-ID: <46D5BBFA.5060200@austin.ibm.com> Date: Wed, 29 Aug 2007 13:33:30 -0500 From: jschopp User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Joachim Fenkes CC: LinuxPPC-Dev , LKML , Paul Mackerras , Thomas Klein , Paul Mackerras , Jan-Bernd Themann , Christoph Raisch , Stefan Roscher , Nathan Lynch Subject: Re: [PATCH 2.6.23] ibmebus: Prevent bus_id collisions References: <200708291815.18197.fenkes@de.ibm.com> In-Reply-To: <200708291815.18197.fenkes@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 22 > + len = strlen(dn->full_name + 1); > + bus_len = min(len, BUS_ID_SIZE - 1); > + memcpy(dev->ofdev.dev.bus_id, dn->full_name + 1 > + + (len - bus_len), bus_len); > + for (i = 0; i < bus_len; i++) > + if (dev->ofdev.dev.bus_id[i] == '/') > + dev->ofdev.dev.bus_id[i] = '_'; > > /* Register with generic device framework. */ > if (ibmebus_register_device_common(dev, dn->name) != 0) { What happens when the full name is > 31 characters? It looks to me that it will be truncated, which takes away the uniqueness guarantee. There must be an individual property that is guaranteed to be unique and less than 32 characters. How about "ibm,my-drc-index"? That looks like a good candidate. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/