From patchwork Fri Jan 19 13:20:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Abbott X-Patchwork-Id: 189569 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1021157dyb; Fri, 19 Jan 2024 05:57:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyPHdQwN8S1Wlkn0gboac89OU2CGBYdE5Et63J7+JBm0eaYVKo2ogwbDbV5kdvzuGUOJy6 X-Received: by 2002:ac2:457b:0:b0:50e:80dc:b118 with SMTP id k27-20020ac2457b000000b0050e80dcb118mr289976lfm.62.1705672632034; Fri, 19 Jan 2024 05:57:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705672632; cv=pass; d=google.com; s=arc-20160816; b=TxWuTsoJsIX79U4miXcW4mrDSWySLwqmPrM8oaP5mamjtuYDBP89uSfPftH/ElqwrF iZSVXSnDzLW3EWAZDExoeOAlFkpDIoK6B+2my+wtPHiREaymnxWlwUB3TCKZUH5H9j0H AvgftRn0b28h703bD1QTPvg3X23Ng38xBx5LDgNWHqf87vZanapmb6HlCEM7KMFkU10k 6ux+dBPhHicU9n0Iff5fwf9mWckRNtAJ/v84jjyCAd/KoOhknwB+2EE9v3/jI0nVLjAa gdpVPbGPi/3k2Cr6DcPH9alIdeGbTCFyRP2WioWKjKAY54xuVk6z8pBIYurQU58Wn5h8 iUwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+5sEmqJRfvcq1ySo6Whh0Mtndny3X+4rZCyHAS1Le2U=; fh=gxc/HTt8I7H60+yTTJJXyc6QfLirZXdzvVWlSfI2Rz0=; b=aBbmSokqgYCZhQdMXXOglvOpHOPmrZYjSPj7ZsdEJCu9bPMW0perL+89rbsh/wMzX/ 4NSBMt8FT08j8SbbRNU5aOf+kWoPbfubgA2qHuWu0iaEEqn2YFjZv5vcfgR8S4I9wp00 NCxlhjlHIv9cqwRQNcTViQ+kCuyosckT1HvSDVmDYTJ+aQFDvwMtZCPoyJgSuprCV91e rqWAJwTzKWGx/LAvXOOI5zOIE0aiHhCXloFbkjYnnLgwOII29VCU/m0ZLg/oVYmhdXw8 x8/txwwSEjGIzsxsn/4h9GugWyhFRXnY7WWzgFr3LDQ7E0VABNUD3EgeUlOYPv0u2M4B 6wQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mev.co.uk header.s=20221208-6x11dpa4 header.b=pBnoJggm; arc=pass (i=1 spf=pass spfdomain=mev.co.uk dkim=pass dkdomain=mev.co.uk dmarc=pass fromdomain=mev.co.uk); spf=pass (google.com: domain of linux-kernel+bounces-31230-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31230-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mev.co.uk Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bv22-20020a170906b1d600b00a23499b189fsi8040360ejb.913.2024.01.19.05.57.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 05:57:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31230-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@mev.co.uk header.s=20221208-6x11dpa4 header.b=pBnoJggm; arc=pass (i=1 spf=pass spfdomain=mev.co.uk dkim=pass dkdomain=mev.co.uk dmarc=pass fromdomain=mev.co.uk); spf=pass (google.com: domain of linux-kernel+bounces-31230-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31230-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mev.co.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9FF6B1F21C04 for ; Fri, 19 Jan 2024 13:57:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8D3B53809; Fri, 19 Jan 2024 13:56:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b="pBnoJggm" Received: from smtp119.iad3a.emailsrvr.com (smtp119.iad3a.emailsrvr.com [173.203.187.119]) (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 CA347524D8 for ; Fri, 19 Jan 2024 13:56:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.203.187.119 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705672616; cv=none; b=e9kUyTCSKKtEmT4+TddSXm2io0OHZcuJLGrW1D7pEgR8YVPdlS7gjSXICURA8LQAF6g4O3kkeG7W0zJxLwNbd6IF4b6HAHuGt9K4wsSFq/fblc9eimWIZic7swtK2ByE0GpX0Xv/XhMUM2EK0GG9QhrIeJFnlm5Cd7PbXcpEs5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705672616; c=relaxed/simple; bh=nS+r7MaskCPsuXGcVmc2lQaLyPRahw2eN/Qec5iMmx0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q4Zfq1BsUw/ijpIhrPByGYkCrnq/L4x9xiRdgxfUVRjaGQGiltlieGAIf821WSgqSmxSnhEZlT6fhRifMEhzXvec/p0Z4iIpW1zQWUYDRnUWVQ919hop3AyBAQo4UND54nxRA8lGSzDXpZBiuSyoq8mjWhqDm6yKNZdwIPNGM1A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk; spf=pass smtp.mailfrom=mev.co.uk; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b=pBnoJggm; arc=none smtp.client-ip=173.203.187.119 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mev.co.uk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1705670449; bh=nS+r7MaskCPsuXGcVmc2lQaLyPRahw2eN/Qec5iMmx0=; h=From:To:Subject:Date:From; b=pBnoJggmF7hEiOIjzQeyYvaxGz3p0EqaNbhOkhmR1LSX9p/vYFE5u1lKvh88F1D+0 puat1ryTvHenIFNjXmNq2baAJAOGWHjYM4bi1Prm2Rg1EAGnu/quYQyI5NrMQtw2Fl +a6CPdD0O/sdRLM8YsKBMHHDYz/Jsl7PLejIDdzs= X-Auth-ID: abbotti@mev.co.uk Received: by smtp23.relay.iad3a.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id DBD4E24FCE; Fri, 19 Jan 2024 08:20:48 -0500 (EST) From: Ian Abbott To: Matt Hsiao Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ian Abbott Subject: [PATCH 2/2] misc: hpilo: rename device creation loop variable Date: Fri, 19 Jan 2024 13:20:18 +0000 Message-ID: <20240119132032.106053-3-abbotti@mev.co.uk> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240119132032.106053-1-abbotti@mev.co.uk> References: <20240119132032.106053-1-abbotti@mev.co.uk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Classification-ID: 5ab2b5c7-4f68-4b27-8b47-1878e9f7d96c-3-1 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788527386075147220 X-GMAIL-MSGID: 1788527386075147220 In `ilo_probe()`, the loop variable `minor` isn't really the minor device number, it's the channel or slot number. Rename it to `slot` for consistency. Signed-off-by: Ian Abbott --- drivers/misc/hpilo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c index 3428a0bd5550..04bd34c8c506 100644 --- a/drivers/misc/hpilo.c +++ b/drivers/misc/hpilo.c @@ -770,7 +770,7 @@ static void ilo_remove(struct pci_dev *pdev) static int ilo_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { - int devnum, minor, start, error = 0; + int devnum, slot, start, error = 0; struct ilo_hwinfo *ilo_hw; if (pci_match_id(ilo_blacklist, pdev)) { @@ -839,11 +839,11 @@ static int ilo_probe(struct pci_dev *pdev, goto remove_isr; } - for (minor = 0 ; minor < max_ccb; minor++) { + for (slot = 0; slot < max_ccb; slot++) { struct device *dev; dev = device_create(&ilo_class, &pdev->dev, - MKDEV(ilo_major, start + minor), NULL, - "hpilo!d%dccb%d", devnum, minor); + MKDEV(ilo_major, start + slot), NULL, + "hpilo!d%dccb%d", devnum, slot); if (IS_ERR(dev)) dev_err(&pdev->dev, "Could not create files\n"); }