From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1E843C00BB for ; Thu, 22 Jan 2026 09:06:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769072769; cv=none; b=mK98Q50OufzLzy8hu9KnaiuwCfijcDmPkUjdijEcWE3KNr9OQKyI2ffWvmdYWuYipp+VIjXEkPAnpu4o0ml/mVIM4VDg7giSbz4787NOw6L/f3j+1B/b4JhgSc/Vhuz6zgx/rYRbHJbwQY0LG7lEoDmPteSeU2iVnN9kyahaPeo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769072769; c=relaxed/simple; bh=d1q6vSvRNaiFQv2KoBJ2opCZdwQ9cniATQLx4cOVREk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=r+Lf9pAUK5cYgtyUbqO5a3Q5MWAOoToQe/zkrm2NSc99lFjE89FmdnK7uIFhFoq8hoWDLuqE+OaO5niWw3ler/l9/Ad8kBjVjZpRtQsfch03c0cL9fKeQuJUrv6IOeuyXU8AKfvygWxrduMXIfwqiY2kfLmf0jaiyg66UrUEk8A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=do79KlKz; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="do79KlKz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1769072768; x=1800608768; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=d1q6vSvRNaiFQv2KoBJ2opCZdwQ9cniATQLx4cOVREk=; b=do79KlKzIXnDHLoqZ0z9VeDgFoJkl6V+8tjUfj7gVs5h0T/dzzDsb966 n7yzY/h30jvvtoYbW5zEY2FPUms/bdFShWZQ57DRswjTd8F4EDnufdTrN Ssa2Do80MuPd0L4TPqagIrRaEHr/cw7gbZgVDCyoPOZa9pgAvpCQRpUf3 hm3Wy6oTSRG7Zmlo7EaZtp0saX/eTXRSNqE4khkfxv55oYA/Y4xkXyNhx XjV+ZCy2kt+LCrkvO2A5Ow0+agqmZw9zQhQwczSmeAP2AUF3yzOBKlqXW LchX+bg04WSWTPYYQjbzlpRPZIuu9PUc7MbjDObU/UDD4AIugpyCbiW1Z Q==; X-CSE-ConnectionGUID: ja8ksFkrS+GJASJ8W9YdAg== X-CSE-MsgGUID: uHz1P8TGRa64PZWvfK+3yA== X-IronPort-AV: E=McAfee;i="6800,10657,11678"; a="70281310" X-IronPort-AV: E=Sophos;i="6.21,245,1763452800"; d="scan'208";a="70281310" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2026 01:06:05 -0800 X-CSE-ConnectionGUID: /y4B0wTzSzO8IKEeULGEkQ== X-CSE-MsgGUID: LXinfdlGSteUvZG6tOU4EQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,245,1763452800"; d="scan'208";a="205806523" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa006.jf.intel.com with ESMTP; 22 Jan 2026 01:06:04 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id D5F4195; Thu, 22 Jan 2026 10:06:02 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Sudip Mukherjee Subject: [PATCH v1 1/1] parport: serial: Convert comments to indices in cards assignment Date: Thu, 22 Jan 2026 10:06:01 +0100 Message-ID: <20260122090601.2380747-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Instead of using comments, use explicit indices. This will help to address an entry in an array by known index and leads to more robust code. Signed-off-by: Andy Shevchenko --- drivers/parport/parport_serial.c | 94 ++++++++++++++++---------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index 24d4f3a3ec3d..eb8ab21e0acf 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c @@ -119,53 +119,53 @@ static int netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *par, } static struct parport_pc_pci cards[] = { - /* titan_110l */ { 1, { { 3, -1 }, } }, - /* titan_210l */ { 1, { { 3, -1 }, } }, - /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init }, - /* netmos_9855 */ { 1, { { 0, -1 }, }, netmos_parallel_init }, - /* netmos_9855_2p */ { 2, { { 0, -1 }, { 2, -1 }, } }, - /* netmos_9900 */ {1, { { 3, 4 }, }, netmos_parallel_init }, - /* netmos_9900_2p */ {2, { { 0, 1 }, { 3, 4 }, } }, - /* netmos_99xx_1p */ {1, { { 0, 1 }, } }, - /* avlab_1s1p */ { 1, { { 1, 2}, } }, - /* avlab_1s2p */ { 2, { { 1, 2}, { 3, 4 },} }, - /* avlab_2s1p */ { 1, { { 2, 3}, } }, - /* siig_1s1p_10x */ { 1, { { 3, 4 }, } }, - /* siig_2s1p_10x */ { 1, { { 4, 5 }, } }, - /* siig_2p1s_20x */ { 2, { { 1, 2 }, { 3, 4 }, } }, - /* siig_1s1p_20x */ { 1, { { 1, 2 }, } }, - /* siig_2s1p_20x */ { 1, { { 2, 3 }, } }, - /* timedia_4078a */ { 1, { { 2, -1 }, } }, - /* timedia_4079h */ { 1, { { 2, 3 }, } }, - /* timedia_4085h */ { 2, { { 2, -1 }, { 4, -1 }, } }, - /* timedia_4088a */ { 2, { { 2, 3 }, { 4, 5 }, } }, - /* timedia_4089a */ { 2, { { 2, 3 }, { 4, 5 }, } }, - /* timedia_4095a */ { 2, { { 2, 3 }, { 4, 5 }, } }, - /* timedia_4096a */ { 2, { { 2, 3 }, { 4, 5 }, } }, - /* timedia_4078u */ { 1, { { 2, -1 }, } }, - /* timedia_4079a */ { 1, { { 2, 3 }, } }, - /* timedia_4085u */ { 2, { { 2, -1 }, { 4, -1 }, } }, - /* timedia_4079r */ { 1, { { 2, 3 }, } }, - /* timedia_4079s */ { 1, { { 2, 3 }, } }, - /* timedia_4079d */ { 1, { { 2, 3 }, } }, - /* timedia_4079e */ { 1, { { 2, 3 }, } }, - /* timedia_4079f */ { 1, { { 2, 3 }, } }, - /* timedia_9079a */ { 1, { { 2, 3 }, } }, - /* timedia_9079b */ { 1, { { 2, 3 }, } }, - /* timedia_9079c */ { 1, { { 2, 3 }, } }, - /* wch_ch353_1s1p*/ { 1, { { 1, -1}, } }, - /* wch_ch353_2s1p*/ { 1, { { 2, -1}, } }, - /* wch_ch382_0s1p*/ { 1, { { 2, -1}, } }, - /* wch_ch382_2s1p*/ { 1, { { 2, -1}, } }, - /* brainboxes_5s1p */ { 1, { { 3, -1 }, } }, - /* sunix_4008a */ { 1, { { 1, 2 }, } }, - /* sunix_5069a */ { 1, { { 1, 2 }, } }, - /* sunix_5079a */ { 1, { { 1, 2 }, } }, - /* sunix_5099a */ { 1, { { 1, 2 }, } }, - /* brainboxes_uc257 */ { 1, { { 3, -1 }, } }, - /* brainboxes_is300 */ { 1, { { 3, -1 }, } }, - /* brainboxes_uc414 */ { 1, { { 3, -1 }, } }, - /* brainboxes_px263 */ { 1, { { 3, -1 }, } }, + [titan_110l] = { 1, { { 3, -1 }, } }, + [titan_210l] = { 1, { { 3, -1 }, } }, + [netmos_9xx5_combo] = { 1, { { 2, -1 }, }, netmos_parallel_init }, + [netmos_9855] = { 1, { { 0, -1 }, }, netmos_parallel_init }, + [netmos_9855_2p] = { 2, { { 0, -1 }, { 2, -1 }, } }, + [netmos_9900] = {1, { { 3, 4 }, }, netmos_parallel_init }, + [netmos_9900_2p] = {2, { { 0, 1 }, { 3, 4 }, } }, + [netmos_99xx_1p] = {1, { { 0, 1 }, } }, + [avlab_1s1p] = { 1, { { 1, 2}, } }, + [avlab_1s2p] = { 2, { { 1, 2}, { 3, 4 },} }, + [avlab_2s1p] = { 1, { { 2, 3}, } }, + [siig_1s1p_10x] = { 1, { { 3, 4 }, } }, + [siig_2s1p_10x] = { 1, { { 4, 5 }, } }, + [siig_2p1s_20x] = { 2, { { 1, 2 }, { 3, 4 }, } }, + [siig_1s1p_20x] = { 1, { { 1, 2 }, } }, + [siig_2s1p_20x] = { 1, { { 2, 3 }, } }, + [timedia_4078a] = { 1, { { 2, -1 }, } }, + [timedia_4079h] = { 1, { { 2, 3 }, } }, + [timedia_4085h] = { 2, { { 2, -1 }, { 4, -1 }, } }, + [timedia_4088a] = { 2, { { 2, 3 }, { 4, 5 }, } }, + [timedia_4089a] = { 2, { { 2, 3 }, { 4, 5 }, } }, + [timedia_4095a] = { 2, { { 2, 3 }, { 4, 5 }, } }, + [timedia_4096a] = { 2, { { 2, 3 }, { 4, 5 }, } }, + [timedia_4078u] = { 1, { { 2, -1 }, } }, + [timedia_4079a] = { 1, { { 2, 3 }, } }, + [timedia_4085u] = { 2, { { 2, -1 }, { 4, -1 }, } }, + [timedia_4079r] = { 1, { { 2, 3 }, } }, + [timedia_4079s] = { 1, { { 2, 3 }, } }, + [timedia_4079d] = { 1, { { 2, 3 }, } }, + [timedia_4079e] = { 1, { { 2, 3 }, } }, + [timedia_4079f] = { 1, { { 2, 3 }, } }, + [timedia_9079a] = { 1, { { 2, 3 }, } }, + [timedia_9079b] = { 1, { { 2, 3 }, } }, + [timedia_9079c] = { 1, { { 2, 3 }, } }, + [wch_ch353_1s1p] = { 1, { { 1, -1}, } }, + [wch_ch353_2s1p] = { 1, { { 2, -1}, } }, + [wch_ch382_0s1p] = { 1, { { 2, -1}, } }, + [wch_ch382_2s1p] = { 1, { { 2, -1}, } }, + [brainboxes_5s1p] = { 1, { { 3, -1 }, } }, + [sunix_4008a] = { 1, { { 1, 2 }, } }, + [sunix_5069a] = { 1, { { 1, 2 }, } }, + [sunix_5079a] = { 1, { { 1, 2 }, } }, + [sunix_5099a] = { 1, { { 1, 2 }, } }, + [brainboxes_uc257] = { 1, { { 3, -1 }, } }, + [brainboxes_is300] = { 1, { { 3, -1 }, } }, + [brainboxes_uc414] = { 1, { { 3, -1 }, } }, + [brainboxes_px263] = { 1, { { 3, -1 }, } }, }; static struct pci_device_id parport_serial_pci_tbl[] = { -- 2.50.1