Message ID | Y7asVSr5ERGCZedk@kili |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp242726wrt; Thu, 5 Jan 2023 03:05:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXuDPF2Z5z6QZPilaEYS1F+biuNP1PXG15FXYUNb6wwxpp3k3YPTNbecC4whFOILXKzNj6he X-Received: by 2002:a17:907:d38c:b0:83c:1a1e:1efe with SMTP id vh12-20020a170907d38c00b0083c1a1e1efemr42383354ejc.6.1672916741188; Thu, 05 Jan 2023 03:05:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672916741; cv=none; d=google.com; s=arc-20160816; b=x74wOTIOZlej0QSqRGrCmOUDasWIF3Zoykxt6RypH0c6VRv08rnLtEJmWtLARka2TE mmurHJvmpSxQNIqQUcgRo9XV+6AHKsilfCJ7NLWZBdZNAhg/Z9WbnXrff/OIR54uTSC6 3scYC415VR3Lf/yhupaSLTNZShKQ1JbRGlQA/YV3o/vt4W24FzfejjXdG7oANf3KGygQ 3PmxiAq+MdIMY9V3qKyoKkK0eZN5Y7Z8pqg4uhRsazIBUo00WjqwPAyCe+7Ydue0Qogr mL1zG9qg8oku49Ykhg+l77ECLoOOAEHjwHDguzcAgGGICFu5z59Qjq2zdtpOLdNERKWd Wbdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=jv0GR470MWgiD3mfl5X1bKpTXHWvkolc5a9wY9HKdXc=; b=A30lfKDHSItrDH9Xa1XNzqC8hLfl26nJ410XuS7vY2se8XnXYxeH5QJiCnuKr/7hWt SOeJcMbfvDAqpyT4kfTeBfv3ZJ7rtxBXMnVmLLHg4eGxeE8JUxQSYlyAtK6ow/sqgRNJ ETwdL3u4KyNvDYPKaMna8rNmQMpCOepXCuHgQCUf1rJo6LidSnMF39rZLJo864L62T05 tTxPr4dEe3VTQQooP8bQgtm0Fx834Onp5hhzFeyocd0lLgvm+KxGxuArv2pFJ3EgMqTP r0bfW5XSAbFfS7Datai5KNtvpbE71QDmSWIIp+LA5ad4Npqgn94GlYiOl7tEcGSDLfuh vVzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="bIxbw96/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ww3-20020a170907084300b0084cbf5552aesi13509649ejb.964.2023.01.05.03.05.17; Thu, 05 Jan 2023 03:05:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="bIxbw96/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232512AbjAEKyq (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Thu, 5 Jan 2023 05:54:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232432AbjAEKy1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 5 Jan 2023 05:54:27 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29E7244C65; Thu, 5 Jan 2023 02:54:26 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id r2so892290wrv.7; Thu, 05 Jan 2023 02:54:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jv0GR470MWgiD3mfl5X1bKpTXHWvkolc5a9wY9HKdXc=; b=bIxbw96/A1sJN+bIpREHnJIorPMs8VvgHbuaNT/hFwUWdCsSGgO8RUcTOkpWRtjI9G oWHtiPdZYnoOqiyPy2gs6x38EfPE0ZEo+yn2INV9GU8AJbk7fugW0U8Sia7uxg+wN4+H a5eUzKEfEG3dZ1Q32U+0AWjIPEphHI4YaUjhfnNM0upYEUH44QiMGnndQpYXrjqhPwGY qfL7+0DWsb1KcZM2gE2eCYCn6jJuS1AsjwGxNRc0ryBZspPVxA8hKZLVaYC3H0tWgvLc tZnoGMWMiL/Dp4syYkFWEwDuWi5/YSC4i4EyGTOxc9v5+bDiSIr+dadoGN2/5PtgDq27 0YyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jv0GR470MWgiD3mfl5X1bKpTXHWvkolc5a9wY9HKdXc=; b=HpLd+vqsLBnxTMl9MWIkzSgRi+MhdPG84vM3WRO7SnOhbnk+zglVWyv2OkhGvVMlHZ SAWzvyUbxSraxVS9wPUFBQclW+WHrtFfHZBsCminLYSp7rwtleKDmmZGTi/CXzDl9oYC vD5yobowDtiHXqjcM8SGvcN8l9m9pMOQi+gT/KHGf4WsASrvb5ISa019Hdxpa+svpReA t8tmagSp8qf116CMTTuJ1aSDs36ynv3aoVsKC+mCBsCXWKdpsMp006VWW9pgbc/u+ri1 li9wr5bjlhAvbeEMJBXlgwVuxI5cpW2wsKGQ8+CgDhtdlAjeYM4urEcmRJG4P2QPeCsi z2rQ== X-Gm-Message-State: AFqh2kpiviGWiljAHxlNGQeV7fUSuVZyRrj48LC6HTLtl2KnYriIezYp +U3PQR6FsdJRV6chlD+uLBI= X-Received: by 2002:adf:fe09:0:b0:242:149c:6d29 with SMTP id n9-20020adffe09000000b00242149c6d29mr28395857wrr.16.1672916064665; Thu, 05 Jan 2023 02:54:24 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id bt18-20020a056000081200b002368f6b56desm4557610wrb.18.2023.01.05.02.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 02:54:24 -0800 (PST) Date: Thu, 5 Jan 2023 13:54:13 +0300 From: Dan Carpenter <error27@gmail.com> To: Souradeep Chowdhury <quic_schowdhu@quicinc.com> Cc: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] soc: qcom: dcc: Delete some bogus dead code Message-ID: <Y7asVSr5ERGCZedk@kili> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <Y7asNqoIapctHmbI@kili> X-Mailer: git-send-email haha only kidding X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754180345066946964?= X-GMAIL-MSGID: =?utf-8?q?1754180345066946964?= |
Series |
[1/2] soc: qcom: dcc: Signedness bug in config_reset_write()
|
|
Commit Message
Dan Carpenter
Jan. 5, 2023, 10:54 a.m. UTC
It feels very wrong to assign "cfg.sram_offset" to be out of bounds.
Fortunately, this is just dead code and can be deleted.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
drivers/soc/qcom/dcc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/dcc.c b/drivers/soc/qcom/dcc.c index 1e2cbefc1655..681d55018e66 100644 --- a/drivers/soc/qcom/dcc.c +++ b/drivers/soc/qcom/dcc.c @@ -483,10 +483,8 @@ static int dcc_emit_config(struct dcc_drvdata *drvdata, unsigned int curr_list) /* Update ram_cfg and check if the data will overstep */ drvdata->ram_cfg = (cfg.sram_offset + total_len) / 4; - if (cfg.sram_offset + total_len > drvdata->ram_size) { - cfg.sram_offset += total_len; + if (cfg.sram_offset + total_len > drvdata->ram_size) goto overstep; - } drvdata->ram_start = cfg.sram_offset / 4; return 0;