Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1722851lqg; Mon, 4 Mar 2024 01:30:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXvV+RtQcGBzI+Ul5NMPO/Bb2VlvpTnCkqfswFnoWEw2LUOeD5VgYVwdG5j/iGfY9fAKtVxoPvVmdAsPdAdx19YiGip9TZtaUwF4m3McA== X-Google-Smtp-Source: AGHT+IHGYD4g+oo7hyUihaeKLtxEMMfPe6HMWnbecPG7CP/RCCn1/O/AZQgB5ORjGcObstnNTwhh X-Received: by 2002:a17:90a:9744:b0:29b:6a7:c4cd with SMTP id i4-20020a17090a974400b0029b06a7c4cdmr6769943pjw.1.1709544621906; Mon, 04 Mar 2024 01:30:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709544621; cv=pass; d=google.com; s=arc-20160816; b=CCtvt3GDBiS+NhsjSUP91k7Xr8WLkFC36df6ShPgXokACPgWF+twVB9bMYRUkZ2Xfz URr+dNsKzb68r+iBsBZ2bPJG65+zjGNOZG5may9bfw2GJJ31yCjCHQKPt7JQzwWApTVf 3j75sdPOpftO78OO+0cC/Jf+2gdzTyfTS+lrvtZoSXNLO0V0+6B0cq71tBXYkmtliIHR JHduB0pl+ifSQe5LuwCKTdy/7gOiDIJd4xNx9laAp5k/OFy6Kk9ggvEfKEW6N0foCVxg cXY1PXNf9QwB5uvRI9WPOOWKNRHuJ5BjivhFHdZbJHjWVVlFn6bx1QiLZi0tfPR5L4k6 KIqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=dyaLrzqqfuTqaQuG4wxFq1SENRgNWTSBuhD44aBTw/c=; fh=mgu2UUIHIkg7dc8iiZs4HLlrYWRc85D2H2NqVTPgMZY=; b=WHY75nRYQteBTmXbDWeW9R+ivL1ahQE01bf4jgLg5RscrXgOuRbx5lz55ZxjYxdbzh 05inP+IbvN0HrEHmF5oP7kVnAYf+E7Aeo14JSOT1qIRhgtTtboj/RX1BpNg860T+labp grNm2gyPe7fBijMiJiHdlklEFvePI539jz0LgoHRGtC7JFtaXGlc9UGMpqWK9bEem/Jo /pyBX7bwao7KGLYFfEBusVVTSg8M2O3DpQuUs8FA9HyqOT5qN5L75Skdz9EZRDUm4NRT YhJCFynREoKwf7C5ITQnwocYwk3ANWJNPyobcrPx5+1H0KCrvUNiQ5mTK89qwl7N5TAh olkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-90325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90325-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s35-20020a17090a69a600b0029b0c6552a2si7999279pjj.62.2024.03.04.01.30.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:30:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-90325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90325-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 11C5D283173 for ; Mon, 4 Mar 2024 09:29:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACAF038DF5; Mon, 4 Mar 2024 09:26:32 +0000 (UTC) Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36FE9381DF for ; Mon, 4 Mar 2024 09:26:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.204.34.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709544392; cv=none; b=VEVGEVkinmGVC25B3424yNbAumbqqxmilZkc4pBJsQScZKYmXYNO0SGXQdt7ww7IR+URdsqlBIzv43ZnXlmm6DHloWsDnmBBLYTDHo7mfGGapjqt9arWrg97RrF5qCv0py8EWkthzdsDobKsI31NjBKBejTarABYDoSnCfRD1Qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709544392; c=relaxed/simple; bh=rA9xcrP1qRp2vmLyo1/NoCl09tOZioaFK+zMV5UQ+a0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Aq0A0T4YcNGEKnq0SC4EGZ24HW14zMrntVZs8OITP42lN/H/abIXuyQvNyLncEyXV+DPqA8/ZgtNqnskcDM19RFrhWztzXM2Jdh7PhcNHcJ/+PQJiCIBPaECLSeQHGbXAG88Ce6Dy/gouaCOC6o6cyZTsnw/65Bbtg4dRb6GY0c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=54.204.34.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtp77t1709544338tbvh7m0l X-QQ-Originating-IP: /8qetr6ORn/X+N+f2KO84Qws+LjhcD+YICaQ7LCYY1w= Received: from localhost ( [112.22.30.30]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 04 Mar 2024 17:25:37 +0800 (CST) X-QQ-SSF: 01400000000000505000000A0000000 X-QQ-FEAT: qPPBrXN7Wh+uu+Oshg+pJH+InOcUFIlvm2eJlW3zNBPIzyTLwKQAunGD3FCwb zwyMY7CdMV2tZ54TuJOawKbq57h5TE6z3bq9+dKiI2AsgkqwjjDfTVg5lIaoVkDLYq9zDYr B+NC4YSSdaexh+v2RbdouhF0KG8MQkHwfvAV9dKQd2ZpKw6mCjxCjr+vxi4lVnO4DffIhy7 Bp8bES/XvFY32VFOiR49STQmxEgSBPeNzmBJpHKaqsWPOBFUfSoc6ImedCXlvonCQvw/XkC ToAlhHse/0shw2Jkgra+fw3FaQQJiDxuxXp4XT6UWxSGLDZ60zcvXXmre+31R0+pdOe9C28 zxShzXKHft+hSESzzPFzcWabdAqyOZNshksj13TcTCY2nogMtqgP9uLM22wzb+VL3jwi//t nBkaCl93UStK79lsqDOIhQ== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 14106722739390484581 From: Dawei Li To: conor.dooley@microchip.com, daire.mcnamara@microchip.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Dawei Li , kernel test robot Subject: [PATCH] firmware: microchip: Fix over-requested allocation size Date: Mon, 4 Mar 2024 17:25:32 +0800 Message-Id: <20240304092532.125751-1-dawei.li@shingroup.cn> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 cocci warnings: (new ones prefixed by >>) >> drivers/firmware/microchip/mpfs-auto-update.c:387:72-78: ERROR: application of sizeof to pointer drivers/firmware/microchip/mpfs-auto-update.c:170:72-78: ERROR: application of sizeof to pointer response_msg is a pointer to u32, so the size of element it points to is supposed to be a multiple of sizeof(u32), rather than sizeof(u32 *). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403040516.CYxoWTXw-lkp@intel.com/ Signed-off-by: Dawei Li --- drivers/firmware/microchip/mpfs-auto-update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/microchip/mpfs-auto-update.c b/drivers/firmware/microchip/mpfs-auto-update.c index 682e417be5a3..7ea3cdb917bc 100644 --- a/drivers/firmware/microchip/mpfs-auto-update.c +++ b/drivers/firmware/microchip/mpfs-auto-update.c @@ -384,7 +384,7 @@ static int mpfs_auto_update_available(struct mpfs_auto_update_priv *priv) u32 *response_msg; int ret; - response_msg = devm_kzalloc(priv->dev, AUTO_UPDATE_FEATURE_RESP_SIZE * sizeof(response_msg), + response_msg = devm_kzalloc(priv->dev, AUTO_UPDATE_FEATURE_RESP_SIZE * sizeof(u32), GFP_KERNEL); if (!response_msg) return -ENOMEM; -- 2.27.0