From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 135D110F626 for ; Wed, 27 Apr 2022 16:04:05 +0000 (UTC) Date: Wed, 27 Apr 2022 08:56:49 -0700 Message-ID: <87k0ba5xku.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Kamil Konieczny , igt-dev@lists.freedesktop.org, Priyanka Dandamudi , Andi Shyti , Tvrtko Ursulin , Sujaritha Sundaresan , Umesh Nerlige Ramappa , Ashutosh Dixit In-Reply-To: References: <20220426150415.519750-1-priyanka.dandamudi@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_sysfs: Add helpers to iterate over GTs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Wed, 27 Apr 2022 04:38:54 -0700, Kamil Konieczny wrote: > > > +/** > > + * igt_sysfs_gt_open: > > + * @device: fd of the device > > + * @gt: gt number > > + * > > + * This opens the sysfs gt directory corresponding to device and gt for use > > + * with igt_sysfs_set() and igt_sysfs_get(). > > + * > > + * Returns: > > + * The directory fd, or -1 on failure. > > + */ > > +int igt_sysfs_gt_open(int device, int gt) > > +{ > > + char path[96]; > > + > > + if (igt_debug_on(!igt_sysfs_gt_path(device, gt, path, sizeof(path)))) > ----------- ^ > imho here we should not use igt_debug_on because we use this > function in iterator macro for_each_sysfs_gt_dirfd and the end > condition is hitting end of available GTs and returning -1. Hi Kamil, You are right, I removed other igt_debug_on's and merged it but missed this one. Somebody will need to send a patch for this. Sorry about that. Thanks. -- Ashutosh