Received: by 2002:ab2:744d:0:b0:1fb:9c95:a417 with SMTP id f13csp561740lqn; Wed, 5 Jun 2024 14:59:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8j59/xIZvUC0TvPDHFpapR/FSaF7aZ9q+CjqdsHt+yFmDj3oaf0RPtdSs1+brIOIzOHptP/R3JvaNoELZ/xCHo87s/F85h9HFv7XT9A== X-Google-Smtp-Source: AGHT+IEWr3stVHgKDqAVOqeAJrTiQEm3flS4awq8fylWn9VbtRIhEjpDnImRUrZhfGCokykvpHmy X-Received: by 2002:a17:906:a47:b0:a6a:ab5:bbcf with SMTP id a640c23a62f3a-a6a0ab5bd80mr203158366b.3.1717624745912; Wed, 05 Jun 2024 14:59:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717624745; cv=pass; d=google.com; s=arc-20160816; b=sY6wXmi6WBiUlmnULqrCYmYpoE+ZmnMXsESqWjNLQBGUJATbwfU/KjEas54e26KGsg dnTDFomGh+eiYrzLWgUAiVjSX8zzZkNPxfKfDlhhLqAgoKDvo5YyaEyT2G1JSONHENtn qjWgfCbQPzNOXgG/AcnlkiH/Oen8SkKjQxxpR0fm3CmxN2I25s94LltnRfiFcWKBbM05 1mlyLkvKBT4pHfiGC6AddBGTQrAhKhcqQcThnwYKD1e1GcVG8nQWChNe+8tl568UIUfR WwouRsoikHa6laUqezunuTr/sJik9w27Iva3UzVM/7IqP9zbzzdMul3ohIpRJwA4lOrz NhvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=pW8FMcPWzE8RX9f5/Zt3xMTyVYAifVWeI0dcyI593AE=; fh=BoH/dtkoDQMJDkrHSGohZINzSn+0i/WOXEVdM21hjNI=; b=ldlWFqJhMSSz8MfkdtMIRW4BrSh3F+BISsoN5MiINAYVFsPzhkKWlaL9UZtY4TJoYT b/YWj3sIGhO6Y1m74OaMsritqKNyRI/5dBqfkbf/9WSr6TheKUNhyw2uurXAJ4WnOEK0 Bd8Qcmwuv/hSrEy5X57Z5zli1bcMXOhMH+YoqDCIHs+szejajN4L36+Vjc48lWpVLFIx SE1UcwHtsKMadBZqwNq0SBXnAPT3Oj5x0Z4sqb4p2SdP5dj/QdAb42sck0mb7jt+do9Z LMNiCdhPW15q9v6ndCP0byvtLVU1yxLBgi/dGEpU1dw4LrEM5pfC3Qj554ej1sygHdkQ qkVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jynu4bSk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6b17349431si91596266b.844.2024.06.05.14.59.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 14:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203328-linux.lists.archive=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=@kernel.org header.s=k20201202 header.b=Jynu4bSk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 728601F25611 for ; Wed, 5 Jun 2024 21:59:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4761515FA73; Wed, 5 Jun 2024 21:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jynu4bSk" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6B8E03C062; Wed, 5 Jun 2024 21:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717624730; cv=none; b=P/h2P/aSoPKXlGzmTZe/17o6XRH1WjWSDVn0pt1DvAzpkyq/Nk3RVxuFAX6bVnoOsxZfsqNswr+68KUfg2l91ILI4Ct1wwM4eqTjxj1z/qnnsj36WWLh+as9IeBO2u9bL92Tb+9UMSJWMQAe5PoWr3Of75/h2a7pXUmoLcTPO28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717624730; c=relaxed/simple; bh=LWOLMGrH5N2gPZ93B8pHBq6TnKvAfq2vS3ahIjsTjdw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=pPb/OF/0QhVmf0XefwZ9nbRRL5+N3qZwl9fjHDDB4vXUzfbKRRgoD9Lx8Squ6FZjfKNfMwgfKczLmeHZocvFMAaLtMftc4OU4eqpw9heYu7kyn+X1sVBth+fwTlyWAP8lMqe96zk+gyNBGFah6fIijL63JmZpWVPungfC/RkS4I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jynu4bSk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E600C2BD11; Wed, 5 Jun 2024 21:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717624730; bh=LWOLMGrH5N2gPZ93B8pHBq6TnKvAfq2vS3ahIjsTjdw=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Jynu4bSkImO8IqHtm+3jiN9qiAD9ewBiRk0PE0yEZ+zElWILWk216XorAPgNDBENd NK0xjtf8ROxwO028OP0/6en3xTOGj2EWTsNueN93OMfgH/nX30yWQpfMwg8FJgJtOw PJJrsJ9uXVvTgWBO//SpM5MC9J3JF972AnDW2oKLutRHzj2o0zBip0u3fk4v6N41tm muYZGCs//ESgvmeT84OzXxo3M8eQ+ea8ndE4mprl5Crie5PiA//dlMK+4SILrxQLcn ksgT3rYoRj5moB9fkqk7UYLWqo4WQXSqu3JPaHgd5PSf7HpFL9qv4+CbblaY68VoFr NJX9AO/b3s7SA== Date: Wed, 5 Jun 2024 16:58:48 -0500 From: Bjorn Helgaas To: Abhinav Jain Cc: bhelgaas@google.com, javier.carrasco.cruz@gmail.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mahesh@linux.ibm.com, oohall@gmail.com, skhan@linuxfoundation.org Subject: Re: [PATCH v2] PCI/AER: Print error message as per the TODO Message-ID: <20240605215848.GA782210@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240605212344.21808-1-jain.abhinav177@gmail.com> On Wed, Jun 05, 2024 at 09:23:44PM +0000, Abhinav Jain wrote: > Print the add device error in find_device_iter() > > Signed-off-by: Abhinav Jain > > PATCH v1 link : https://lore.kernel.org/all/20240415161055.8316-1-jain.abhinav177@gmail.com/ > > Changes since v1: > - Replaced pr_err() with pr_notice() > - Removed unncessary whitespaces > --- Thanks for looking at this. - It doesn't apply to -rc1 (the TODO message is missing). In PCI, we normally apply patches on topic branches based on -rc1. - The subject should be more specific so it makes sense all by itself, e.g., "Log note if we find too many devices with errors" - Add period at end of sentence in commit log. - Move historical notes (v1 URL, changes since v1) below the "---" line so they don't get included in the commit log. - __func__ is not relevant here -- that's generally a debugging thing. We can find the function by searching for the message text. In cases like this, I'd rather have something that helps identify a *device* that's related to the message, e.g., the pci_dev in this case. So I'd suggest pci_err(dev, "...") here. - I'd keep pci_err() instead of switching to pr_notice(). If we get this message, we should re-think the way we collect this information, so I want to hear about it. > drivers/pci/pcie/aer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c > index 0e1ad2998116..8b820a74dd6b 100644 > --- a/drivers/pci/pcie/aer.c > +++ b/drivers/pci/pcie/aer.c > @@ -885,8 +885,8 @@ static int find_device_iter(struct pci_dev *dev, void *data) > /* List this device */ > if (add_error_device(e_info, dev)) { > /* We cannot handle more... Stop iteration */ > - pr_err("find_device_iter: Cannot handle more devices. > - Stopping iteration"); > + pr_notice("%s: Cannot handle more devices - iteration stopped\n", > + __func__); > return 1; > } > > -- > 2.34.1 >