From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 7326DC4708F for ; Wed, 2 Jun 2021 14:53:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D49A613B4 for ; Wed, 2 Jun 2021 14:53:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D49A613B4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ExyQzWdHUkQJqU78xtL9L52wUTRYlH26PDGrFcUdTVE=; b=UWXYkKmBI0brsc hO3U5RodKA8eAVHPJ33+GgvZ6Oku/7Dd4bqazYN9mcObXUr/DwYQFL5W51/tSdJo5Zx7OpkrbbvUu OIyGSzyAVAPahxg/5kTNtpGx9KvEvd6bsadKIxPpJnTAbVgq4sSm2vZcC/gGBEh3Dv52U7dNGiYCt Y8vccOKbRBQEmsJtWyXhpHETe32ZQc1kbGkNcXRBdsxwgkm8Yqa8rZColGAGP18+VmOHB/Gn7UNh1 Y3YmOWdjMK2KRovv7+Tw3WLMMc+Fc472zVGDBKQ+NLWIjR8HDigduusyce8r+W5X89dV++aqw0RF8 4G72uRiX2lOEJKX8nhCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loSDI-004h15-Md; Wed, 02 Jun 2021 14:51:20 +0000 Received: from mail-pf1-f171.google.com ([209.85.210.171]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1loSDC-004gvw-Gh for linux-arm-kernel@lists.infradead.org; Wed, 02 Jun 2021 14:51:18 +0000 Received: by mail-pf1-f171.google.com with SMTP id g6so2389672pfq.1 for ; Wed, 02 Jun 2021 07:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=i9rBUFdn0o45VyNYIoUSPAP6TWQNEYGbweMgl8R3j2k=; b=ewELyXn1oVOkpjmFF9isG0jWeHDotlUmFjk677kzmx9NkvN6CJODmk4ABhKGE7SShm BmAkoAF5sNQCdyCX2QtuQqzBJhtO/wNKe13dCXLpIEG8QSMgIVMRofZO3APfD/HBwkpx jVboz7cyuf/sGTDv5pP8T6awFTi2Xv/udo8MkgGZ1LstSJ4b+tL3awBU5A7pqkMK/o/C HTrPZWpf+5ivS1nBpJZJurCwSoi9bY+9wfMNZLj2ysaIfdETm63bmkQuGLntKR6XGNNK xPFzjbRqxGCroRFZnCauLtKIdBUma0hvO0afqBTpGidL9vVfsQQaStyQS2tcWyjAJC5v mgiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=i9rBUFdn0o45VyNYIoUSPAP6TWQNEYGbweMgl8R3j2k=; b=dh3nJK5RwgwdnFJsKIkG8adkJGxlMmciz9kwBYbje59oGmzg4HPNMKAkIOadRjlDLv UoVurBWiEBLDd52xhfe1OTEv0cTFE/HBtVB+8Mdnkqo/4IOXXdqDDyQdZIc0tBSky220 ChV5CGigIphN9oNeq96mA/sKHm9HUafZViTD6DbprvIWH7XOl4Hj2pzMqFisg9Dv794Y 0YO4ECAC96O6SZFalfHtT0y6P3r7EIi1oQv2TfykduFrRNa0bWxhSgKTfYmfBd6PgE98 8J8FuO2NWb+cfucC87jZJKnbxQFDeNAThAFnCzhqLw/ngB0TvLAq/0zJ7wTEvVWs3aTJ fAuw== X-Gm-Message-State: AOAM533qsY+wRlnC8LCHNmcfH7dtMbBI2Kv556VzjtfYFComzRoCvpNC hzWyPrUzpB8A9rk9HDpKeHY= X-Google-Smtp-Source: ABdhPJyQjfmM+BCH1t7EJtFi0BLeF+t4bpsdWs2mSRcIjnc/D7jebkn4YHLTIVMp4REy5jZbC2o+EA== X-Received: by 2002:a05:6a00:16cd:b029:2d0:d876:4707 with SMTP id l13-20020a056a0016cdb02902d0d8764707mr28187601pfc.64.1622645413401; Wed, 02 Jun 2021 07:50:13 -0700 (PDT) Received: from ojas ([122.177.142.129]) by smtp.gmail.com with ESMTPSA id u8sm65892pgg.51.2021.06.02.07.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 07:50:13 -0700 (PDT) Date: Wed, 2 Jun 2021 20:20:00 +0530 From: Ojaswin Mujoo To: Dan Carpenter Cc: nsaenz@kernel.org, gregkh@linuxfoundation.org, arnd@arndb.de, phil@raspberrypi.com, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: staging: vc04_services: Need suggestions on trying to fix sparse warning in vchiq_arm.c Message-ID: <20210602145000.GA3999@ojas> References: <20210601200513.GA10204@ojas> <20210601202307.GC1955@kadam> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210601202307.GC1955@kadam> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_075114_576553_F5F05BE1 X-CRM114-Status: GOOD ( 21.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 01, 2021 at 11:23:07PM +0300, Dan Carpenter wrote: > The problem is not the Sparse warning, the problem is that this code is > a mess. It used to very clearly buggy and I reported the bug. I think > Arnd found the bug again independently and fixed it. > > A couple weeks ago Al Viro looked at this code. Here is his write up: > > https://www.spinics.net/lists/kernel/msg3952745.html > > It shouldn't take Al Viro dozens of pages of detailed analysis to try > figure out if the code is safe or not. Your idea silences the warning > but would make the code even more subtle and complicated. > > The right thing to do is to re-write the code to be simpler. > > regards, > dan carpenter > Thank you for the prompt reply and the link, it was very insightful. You are right, I was definitely going about this the wrong way and missing the larger picture. I'll spend some time trying to understand this codebase as I think that'd be a good start to understand how stuff works in the kernel (even though some of the things in this driver are anti patterns) and hopefully get some ideas on ways to clean this up. Anyways, thanks again for the help, cheers! Ojaswin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel