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 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 0E813C47082 for ; Sat, 5 Jun 2021 07:25:41 +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 C13036121D for ; Sat, 5 Jun 2021 07:25:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C13036121D 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=ocRMHu1XV3GayZC+1IDUeMhYP63AXX8QlF8Hhyt8qNs=; b=HSalmz3EjRWtcS miuDyiYG8wMXY1tOp+KgOvUyDqfmX2gl7Uju3Mw4luD19FWxXD3Wmk0SYHIW4IpgvQS/XKWcayDYl 9J1ctvjI5L1Nhh3I3JsX1gP7mZFv1XoDJnM0xwGRzGDPVrfKgClsUJJPA+o3+TKQ41Y4GtxcjQub8 FYxKh/l4m/464UaeILgCDIMG9ShLhEm+/KC9qLICZ898HzQWvG/fKLPAnB0DX19jzG4n2uTWl4GUJ 5OQElB+HYF4flu9bRx25sSe36KX5wTxmzS4CI5vRcHVdAdckVYzcIzLVZHeW7j0l5YWWR780DpOAu M/ncR8SQBHxuwDHVerjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpQeu-00GCaL-Ce; Sat, 05 Jun 2021 07:23:52 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpQeo-00GCZb-3B for linux-arm-kernel@lists.infradead.org; Sat, 05 Jun 2021 07:23:50 +0000 Received: by mail-pg1-x536.google.com with SMTP id i34so3220508pgl.9 for ; Sat, 05 Jun 2021 00:23:44 -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=fawb/pwqGsJ5FMKKdxYazd2mveTwll19w8a6+VcdOS0=; b=GAEoodR+hwXO9l89L0Vp8JQN9nbRvTA9z7tPg7WtdQ/5Vyn+NBSVJP71IwJ3qOSJ1T WOLUGWSIaHJblAUVdtX3n2YCvXJv+8uwhSZr42S7wHsQa1kvvOsKj3TABxCOtutN3R0t YOQd7BD/XKE1RQeNtl6WasxfbMDyexo5YhSggwSSxoxDdE/OaxYY1JCX6TURVDmFi/Hu FXponlt9vqYD+1VzMJrsD2YDlz5jCx0kg1sDOjpGfHQAE1Gvbw61JOGcqkOfD26yMjJ+ 5eOO+AGhcbRAOM0LEnEBsN2QzQ9N+7CiwHUDZ0oizbzwx3sX/r9J5ZnF4AYICVOGdmkA OJ/Q== 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=fawb/pwqGsJ5FMKKdxYazd2mveTwll19w8a6+VcdOS0=; b=Fwasr0uQLstDYY7YyDmKa9vbJUy4fz3/S1puhZtmyg87px2LKlq4816Ar+WoJfhCUz F9weRIytMDPBAH1biIt5j1pt3Z7vx+SrvfV2BTERuLBzV5JV8WqeCW+uiMVwR4clsqRz XQ4PQ0xsj3QVbyusayMO625QnwSY8PSrzAI6vTnFRNQ8CMf8eO9XkiwK4DIUQFCGhKhZ T7xRVcwfP43Ir1/xsmK7MAd9FZCzrjol/W/WftC630N16n78vjU5hrXq8/hyjzkmC9Zj wAY0o3cTGJBC+YtGWvj+cQIEEQOU/MTxttDO/uNCR7XvhwjQ0WgRrabyNC9WAbIN/dyL kXog== X-Gm-Message-State: AOAM531JE3coScK031emuak402gY2vX0+2ib1jI5zCS3loYCqMjJgyju tw0cUl/8/GF+9LpTa6282DE= X-Google-Smtp-Source: ABdhPJwn2HVKvWOZVOc5ZHpICAPkc4mthNo+45OKnUAHXiOdJ9datqPrG+O+2HTopNeXFK432GxHHQ== X-Received: by 2002:a05:6a00:ac9:b029:2de:a06d:a52f with SMTP id c9-20020a056a000ac9b02902dea06da52fmr8452051pfl.4.1622877823707; Sat, 05 Jun 2021 00:23:43 -0700 (PDT) Received: from ojas ([182.69.197.102]) by smtp.gmail.com with ESMTPSA id b8sm3002673pfo.64.2021.06.05.00.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Jun 2021 00:23:43 -0700 (PDT) Date: Sat, 5 Jun 2021 12:53:31 +0530 From: Ojaswin Mujoo To: Stefan Wahren Cc: Dan Carpenter , 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: <20210605072249.GA5967@ojas> References: <20210601200513.GA10204@ojas> <20210601202307.GC1955@kadam> <20210602145000.GA3999@ojas> <9ba341f7-17fc-980d-a7a0-2293c75dcf92@i2se.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9ba341f7-17fc-980d-a7a0-2293c75dcf92@i2se.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210605_002346_165843_AB02C327 X-CRM114-Status: GOOD ( 35.08 ) 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 Fri, Jun 04, 2021 at 08:13:06AM +0200, Stefan Wahren wrote: > Hi Ojaswin, > > Am 02.06.21 um 16:50 schrieb Ojaswin Mujoo: > > 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! > > thanks for your interest in cleaning this up. Yes, it's not clear which > points on the TODO list are the lower hanging fruits. In case you don't > want to fix checkpatch issues, maybe you can look at points 8, 9, 10, 12 > and 13. Most of them require testing with a Raspberry Pi, but feel free > to ask if you have problems with it. > > Regards > Stefan > Got it, Task 10 (cdev to its own file) seems like a pretty good task to get started with. I'm planning to buy a Rpi 4 so I think I can run tests on that. Thank you so much for the help, I'll get back incase I face any issues down the line. Regards, Ojaswin > > > > Ojaswin > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel