From patchwork Tue Oct 16 15:38:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauricio Faria de Oliveira X-Patchwork-Id: 984821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42ZKGQ2sHPz9sBj; Wed, 17 Oct 2018 02:38:38 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gCRQV-0004Bm-Ea; Tue, 16 Oct 2018 15:38:31 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1gCRQU-0004BK-2r for kernel-team@lists.ubuntu.com; Tue, 16 Oct 2018 15:38:30 +0000 Received: from mail-qt1-f197.google.com ([209.85.160.197]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gCRQT-0002th-PF for kernel-team@lists.ubuntu.com; Tue, 16 Oct 2018 15:38:29 +0000 Received: by mail-qt1-f197.google.com with SMTP id t27-v6so25180328qta.1 for ; Tue, 16 Oct 2018 08:38:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=9PCHxE5fQtjY9TWkCH3SEygD79Aue+dpZzEO0MWgV9A=; b=gwegEeAAQfGMVqV4pgBpaVD91zqqz501HgWfmx4ctN0yfHBkvd0QRGZdfzsU38XOup LbFeUK8VFvcudW5cqKiDWu3znUn4nMVCwa8KNOvGkNLtZbhF/fcTr/+SMZ5smNr5kuPr b4agUzs4VUdS9Z7l5cAlbMC5Nabof59RB9YGvo+kniYIiADEt/Fb56FTVQKG4NbXF8UC FBLNkkgceyrBT+84I8t10bgzzdQPfmm4Ws7tgn9x8E1DdJDgr8YYmZByJYfX3KSmFht5 oDPy90av2J4F2FRAl6I+19YXA/C+kJjexE6fy33Hx1r8EKdcfL9inWrX8fwj9S7aYwnT 0eBg== X-Gm-Message-State: ABuFfojWuvvk/HjvmF4zfdS5SP/LQCx5HOIS1fyCczxRtgARBhjVHQoX 5N/zlxX5ulkh/DRjLy276ey9qA7NqiTyd/cI8asNIBnKzxerrSHCihzk+O/EDJwvSadH8R4Hf7U J/2XeVvI8XreQnbqB59Rc0XOa7nf7EerXK0LoW//x2Q== X-Received: by 2002:ac8:1307:: with SMTP id e7-v6mr21607744qtj.22.1539704308781; Tue, 16 Oct 2018 08:38:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV63LUWNOC9Yb+y7HnXMjaFICLFuVMHKa00WJy2D69F5I5tKrhH5j48/dRazIASZhgYQl5mzzxw== X-Received: by 2002:ac8:1307:: with SMTP id e7-v6mr21607734qtj.22.1539704308659; Tue, 16 Oct 2018 08:38:28 -0700 (PDT) Received: from localhost.localdomain ([179.159.57.206]) by smtp.gmail.com with ESMTPSA id c44-v6sm11082673qtb.53.2018.10.16.08.38.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 08:38:28 -0700 (PDT) From: Mauricio Faria de Oliveira To: kernel-team@lists.ubuntu.com Subject: [SRU Xenial][PATCH 2/2] UBUNTU: SAUCE: (no-up) virtio-scsi: (cosmetic) reestablish virtscsi_pick_vq_mq() signature Date: Tue, 16 Oct 2018 12:38:20 -0300 Message-Id: <20181016153820.29487-3-mfo@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181016153820.29487-1-mfo@canonical.com> References: <20181016153820.29487-1-mfo@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1798110 The commit a6c038a533f3 ("UBUNTU: SAUCE: (no-up) virtio-scsi: Increment reqs counter.") changed the upstream signature of virtscsi_pick_vq_mq() just to pass the 'struct virtio_scsi_target_state *tgt' pointer, which can be derived from the 'scsi_cmnd *sc' pointer with the scsi_target() macro (it indeed is, in many sites in this source file.) This doesn't functionally matter because that function is static, thus not called externally, but in order to maintain/reestablish the same signature as upstream (since it's not really required to change it), revert that part of the commit and use the scsi_target() macro, as used elsewhere, to get the 'tgt' pointer from 'sc'. Signed-off-by: Mauricio Faria de Oliveira Tested-by: Mauricio Faria de Oliveira Tested-by: David Coronel --- drivers/scsi/virtio_scsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 572722e86bef..377ef50d57b4 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -592,10 +592,12 @@ static int virtscsi_queuecommand_single(struct Scsi_Host *sh, } static struct virtio_scsi_vq *virtscsi_pick_vq_mq(struct virtio_scsi *vscsi, - struct virtio_scsi_target_state *tgt, struct scsi_cmnd *sc) + struct scsi_cmnd *sc) { u32 tag = blk_mq_unique_tag(sc->request); u16 hwq = blk_mq_unique_tag_to_hwq(tag); + struct virtio_scsi_target_state *tgt = + scsi_target(sc->device)->hostdata; atomic_inc(&tgt->reqs); return &vscsi->req_vqs[hwq]; @@ -647,7 +649,7 @@ static int virtscsi_queuecommand_multi(struct Scsi_Host *sh, struct virtio_scsi_vq *req_vq; if (shost_use_blk_mq(sh)) - req_vq = virtscsi_pick_vq_mq(vscsi, tgt, sc); + req_vq = virtscsi_pick_vq_mq(vscsi, sc); else req_vq = virtscsi_pick_vq(vscsi, tgt);