From patchwork Tue Jul 21 16:41:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 246902 Delivered-To: patch@linaro.org Received: by 2002:a54:2c11:0:0:0:0:0 with SMTP id g17csp2711233ecp; Tue, 21 Jul 2020 09:42:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmx2EV7zUPGeDadCl/len5djeM/LE9itzXZt9aiUv62K03Os8HGxagrJx9w2d5+zAvQf9M X-Received: by 2002:a17:906:b345:: with SMTP id cd5mr1744001ejb.131.1595349741583; Tue, 21 Jul 2020 09:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595349741; cv=none; d=google.com; s=arc-20160816; b=rmOVuzUYUTsKalvhbQtj7vnhgV/CyVAq5q8ERll2dupgxySE1zyhXgI+GmJTWxO+3m wXQ+Y7uycP5hIVDvmWRp6JuHPgY94oZt+EpTQv/h+3Box6Diu4SQeGvCh+u2GvG+4z3j PRZaGsLEsph2MW30WFxWnnjIDhU4t6XaIOCkNqyFz9FnNsc7PlUU2458jFKfVScJfuRx yyi4NXxb9FVmEuc+PXHzpJ8CQ4N8z25nZiUI9Kwfb1cPVvOGAGQURyR1ONH3M5UG4dov lmNQm8hDl749ld4+iQ0aZthkO7YqCmZxSnqB1i9xqiZ9I44vRhf37PKyxX6BSm5ceiTD t5HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IxxdeV7kDOOLuCiwH8B9pnIrWXz+yoC7MHLRIwWlfSE=; b=uI0kLsIsbeNA4pHvmBQ8c3tUGLElv7w3QsgpjrU/sm29tWwz33dDiAnoP7jn9OpW5s QVdI5m0C2JWgvbfHOhBD0zTX2jsU1XLTTjVqW4mo3A7TtTQLC5EJjci6e0RDcTG2coOQ as4Z5vdpiHEC9ubm17pytXacR3nKVhWZXmu+1fim1D5R2gjEqG9WUaNwVGAE4CwTSzeR 95ySVAATLuakP+WNJN9I7SYXn0gAHK4pjGcBwrAGxj3yrSr7R2eqH0eetAX+o8hxlgUD oGDbvxlKGbzrZRuXfxbVL5DvROtLsPfh9qCszGqjfmbcHel2pz6d5lTgBT2xjwG7qODh foQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fi55ZS0g; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si12792751edy.88.2020.07.21.09.42.21 for ; Tue, 21 Jul 2020 09:42:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-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=@linaro.org header.s=google header.b=fi55ZS0g; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730603AbgGUQmU (ORCPT ); Tue, 21 Jul 2020 12:42:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730592AbgGUQmS (ORCPT ); Tue, 21 Jul 2020 12:42:18 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FD31C061794 for ; Tue, 21 Jul 2020 09:42:18 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id 88so11571972wrh.3 for ; Tue, 21 Jul 2020 09:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IxxdeV7kDOOLuCiwH8B9pnIrWXz+yoC7MHLRIwWlfSE=; b=fi55ZS0gMcsGNbPQ7bZEjO0p6noM4W+aMdmDBNrQfs3aO2J9efXsntciRp3e3FVdFV /4fJnHUQtkAZllAFG5F44YdU77QwwhEh5oCJ4Go/8eKXiFmuGMPQwrL8vgrszyDmMUn0 qpIKAXN78PoWGmoIY9Dt8YpLIlVYJXuyC7cewqs/MvhI2QWXv5UXzyokbxUw0EuB4RyO T3r2TJwj3km8iigohAT4/mG+nBG7k5MNYA9mIymSTj1Q2h7qFBc3KpwyubuYmDfnPpaP geo/oAjmpy76PneUK61DKS5bu7l1/jugTAYUS1jYiWe0b/2S/ALPqRdTbVVIt1rayt4a o4rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IxxdeV7kDOOLuCiwH8B9pnIrWXz+yoC7MHLRIwWlfSE=; b=qC519Iim7pPBWj2q2+GMJsAFSMkMK99ucDd/28RUyepeCyhoWvgoZYirIQewAKAhQ1 wpSk+zXcKcciw7I/X5M1cr+H9RfsIUGBjjGjL/dKEGvh83ttp+O4N+sjHdZ/n8jAPP+k kSGGiZtDFh1wnkYtsLrznG9+51WKw2/M8mySyQzHBTIHGzBMdvZ//XQfMLVggEPekunh spUFZTULSwqysMOeUbdB5QkAaC6QI5OJtZLa3L/L/Jsgw9z5ra9PyzD7+NguHoLN5pO7 U5/bDJUVyEAiVTPmbanovH08Il6XXhxVYWatY1SGTVDLnppzAcSMn4CEiMKBYg8wKmPe +LNQ== X-Gm-Message-State: AOAM532UfM3jCSUNibZ0X8rpWzn4LHSUeXMg3GUlJluudZsfyfatf1xe U3EFHvWWUjU+vCQCTGT3v6Nmyg== X-Received: by 2002:a5d:4710:: with SMTP id y16mr28344888wrq.189.1595349737054; Tue, 21 Jul 2020 09:42:17 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.94]) by smtp.gmail.com with ESMTPSA id m4sm3933524wmi.48.2020.07.21.09.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 09:42:16 -0700 (PDT) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Lee Jones , QLogic-Storage-Upstream@qlogic.com Subject: [PATCH 13/40] scsi: qla4xxx: ql4_init: Check return value of pci_set_mwi() Date: Tue, 21 Jul 2020 17:41:21 +0100 Message-Id: <20200721164148.2617584-14-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200721164148.2617584-1-lee.jones@linaro.org> References: <20200721164148.2617584-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org pci_set_mwi() has 'warn_unused_result' so the result should be checked. Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’: drivers/scsi/qla4xxx/ql4_init.c:664:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] And if 'status' is removed: drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’: drivers/scsi/qla4xxx/ql4_init.c:666:2: warning: ignoring return value of ‘pci_set_mwi’, declared with attribute warn_unused_result [-Wunused-result] 666 | pci_set_mwi(ha->pdev); | ^~~~~~~~~~~~~~~~~~~~~ Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones --- drivers/scsi/qla4xxx/ql4_init.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.25.1 diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index 82f6e7f3969ec..4afd43610f68f 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c @@ -665,6 +665,9 @@ void qla4xxx_pci_config(struct scsi_qla_host *ha) pci_set_master(ha->pdev); status = pci_set_mwi(ha->pdev); + if (status) + ql4_printk(KERN_WARNING, ha, "Failed to set MWI\n"); + /* * We want to respect framework's setting of PCI configuration space * command register and also want to make sure that all bits of