Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp727919pxj; Wed, 16 Jun 2021 12:09:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9vzpxgQOdiDJsJWKCfF+nnEiXa95xsoIVBZIcLa4col5CIxjvMvlQijWuqVpVzSx6FTyT X-Received: by 2002:a05:6402:1771:: with SMTP id da17mr1513315edb.31.1623870546308; Wed, 16 Jun 2021 12:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623870546; cv=none; d=google.com; s=arc-20160816; b=M4hSQw9NoExHFRZZkoZNFmhXplpLRJQpjXbqQNDeGWDrEmcdphUEfQ1cdEqUbY7Wrw yRGX8NHW5J53MFiiXF9WaTjA1hf4PMaWsWuobN+w9U+HlZPa1Wu5Ecqj07cClVrJIeuq 5Y4J8kyqoqOpprAgSFoFLVZhUfd9Q3bNik5l1WBC2B7gELPuSRlDYvmtApnKDS5PPv+r wY5/oW6VOZzpNNCqGoPXJeT1B/HzFR3UQJCwpWca4aVkIvjO2g/U/2EXqLINtAzmOqI+ AP4E7uFLN8guGPX2WlK9EQo3ymSJtHsb4zGIRyCypPoOmIZ6UPjzASqhy02nBYschfHZ 35wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=SL4mq5lH/jLWkx0lL0jvAjwkMDEXCDxw28fBee0wxhM=; b=BymkSFvpuijtxEGFHNYij7zEL8Dv7z2eCbAii5QppZtYxN/S+jmlkL4eBHwPs1i3tm Wk+xQPm1PTdMw5WC7hXo1A/n/3+r6boEntQXdb4ffm1/tDYPSAF+3yEuW6iBg8u0eXEg lgrokeNfhYf7k1U4qDHuvvpe1p0/Ecn/eaPY9N2B9FlkiaYaD+bULJBkgzAUia9Uya8M VIEOe35EBivo0xE+ArzVlFG2a0UIlFma0jkLtdBbXiqOdunwRky1cU7l9dmhPXTGg5wT INFOVS9f8AzzYVo+uvuqAPnZdqtlRxTktC1FkgVAMc72AIkLlYEXaZhuZaSa4/lZI4Bz DOrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YtNSVLEv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si3097285ejr.495.2021.06.16.12.08.42; Wed, 16 Jun 2021 12:09:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YtNSVLEv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233856AbhFPOQz (ORCPT + 99 others); Wed, 16 Jun 2021 10:16:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:53604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233398AbhFPOQz (ORCPT ); Wed, 16 Jun 2021 10:16:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A4E5F60200; Wed, 16 Jun 2021 14:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623852888; bh=gddT+iJoudoVpablFQEYkqg+MNl5OKYIo4Jvk+UWE58=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=YtNSVLEva/mHnZOnQojvcTftq7t0/Oo64rh4bnsnxAC8JdGaA1nSOyEOHrDTqh38+ XXeEAZgP77UFd9D/ijnXBf5GcJao/AS7f8AwpssnqJ1J9QiL5hQ2r6wjEycEUcYLnA DMhIjmqg5g7gNpqJQWY2MZ4J52bsL6LLuJR7cgxhxJVN4vLO8JRjuAT+VUnv4Oi1yE gcoeSupDdv/VpkZ2uswF8T3XOUd9am0Ip2oXIlAqgzMP63Ie/IlMjJJ8gWM/xMeCvA FsuaxHHclYPydDVXzztTgO08uOBaay5xH46rOZ6ORXj3NSpQdzfPB6LUSE7+x0PPFR Lner0uMJtLBPQ== Date: Wed, 16 Jun 2021 09:14:47 -0500 From: Bjorn Helgaas To: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= Cc: Qi Liu , will@kernel.org, mark.rutland@arm.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, zhangshaokun@hisilicon.com Subject: Re: [PATCH v6 2/2] drivers/perf: hisi: Add driver for HiSilicon PCIe PMU Message-ID: <20210616141447.GA2973335@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210611233355.GA183580@rocinante> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 12, 2021 at 01:33:55AM +0200, Krzysztof WilczyƄski wrote: > > +static ssize_t hisi_pcie_bus_show(struct device *dev, > > + struct device_attribute *attr, char *buf) > > +{ > > + struct hisi_pcie_pmu *pcie_pmu = to_pcie_pmu(dev_get_drvdata(dev)); > > + > > + return sysfs_emit(buf, "0x%02x\n", PCI_BUS_NUM(pcie_pmu->bdf_min)); > > +} > > Same as above, what about "%#02x"? I think you'd need "%#04x" because the field width includes the leading "0x", so printing 1 with "%#02x" would result in "0x1" instead of "0x01".