From patchwork Mon Nov 2 10:25:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 320196 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp3607270ilc; Mon, 2 Nov 2020 02:25:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGhaP0BCDrdQJ18IjFzi+vA4BsL8TrbrEaIM9tCs0Juh9uDavFwnS7RLn2eV5pvr3Gbv56 X-Received: by 2002:aa7:c2d7:: with SMTP id m23mr15928811edp.230.1604312759229; Mon, 02 Nov 2020 02:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604312759; cv=none; d=google.com; s=arc-20160816; b=qxsziu9ogIoiTpKOMCg5xIfWh3WQudrxic5vLmdVLcKUsd1wKTrjyvnEpFKmrcNtI5 XktE3gLG+Yd3v44sEYWEg63WO+NlVehIs9jSdn3twyjh0ocIKUoIH160NASxWSxlomqk xl5scqR3ntxV4ui2rgOHxnjeKL6BxZeaJGnfj4twnQGJYpzvusBD//0oEDp/HWkG9PeL LnBJ+ScNaU4/T464aG1OuCy48SU7+glhEwkZz9hD6CS0RW6jVv2kXQTOaqtTGKN6qWSz S70XQOwqpj7GptTn35zvSdOjQPHgikZrBblraC/Vb/jaPvexKfdA/qbi61JoKeHbRrM4 vc4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3H4ECss9j64M9/DgBBB+UTVHgBY3NUG4+bvVfh0cN/I=; b=f094CH3egYpXY68WFGz2jxalsPyGrBYnnHYSshsXua1FNxCgZge23kcO/y8g4PgFyE h7sh82gV3N1EMq3SDp3ymGMX4A4Aubq4xJkKjW74l/Et1wnwvmIMcYqCZ4NBcbV1eDAx NtEcRuzXoPqovARBeyAFPGv0B6sXriiMLMLOtZ9xpJ9e2KiIvS3pEO2SIMwPNmOiKs3o QczZYsTah3fzme0QyfMguR9Hzmce5ODHBczC43PfWyB6RfJnnTIRxRl4SXBJPQEUjVzR z9L0ijqPwvMVHRmxQdlwbJiG4osx7BOoLLVyXWWuhySRxcrNR3sJJRiKl1HX9tkKJQ33 8mWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HoSR/w39"; 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 b1si4547452edy.451.2020.11.02.02.25.59 for ; Mon, 02 Nov 2020 02:25:59 -0800 (PST) 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="HoSR/w39"; 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 S1728339AbgKBKZ6 (ORCPT ); Mon, 2 Nov 2020 05:25:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbgKBKZ6 (ORCPT ); Mon, 2 Nov 2020 05:25:58 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C7FBC0617A6 for ; Mon, 2 Nov 2020 02:25:58 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id 205so1197379wma.4 for ; Mon, 02 Nov 2020 02:25:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3H4ECss9j64M9/DgBBB+UTVHgBY3NUG4+bvVfh0cN/I=; b=HoSR/w39rJuiecht1ygijSGfa4XlnF9cC/ivdmb3z2ZeTQXJLEcTWfGC51PSRt9Xe1 dHNqYxrx/izLdx0fqrocT7tVsOgQPde6tZDAawtHde515wDMgwBgYLZ7zEIHkev7YR/7 6ld8RCHsqws5z/i4GXDRRtAl75RNu+Ro83U2Z9XccSZs8lVNj1khP+Qv+mxmPfGJlJ7d waTi4k8APAMKyJ3LSMJeuMM1G/nRHxKw884PmImuVXfML/1ylfBPcVr3iLhD6IyX2tJ0 rhs3/6kXiMZ8h2H7AUgu6+8KzLIJ4xsi4ONYRRhHXKpsEmshz/APuVViXFgqOlVXGu0d O46g== 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:mime-version :content-transfer-encoding; bh=3H4ECss9j64M9/DgBBB+UTVHgBY3NUG4+bvVfh0cN/I=; b=nn7o5E3WPWx3vpoUcU4Iv1p6ZbHDnotNFRtleGulRdEnVet8g7gUpn8Gx0MM2k0Hp4 Ge8IwwBUK6SQJeK4rmfaVRrEeylhzNgVxnTU/2fieunfLjm8XAOxmclvI+4OZOc8sy72 VQl4MYCOo7mg8farbp7cW/XLmPslUMr/4asJlZ1r66Ig7FA5CBSC99vJ3z6MexwClANI cw6WQkhKSayRhm+ZCza8qzKuVQr4uF5ir82YHDy1bZ1J/RwA2caYaXd0AVXyyGsU6Npq CPn/RZUVcqBfQbePjv3hrlQL9hcCFxrdLaHIyttdDvcOiytvQb/KgBM1cWYuJz0CvylW k0ag== X-Gm-Message-State: AOAM532yZgL59r9O89k8y8171hzxDohLtTu6QIN99DeSaWQwdOYNnFMq 6UA1dDT5rKOim/HZcy8DP/HDeg== X-Received: by 2002:a1c:b70b:: with SMTP id h11mr13256458wmf.185.1604312756936; Mon, 02 Nov 2020 02:25:56 -0800 (PST) Received: from dell.default ([91.110.221.242]) by smtp.gmail.com with ESMTPSA id o7sm21766730wrp.23.2020.11.02.02.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 02:25:56 -0800 (PST) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, Lee Jones , support@areca.com.tw Subject: [PATCH 1/3] scsi: arcmsr: arcmsr_hba: Stop __builtin_strncpy complaining about a lack of space for NUL Date: Mon, 2 Nov 2020 10:25:42 +0000 Message-Id: <20201102102544.1018706-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org inqdata is not NUL terminated. Fixes the following W=1 kernel build warning(s): In file included from include/linux/bitmap.h:9, from include/linux/nodemask.h:95, from include/linux/mmzone.h:17, from include/linux/gfp.h:6, from include/linux/umh.h:4, from include/linux/kmod.h:9, from include/linux/module.h:16, from drivers/scsi/arcmsr/arcmsr_hba.c:47: In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3055:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3053:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3051:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Cc: support@areca.com.tw Signed-off-by: Lee Jones --- drivers/scsi/arcmsr/arcmsr_hba.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 127fe50e6b120..f241ae15496a2 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -3201,11 +3201,11 @@ static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb, /* ISO, ECMA, & ANSI versions */ inqdata[4] = 31; /* length of additional data */ - strncpy(&inqdata[8], "Areca ", 8); + memcpy(&inqdata[8], "Areca ", 8); /* Vendor Identification */ - strncpy(&inqdata[16], "RAID controller ", 16); + memcpy(&inqdata[16], "RAID controller ", 16); /* Product Identification */ - strncpy(&inqdata[32], "R001", 4); /* Product Revision */ + memcpy(&inqdata[32], "R001", 4); /* Product Revision */ sg = scsi_sglist(cmd); buffer = kmap_atomic(sg_page(sg)) + sg->offset; From patchwork Mon Nov 2 10:25:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 315411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81B0FC00A89 for ; Mon, 2 Nov 2020 10:26:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 271EF2231B for ; Mon, 2 Nov 2020 10:26:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ltwTwnox" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728387AbgKBKZ7 (ORCPT ); Mon, 2 Nov 2020 05:25:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbgKBKZ7 (ORCPT ); Mon, 2 Nov 2020 05:25:59 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6479CC0617A6 for ; Mon, 2 Nov 2020 02:25:59 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id x7so13935302wrl.3 for ; Mon, 02 Nov 2020 02:25:59 -0800 (PST) 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=ZYQcgr+JUloSfLnkLvWfee7pGDY8gdNHXe6cOnUHb6s=; b=ltwTwnoxJBMV83W52Xk1mxeiyhHXpROzlSsJV8F/Xv4iknM3OjN+8ZDEwFjyg1hZYP Awp1iF6GnLQ9HPn+NEe5GnljG3Lzi/uFIp5ZWUoijEBvfIdCZ4AySrOR78rsYGGYk8ag uh11Aw2YHc0lx/9W8m+VJ7biVY/Jm3uobvIX1u/KXrenL3WiQIy/2zOayOZSx4uhZ7UI VH2EDAdi0pn9gsy17Bt7M+cNtb3FYAJgc5KpPQgOH131xBtNu/lFpVMrWtt3B+iL97Y4 9wRZ/gu1JiHJ5jSULfEO+lMxZUGHLBaQ0en4OtBvviEwPteZfdeJxuAEKWmcocwVNWMv Y3ag== 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=ZYQcgr+JUloSfLnkLvWfee7pGDY8gdNHXe6cOnUHb6s=; b=JDKD6mUlho/KFKAwouu/GPsUA9XVzLtESulALMesfA3Upm9YjFOcHi+jZwQHV44fmQ XfeiG1U0nOjrCHR0bU+2iwQHrucfys/gG18+/7uWnXEuIyLZyNRVBh9njMlZPSBzUAD3 /vR3xxBOYwkjlBNFkB6UymFg6LcnqFPYFFm1CDheFf3DRAW2TUWs+DvQoL+tkpaR8TEo GFiX72BSoJdeU/NuR/e9UiaElFEe8dDnpj0/ZTl+KrKUXDgZhIMt36eNYBL2QEN8yvlx hgkgXBOuLzngy7GFGyCm20uARh0YHGfib9VpmFh39AYp7efYaHbfYabn5a4gFbGa3oWX kHLQ== X-Gm-Message-State: AOAM531yoQ3DXc36r1+dyacz7TsgZ7nGLiMNB3r1EJ78QFNkeqkjDHbt dMnUQRO7MIrA7Txb3OXvWBDCgA== X-Google-Smtp-Source: ABdhPJyyqXM9lXCTlshysJusVXnuPANkqdMk75AUdCjGYpnMP7GIs/wllcZu2K+rk6reSQqAgZTGBw== X-Received: by 2002:a5d:4747:: with SMTP id o7mr20063411wrs.423.1604312758178; Mon, 02 Nov 2020 02:25:58 -0800 (PST) Received: from dell.default ([91.110.221.242]) by smtp.gmail.com with ESMTPSA id o7sm21766730wrp.23.2020.11.02.02.25.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 02:25:57 -0800 (PST) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, Lee Jones , Jack Wang Subject: [PATCH 2/3] scsi: pm8001: pm8001_sas: Fix strncpy() warning when space is not left for NUL Date: Mon, 2 Nov 2020 10:25:43 +0000 Message-Id: <20201102102544.1018706-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201102102544.1018706-1-lee.jones@linaro.org> References: <20201102102544.1018706-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This string is not NUL terminated. Fixes the following W=1 kernel build warning(s): from drivers/scsi/pm8001/pm8001_sas.c:41: In function ‘strncpy’, inlined from ‘pm8001_issue_ssp_tmf’ at drivers/scsi/pm8001/pm8001_sas.c:919:2: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 8 equals destination size [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Cc: Jack Wang Signed-off-by: Lee Jones Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 9889bab7d31c1..5edfba3c622b4 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c @@ -916,7 +916,7 @@ static int pm8001_issue_ssp_tmf(struct domain_device *dev, if (!(dev->tproto & SAS_PROTOCOL_SSP)) return TMF_RESP_FUNC_ESUPP; - strncpy((u8 *)&ssp_task.LUN, lun, 8); + memcpy((u8 *)&ssp_task.LUN, lun, 8); return pm8001_exec_internal_tmf_task(dev, &ssp_task, sizeof(ssp_task), tmf); } From patchwork Mon Nov 2 10:25:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 320198 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp3607288ilc; Mon, 2 Nov 2020 02:26:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhJ6uY9upjFDshH7GQIONzSM3AB8qc5yO6lbvin2gD9mXuqV8L3VwhAKfZSQjqW2tKdZji X-Received: by 2002:a05:6402:78b:: with SMTP id d11mr16252738edy.82.1604312761587; Mon, 02 Nov 2020 02:26:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604312761; cv=none; d=google.com; s=arc-20160816; b=aOh4MunnLxOWXDiavu/i19D1DKbD1QAYwGyUjp67qHWZbNiC36loVLcpy2reTs6lWs iyuG4ER+reVzynTsj6tjF/SrMucEgn9CIo+oyu4mOqvtUYMNBpvwJM+wk/M0rRO3I1gI ZmqjZddG8L0+mNStkaWSTNhbWRX/aw7CW6uSN9LFf4D1jS4ezwphe3WHI7vHujdaDrbS fNA6jVUv5mCN8CvPoB46R301cMnhJQqOr7uAcMmsSiZK4NWS6ngqyGpFjfwYYoPUeN1x L04DBlzGZmwzI2tOhlYbFXFqWvLyDrzlrg0Ll93iDt/YAyG2uR5LRIo2hEIrTtmEbgmF l9OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ueUgeIECYj+r+SrAYxUIGegHG7aG2+pUTnoP0l5Uui0=; b=UqEn/Fj0evUnosDBDmFJwRxKxkbUm122YHCwHFoW/z4BOOxJwB+14nix0jDXjTamfS x3QYmIa6vSE3V6D7Wb5V6d4lzQ13dI0FdnD57YSAtySSfbeCV0zFd7CIyrtVqTn8ckHa v8qMAIBLKZtwe5D8E8/+txKSBQvUEmOM0tb8CbALmtLVYyDajqIzEk4K09eNPhHaab8E gy9KfloTdsuP29HFThws6wsn/OSsNr1VJcpiqfHVRFfeiBYh1hzkd5mCrVSNUmwwpA3Y CTKqoWB4t7OoMp/MEYuv+gWaH68Q8ki5Z9P0+2sBc3bP76/xswH7kkdzuGBzbZZeRsk8 jlUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kg+HZKga; 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 b1si4547452edy.451.2020.11.02.02.26.01 for ; Mon, 02 Nov 2020 02:26:01 -0800 (PST) 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=kg+HZKga; 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 S1728414AbgKBK0B (ORCPT ); Mon, 2 Nov 2020 05:26:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbgKBK0A (ORCPT ); Mon, 2 Nov 2020 05:26:00 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FCC8C0617A6 for ; Mon, 2 Nov 2020 02:26:00 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id 205so1197500wma.4 for ; Mon, 02 Nov 2020 02:26:00 -0800 (PST) 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=ueUgeIECYj+r+SrAYxUIGegHG7aG2+pUTnoP0l5Uui0=; b=kg+HZKgasnP2CQ9wyoqXWK99NoN8ZHnOlf1H8R72CMJYmv7ggM+eQjW4w2I1OK80sR vPZhqqSxMNZ2rS1p+jputs0nYEw/zjfKpQ+/gDa7qg8zVX0xX9WqGPa/esT0pdAS8Hwf delut8CxhT7aU64PDz9BjlqxDNDewvjzotU0RblOg1eZnSuxH847sAhxxYYNKX9LMhLS ozdQ1GXQ/LhY1W9Z7frmFJEU4ad+BjEeLv0/l6hhnLFIUD79+FM0gZFIv3hxqxWQvJ00 xA95/Wf9h4EyD1bj0KamlkcrRUHJ3VI00pFuqp8+ry5EeESn9SJP8XvJOCG3N6rHEuGp zX0A== 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=ueUgeIECYj+r+SrAYxUIGegHG7aG2+pUTnoP0l5Uui0=; b=awna0iTCtNMmaTBMpBcED/eoTqhlFUK3al35kGdJaqqrOyE7d4xzWoF4mcnb47oLIj 6k7pd9uan9oq+0ZBUVhbBjC2xL49Rhvo+sfy+PbNPdrWoXva/NkXMQOSxgyqY/sZo7BT TiJE20CwkPvdmU1SfkcRgm67vXa28pit0TBHXxDJ2yJzQu+JktALPmp5iG3qP0Pc4ugE H+YLhddXqzzv+K76UH88VeX/NL50ThYlle+G0B7oaicbXX15L4YIIv8YnqHJnjJ89Lrj 1EbfTV0AVIFwyGpsoVxF0mZP2YWre5djm4zSuz9W/QN4F5nycZZfrpuk36rrcPNYcS8b iAIw== X-Gm-Message-State: AOAM531CgeBIHpibqyyuLDDmAHdTMQox8LcCXkPZN6+1biE65CEEvjNy st2dx+mbTCj58p4/jMe/gTm22w== X-Received: by 2002:a7b:c3d2:: with SMTP id t18mr17654509wmj.112.1604312759279; Mon, 02 Nov 2020 02:25:59 -0800 (PST) Received: from dell.default ([91.110.221.242]) by smtp.gmail.com with ESMTPSA id o7sm21766730wrp.23.2020.11.02.02.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 02:25:58 -0800 (PST) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, Lee Jones , Jack Wang Subject: [PATCH 3/3] scsi: pm8001: pm8001_hwi: Remove unused variable 'value' Date: Mon, 2 Nov 2020 10:25:44 +0000 Message-Id: <20201102102544.1018706-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201102102544.1018706-1-lee.jones@linaro.org> References: <20201102102544.1018706-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Hasn't been used since 2009. Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_hwi.c: In function ‘mpi_set_phys_g3_with_ssc’: drivers/scsi/pm8001/pm8001_hwi.c:415:6: warning: variable ‘value’ set but not used [-Wunused-but-set-variable] Cc: Jack Wang Signed-off-by: Lee Jones --- drivers/scsi/pm8001/pm8001_hwi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.25.1 diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 2b7b2954ec31a..cb6959afca7fa 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -416,7 +416,7 @@ int pm8001_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue) static void mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, u32 SSCbit) { - u32 value, offset, i; + u32 offset, i; unsigned long flags; #define SAS2_SETTINGS_LOCAL_PHY_0_3_SHIFT_ADDR 0x00030000 @@ -467,7 +467,6 @@ static void mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, so that the written value will be 0x8090c016. This will ensure only down-spreading SSC is enabled on the SPC. *************************************************************/ - value = pm8001_cr32(pm8001_ha, 2, 0xd8); pm8001_cw32(pm8001_ha, 2, 0xd8, 0x8000C016); /*set the shifted destination address to 0x0 to avoid error operation */