Message ID | 20210322160253.4032422-10-arnd@kernel.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:906:5290:0:0:0:0 with SMTP id c16csp1348297ejm; Mon, 22 Mar 2021 09:05:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+wuRkXgk6iOVDYcHacZ7u5cAo7tzTUxMmL+iEBGeGeLyWZkB3VJftw3yEr8ilJimVFOA8 X-Received: by 2002:a17:90a:498d:: with SMTP id d13mr86381pjh.47.1616429120485; Mon, 22 Mar 2021 09:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616429120; cv=none; d=google.com; s=arc-20160816; b=oEldlYoS8eNjgsd7RQdD9JfcwqMMDYrlx66MI4nNe9SPfKqOH7GO7bOydD45Ye0lga GBJU1T22ZRnc7Bo4y0xQNeg3p3x+mDzvZ+jKjaKEEYgJ0rxaXysOAnMOiSj7kaCrptw5 rbg1vplcFM/wl5o2ETEyzU2Xe5bQgUUXsycwuev90BF+aOpv5HVFY10+Gkr5IFCieQ00 8otCmyaGqWUuQLGnyqA55ukS29UUfAhMmrKn4LCT6tVi02IHdTuu03cfVsk97QIlYcdL Mk+nx8zkyNTjHQ4+5CH3tL7aEUaP87l/yIlSGHKuKjwh+6juUSKCodY/uXdcwERsTgG8 jIUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=lVaBl3rZkdopO3vct4+hDOQmILxH7e6aV4WCoEQ8K7M=; b=XEgtkae7a8I41GRewxAeoCIYYbDN0dAU1T3cvxc5CmA3vuAwqRywLQXorlQHqNw6Ip Hs4qR0YwM01lq+yFwm8lkO1ojf9/OrLl71iot5aiC7cM6Y7p2ay0SLaVb8dUHYaINgaB kzQOOTd/IXMqGt09SUmDlFvjWV0B0U/5moq6y5JXwMr6ivioS/kifiR8dpFq4/pQzi+M feOO92YO+Yp1GV7JNWI+E/ZD1UpIHhmwEIevVx73b8zWdwWifZ99pszFwyUZGmZsggPU t5TkcgXb7EqJKipptM0UieI7i6koYbexZ3SjNKKhE8kAxJ42qHNuf4mH+6e/cHNx4zoc z29A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=odvbczUM; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id y15si15709747pll.388.2021.03.22.09.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 09:05:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=odvbczUM; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 68DFF6E505; Mon, 22 Mar 2021 16:05:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id ABA246E505; Mon, 22 Mar 2021 16:05:18 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 72908619A9; Mon, 22 Mar 2021 16:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616429118; bh=EPe3bIidXGt1QSXUt8K/T9qB09rG8+BNJJvNG8YjWag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=odvbczUMlcMOL6OYbdCtO6qt6RZm272nfTphlFLY6klU5CkTn017tx34pnASZGNCF IpTcV7nYkdiHmdTO4YSIbtaihkUG1yjP/yyOdl4AEWNcNqBp3RlBD18ZnYm597BmUn wbL0s1j6ZDhyXNOvtPSEo+IomEmxiiG2PhvFgAApDhn6IwYxk6QphMYP+c26QRueLZ RufWjyGVlIhAtQ1wf9LhLwHYQjNNIjPOnznUa3dYOSsg79XhSsMNd+utp3nEch/2kA G7BxSH7No+IViGt23UWj5mYSj83XwgoEag8qXDcmE/UvDP4IP5Eh1a52oCa4LWy515 1pAfWyFQAG1Kg== From: Arnd Bergmann <arnd@kernel.org> To: linux-kernel@vger.kernel.org, Martin Sebor <msebor@gcc.gnu.org>, James Smart <james.smart@broadcom.com>, Dick Kennedy <dick.kennedy@broadcom.com>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com> Subject: [PATCH 09/11] scsi: lpfc: fix gcc -Wstringop-overread warning Date: Mon, 22 Mar 2021 17:02:47 +0100 Message-Id: <20210322160253.4032422-10-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322160253.4032422-1-arnd@kernel.org> References: <20210322160253.4032422-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Anders Larsen <al@alarsen.net>, dri-devel@lists.freedesktop.org, Lee Jones <lee.jones@linaro.org>, linux-scsi@vger.kernel.org, x86@kernel.org, tboot-devel@lists.sourceforge.net, Kalle Valo <kvalo@codeaurora.org>, ath11k@lists.infradead.org, Ye Bin <yebin10@huawei.com>, Serge Hallyn <serge@hallyn.com>, Arnd Bergmann <arnd@arndb.de>, intel-gfx@lists.freedesktop.org, Ning Sun <ning.sun@intel.com>, Hannes Reinecke <hare@suse.de>, Colin Ian King <colin.king@canonical.com>, cgroups@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-security-module@vger.kernel.org, Tejun Heo <tj@kernel.org>, Simon Kelley <simon@thekelleys.org.uk> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
treewide: address gcc-11 -Wstringop-overread warnings
|
expand
|
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index bdd9a29f4201..f6d886f9dfb3 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -512,11 +512,9 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr, "6314 Catching potential buffer " "overflow > PAGE_SIZE = %lu bytes\n", PAGE_SIZE); - strlcpy(buf + PAGE_SIZE - 1 - - strnlen(LPFC_NVME_INFO_MORE_STR, PAGE_SIZE - 1), + strlcpy(buf + PAGE_SIZE - 1 - sizeof(LPFC_NVME_INFO_MORE_STR), LPFC_NVME_INFO_MORE_STR, - strnlen(LPFC_NVME_INFO_MORE_STR, PAGE_SIZE - 1) - + 1); + sizeof(LPFC_NVME_INFO_MORE_STR) + 1); } return len;