Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4766845imm; Wed, 30 May 2018 11:34:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIYQmPBF+lYqTbA3SCtHyCXQ9g5hlL0G49/nBgUHXqhmDlEmXUchX+AGAdWtEYjSvZvLHhO X-Received: by 2002:a63:70a:: with SMTP id 10-v6mr3133973pgh.216.1527705247058; Wed, 30 May 2018 11:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527705247; cv=none; d=google.com; s=arc-20160816; b=kfoLfiUl+C6swkKQwQwvqZJMR5dcEWNgM8HNpXaSw90WNHi8VNiuWDojwMrr8peXdL m/Fdi0bT0sxxYNDdmquVKxKGPPehWnnXHtuzlT/aX6CFR4mfKxtSOfxAqo6OSQV7EatZ 8dFgagMrEiyfRwcsbFjAVai1uE7MtHCDbK7RWZU0JszUK03+VMoDZfh17th9I1n0X+rn m7sN7tFr0e35g+hFgAJn+K1hrCaVhEYSZ8pdpj0O2mJ6EIb0ibZTmB3CyvyN/8zNFZXI C6nZNal96oRdd5PYFaTNwppnK+NtGQC3P4FUroej4wjETIJXYUdtTUGdkOBDHPy/opB6 7YQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=9/Ejd1y5YFWE7fTTqr6yyf5FHc/chEyIya2Yf6LBtWY=; b=0v7t5tquQ+ieew/lc/q13/POyUgEgeXyjMaaiafIHzs0mpS12RdYt8rcgJ0ONkZuK6 7V203IiReHsrYtbEWG/trh4p0XSso5JUIqkdkZjgcQn7iuq99du+fEp8jYyOA5Uj0uVQ q9C29jYiWw458W4lLVSDvxc1j1OpdrTNi9zx/22/kH3u4XVchIFft0/gSCs2iIQjqL0b /f0umv3CNOcuxVOxGWplFKxgPWKPp56nQGRtJUU0Woamh1VeSvGU/DHBgyYGhNs5jFcv 3DzIP/N1UurhRupTa3S59EurCjdr3q1tlE2D+e85Tj1m+yfzVULngkGw4sprQGClQXVd OXqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x32-v6si34594768pld.435.2018.05.30.11.33.53; Wed, 30 May 2018 11:34:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932166AbeE3Sco (ORCPT + 99 others); Wed, 30 May 2018 14:32:44 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:60513 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753659AbeE3Scn (ORCPT ); Wed, 30 May 2018 14:32:43 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id C2DA130002226; Wed, 30 May 2018 20:32:41 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 875EE74BA4; Wed, 30 May 2018 20:32:41 +0200 (CEST) Date: Wed, 30 May 2018 20:32:41 +0200 From: Lukas Wunner To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Oza Pawandeep , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] PCI/AER: Decode Error Source Requester ID Message-ID: <20180530183241.GA20222@wunner.de> References: <152770259826.80701.7360032106128917833.stgit@bhelgaas-glaptop.roam.corp.google.com> <152770285586.80701.6545710900591672975.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152770285586.80701.6545710900591672975.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 12:54:15PM -0500, Bjorn Helgaas wrote: > void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info) > { > - pci_info(dev, "AER: %s%s error received: id=%04x\n", > + u8 bus = info->id >> 8; > + u8 devfn = info->id & 0xff; > + > + pci_info(dev, "AER: %s%s error received: %04x:%02x:%02x.%d\n", > info->multi_error_valid ? "Multiple " : "", > - aer_error_severity_string[info->severity], info->id); > + aer_error_severity_string[info->severity], > + pci_domain_nr(dev->bus), bus, devfn >> 3, devfn & 0x7); I think PCI_SLOT(devfn), PCI_FUNC(devfn) is a bit more readable.