From patchwork Mon Aug 5 13:48:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 170557 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp4321633ile; Mon, 5 Aug 2019 06:50:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9NmGurwoJ7L/2HUb2+bsQzEtxooeL1VLygZUYZpGRENBl1+aAbEynofw1XsYtaBIN+Ga5 X-Received: by 2002:a17:902:900a:: with SMTP id a10mr30798901plp.281.1565013023244; Mon, 05 Aug 2019 06:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565013023; cv=none; d=google.com; s=arc-20160816; b=hqSVAJ1ove0Tt0UilGJfmidFinuZXF9lSma1ZahJdxtWGa0ZZ8mP1LlDXH2f5gOMQf l+Uc4ylFKMNtGw3HLc55tt8VKQL3QlDZDFsdgYApioef/XUhBKcDFNqmeZPWqEn4uG0c GsTaaWcxVcSSQJoJp6oCWmUpFORwTJ00c9R+HWjnqTiEfKWrjXyRC0j0E1EYDUXHFjbt /8TKQ1tUHYq1TVIkI5QLkMy2CzYLwg3ui0J2GkKrGRzMagSg8SxvD+iUThUbeuhs62/l KEpYJLNS5cr0xX8h3+E7bRI/xtBtfQImMNfJu26TeDDfH2kunyKlRLw8DfgFGyXcc74g UsuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=pEC+W9BeJiyhXVI2L8hUCtId7n90aXzDdj5JQbUJ5Lg=; b=q2VJPSMi5ULDIwxUdMhAkQ7T/V3XG4BkJpZ8cl3FjXUq3gej+hUPA5+j0x4lkcvZ4Z AgcplbJa5y9R3ZJq1NS2YtRgt+mfYydABkwwil4eWAVgmCwolnUQZ4TPm9WBzfQ3+mAZ 3UNqwqdn4xhPu1EfQY2BhW7b4ho72TvT1NMATzwTvbdd9c7zVLzceyOzojgFf+lFxure sy+vkYutSzAZEI0AcFi7OUxDm0cswPn3YbqK5/zfYMW8/keRXyIvBljupUEEuo1ZK235 XN1WV2PSt4eah5fspY3O3O6fF74AbSEHO6DY5O+INZ5EDjNk/FM/pV02fAecMlyVhGNe IFfg== 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 73si43449528pfa.123.2019.08.05.06.50.22; Mon, 05 Aug 2019 06:50:23 -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 S1729403AbfHENuV (ORCPT + 29 others); Mon, 5 Aug 2019 09:50:21 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:34658 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728815AbfHENuU (ORCPT ); Mon, 5 Aug 2019 09:50:20 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E507AC09D589F8D79A86; Mon, 5 Aug 2019 21:50:18 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 5 Aug 2019 21:50:12 +0800 From: John Garry To: , CC: , , , Luo Jiaxing , John Garry Subject: [PATCH 03/15] scsi: hisi_sas: Fix pointer usage error in show debugfs IOST/ITCT Date: Mon, 5 Aug 2019 21:48:00 +0800 Message-ID: <1565012892-75940-4-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1565012892-75940-1-git-send-email-john.garry@huawei.com> References: <1565012892-75940-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luo Jiaxing Fix how the pointer is set in hisi_sas_debugfs_iost_show() and hisi_sas_debugfs_itct_show(). Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 54bbab7151c7..325ec4306794 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -2992,9 +2992,10 @@ static int hisi_sas_debugfs_iost_show(struct seq_file *s, void *p) struct hisi_hba *hisi_hba = s->private; struct hisi_sas_iost *debugfs_iost = hisi_hba->debugfs_iost; int i, ret, max_command_entries = HISI_SAS_MAX_COMMANDS; - __le64 *iost = &debugfs_iost->qw0; for (i = 0; i < max_command_entries; i++, debugfs_iost++) { + __le64 *iost = &debugfs_iost->qw0; + ret = hisi_sas_show_row_64(s, i, sizeof(*debugfs_iost), iost); if (ret) @@ -3022,9 +3023,10 @@ static int hisi_sas_debugfs_itct_show(struct seq_file *s, void *p) int i, ret; struct hisi_hba *hisi_hba = s->private; struct hisi_sas_itct *debugfs_itct = hisi_hba->debugfs_itct; - __le64 *itct = &debugfs_itct->qw0; for (i = 0; i < HISI_SAS_MAX_ITCT_ENTRIES; i++, debugfs_itct++) { + __le64 *itct = &debugfs_itct->qw0; + ret = hisi_sas_show_row_64(s, i, sizeof(*debugfs_itct), itct); if (ret)