Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3146721pxk; Mon, 28 Sep 2020 09:25:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNle3xqqtKEu6tkBB52tJ5OquvxU95pqq+kei7I5RkDH/3CX84tLG74N0zL1vmAO8FobNO X-Received: by 2002:a17:906:3506:: with SMTP id r6mr2430618eja.55.1601310358044; Mon, 28 Sep 2020 09:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601310358; cv=none; d=google.com; s=arc-20160816; b=WHcSmkA1BbXgsJOpjlNGfV8FpqMN8b3MVqsB5liRsyhyLTEAM1YRGPXFKpyEj0hTer ED0imuhbpeHAcvcr3aSqsWzr7OH2gCxU7PSO0wONqohj9ooUzA0ohADtzjn6pHyUSecv f4NebYfbbHNKM23NM6w0yj2bV0+ibyZFQEsUgJtZTVUj6KlxE4a4UYzKsbcr1Kx3+3gZ OL6J1bd606nXubaSDlpbFLL//KSVn9ZvsSVhWlHQeu454//7hUNJJPFIKsDcvnp3M2ra vfisAuko6lV8Zj/Z49AHcrK4u5IFTlu307xP24vDMbfc2lWAWSAP9XPlhzNAHEi1IAym Kz3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=xuZNseOCmhNIf6p/J/kxDZ/N/5Vz1oGcxSEzcwKPJfw=; b=XuOEgoxfu6GZhASFJWCkZcns/p344UKviDDTyw3od9L+nMih5Cv76Dofumr1KDCPT9 ltd9y/0qM0Dyt58I+4pmqY6TZzwZLae8/y/qPIt4J35lsQkCa5mjdx1kdSyu1XUmyytA AfcWqQcnePSlCZ59zVp5Kp6wGCrrmjeThjxV4n+ydOlBSnkwwa2CsfK1Q9bfxXCnn8Pq tSdOouz1tRbMZKrnzALhnzHjklUy+6TOjgOs6S1VGABxaM2uS/xdho6xKkuB6VyBybrX +vPGsbpt5Ay9EFMdeU4Reee9HWtexk1adXEob7Qc9h37d7WOCsLZmeqawGwmOVv4euOY oz3g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si875842ejh.487.2020.09.28.09.25.34; Mon, 28 Sep 2020 09:25:58 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726684AbgI1QYO (ORCPT + 99 others); Mon, 28 Sep 2020 12:24:14 -0400 Received: from mga07.intel.com ([134.134.136.100]:26427 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgI1QYO (ORCPT ); Mon, 28 Sep 2020 12:24:14 -0400 IronPort-SDR: /b3EE+MJB2UD3+d2b0O0V4p0F1iuMN/+fsSfhW6I77tJVJXVusuj5t45FB8HzLCBSnc+IS754t Wsbh99yzlQjg== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="226169915" X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="226169915" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 09:24:12 -0700 IronPort-SDR: UWC5swLRYcwvyNE1x5Xtq9sjY7ApeNZwKb/hsWRS8RjEuhcJnIwGJ+g+46QPLJwaKD6NGt5N03 +ENZvI0CzxYQ== X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="513499506" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 09:24:09 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kMvwa-002c2q-H4; Mon, 28 Sep 2020 19:24:04 +0300 Date: Mon, 28 Sep 2020 19:24:04 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Bartosz Golaszewski , Linus Walleij , Jonathan Corbet , Kent Gibson , linux-gpio , linux-doc , LKML Subject: Re: [PATCH v2 7/9] gpio: mockup: pass the chip label as device property Message-ID: <20200928162404.GW3956970@smile.fi.intel.com> References: <20200928104155.7385-1-brgl@bgdev.pl> <20200928104155.7385-8-brgl@bgdev.pl> <20200928130023.GJ3956970@smile.fi.intel.com> <20200928140028.GO3956970@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2020 at 04:52:25PM +0200, Bartosz Golaszewski wrote: > On Mon, Sep 28, 2020 at 4:00 PM Andy Shevchenko > wrote: > > On Mon, Sep 28, 2020 at 03:13:53PM +0200, Bartosz Golaszewski wrote: > > > On Mon, Sep 28, 2020 at 3:00 PM Andy Shevchenko > > > wrote: > > > > On Mon, Sep 28, 2020 at 12:41:53PM +0200, Bartosz Golaszewski wrote: ... > > > > how do you avoid overflow? > > > > > > I renamed the property, the previous "chip-name" is no longer used. In > > > fact it was never used but was accounted for in GPIO_MOCKUP_MAX_PROP. > > > > Either I'm missing something or... > > > > Current code in linux-next has 3 properties to be possible > > > > PROPERTY_ENTRY_U32("gpio-base", base); > > PROPERTY_ENTRY_U16("nr-gpios", ngpio); > > PROPERTY_ENTRY_BOOL("named-gpio-lines"); > > > > You adding here > > PROPERTY_ENTRY_STRING("chip-label", chip_label); > > > > Altogether after this patch is 4 which is maximum, but since array is passed by > > a solely pointer, the terminator is a must. > > > > Thanks for explaining my code to me. Yes you're right and I'm not sure > why I missed this. :) > > I'll fix this in v3. > > Actually this means the code is wrong even before this series - it's > just that we don't use the "chip-name" property. Right, you patch just exposed it. -- With Best Regards, Andy Shevchenko