Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp57767lqt; Thu, 18 Apr 2024 08:21:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7woo0IjcJ+fwk+Hg88cdK2iJN+P7/6r6y8bqk1+xgyqB1RXIp6i7c8KpfNdFGNzAHE2GYGEFAQ8gmULBVBh7tf3J/YJ7b+QgbnY/lGw== X-Google-Smtp-Source: AGHT+IHJ7DV9WzcHkfG8jW3pYIt6H/h/mQ8x0bJ9RYSDj4hKdvSu6UFVTQWBpXiBAd+tuZzWeJWI X-Received: by 2002:a05:6a00:2448:b0:6ed:4a97:26c1 with SMTP id d8-20020a056a00244800b006ed4a9726c1mr3709286pfj.10.1713453704156; Thu, 18 Apr 2024 08:21:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713453704; cv=pass; d=google.com; s=arc-20160816; b=zwvL9kjqpgG3Plp6A1/0IvPL4MaC4mo+Y6jheXnaGV0AN4GyUdZx5/p53Z80JGIiz8 wp/u4kAUC0pzPIpPPARl0MJ/ICEoQaJ6AB/A6NvlrCns+3FUc4MEuOApDHFThMGc6JtM Wx3Ny1NlW8q5MIqL5WHI86DEyVvzgeClT5gkAJ/Qz/WWDk93NdqWCKpjND13n4Yd6j2f vrT4Jt4QsslKfzn860swXXwviRKCRJ+9RU/ybSMW6duwPWNAiQJAOfwS7qCfoTQVg/lG jEPGteInuDxXSM5xWC/XOMnfHA6ya36OwG137Gp0heTVmJq5TODU1cZLdB6p7piMiPWk +wFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=oMqAEiiN7av4J6wM+O4afdcaiaOjYq8V1FKf5PLPclI=; fh=FWnTgfo58g68YAu6Xf8GgWn+HZmsQolW3hpFJHb3LF4=; b=ltXQPt79G7xk67r8EOI8+ZTb8eAIwUq7wz6x5xRuTGD3zQGw6mQCayXZy5iEX/ye0Z xqTklMCocpE+H6VW7Su4LhuIJjn9/FaIqFjamq1hSQ+6UDBPS2UM+mvA4r27uFlFRKXa EZEcopYfD1MmWjyEASWwlEfXnqNCJ3DpeDF8q2jCBppe54C3gedswKMF7GkJfOoN4ZS4 BUpXsIn+7tFRdoc63OH19pZESrrOHLLvqEwHTfq2dAayZy9s+1Vm6eoSBh/nzu2bzRc/ Imh4rvwQJFOghecIV58oVEuQJgGEcg8iFdQ8f7uut8p9t8vWG0/7ehh+2kM6nJrvk5H8 iaSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k3zhLfRT; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-150340-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150340-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ln15-20020a056a003ccf00b006e65d654afbsi1697488pfb.32.2024.04.18.08.21.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 08:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150340-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k3zhLfRT; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-150340-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150340-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 598B5B23C43 for ; Thu, 18 Apr 2024 14:52:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CE4916ABC5; Thu, 18 Apr 2024 14:51:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="k3zhLfRT" Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5406168B1A for ; Thu, 18 Apr 2024 14:51:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713451909; cv=none; b=EY3BwY6RKh7khWMilAHunv/i/82ZHmVTCAusntevXYQmCTMk9E8QAEnFU4Vcg6sAP62aBIKo1pFsLPUru+tOMvN1qXe1TG9NqIKaelZf1b/TWLbVWMxP2apt6AZ92riRxly6aJ2h8T5AcG+IAKI4wJ8BtCZP69JkShtmw4ws02Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713451909; c=relaxed/simple; bh=CbuQk1PghdDnmrxhojCwmpRorta2iCVuoxXGBVbnZE0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=momO8sLeaF5P6IlixvAPyZBcz8Fm6ZO9gIuPuQrZX4oiatM6eZPg3tPmTo+sTEspCe5zFQepMurHhvflIiI8z48dxV1QZXsrqToAxk42VHOX1QOnvSEUM79JvQP9cMvESjS0x7w8P1Sj30iriPochTvynoqXzMMWdPmA5ij8p18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=k3zhLfRT; arc=none smtp.client-ip=209.85.217.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-vs1-f48.google.com with SMTP id ada2fe7eead31-479ccc89792so488328137.0 for ; Thu, 18 Apr 2024 07:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713451907; x=1714056707; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oMqAEiiN7av4J6wM+O4afdcaiaOjYq8V1FKf5PLPclI=; b=k3zhLfRTZ3CUo37HntuQozk+xsQqNFpS0d69qYWfIOHdrvxsMtFir1VCDP6bVMqez+ mIalxl6VkRGjmqEjJeAUI/qc6uOILh5PJ4jvabr+nlVuXQsmGLtUdwGoW/nYaCLYREUn Uiou1n+7/u+1aoNa3nV6zhQy9/xnV+DTz7SKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713451907; x=1714056707; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oMqAEiiN7av4J6wM+O4afdcaiaOjYq8V1FKf5PLPclI=; b=usWG7+HsCHAxacIJOm457i8+9pt20lpXZ91AZfDgr1CVJfH9/qUeSA3pyGt8w0UUuI JZ0MvDikZVCL1otVD0OLI67OMHQNfTvxxYtyssW1AZWx7hui9nTHAhInd4Sw5MAeNbhY RRLu5EM/PL4J/WHgz9Knws++Kn7CLBKUxMi5mLi0HCGEaGKXLzGH+VnzXXi7xbrKocPx od9dghVxFWyzw6nTqmcusqgCSPQxLvp7t4bctHhDujnHxyiHAZxD4qV1rd22Am1W2fJQ nFbqfxnE92/8rBBPuRUwgfRWQnjn3joBoQrNPuHl/sNbHI58wFNtyedMPFblJsk36CA2 9sbQ== X-Forwarded-Encrypted: i=1; AJvYcCURc40+LgR1sUcXxHvQ3DRCaak1xa3KVUY7eaVwegIrNUOS/OoL2xD/MzZT5hRYVKMXmgN+VsZQBILsDMTRwG9cUhuDrfeEnx709/dn X-Gm-Message-State: AOJu0YxkJiECzkNExvGrQXNRJAQn92J3F14yvuFQ+m2hDU94zdauupIy FhQoilGmkc3bXXaFNSVo9cKaa66VrmIDtfVRva9yyUvIeUSfMRvh1Ea2B67H+Ud2SDJQNvrg6iM = X-Received: by 2002:a67:b404:0:b0:47b:bda4:c30d with SMTP id x4-20020a67b404000000b0047bbda4c30dmr2036972vsl.3.1713451906742; Thu, 18 Apr 2024 07:51:46 -0700 (PDT) Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com. [209.85.221.182]) by smtp.gmail.com with ESMTPSA id j18-20020a0561023e1200b0047a1f4aa6d9sm224720vsv.27.2024.04.18.07.51.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Apr 2024 07:51:46 -0700 (PDT) Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-4dad4b35d08so1207392e0c.0 for ; Thu, 18 Apr 2024 07:51:46 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWIdw6MDPJ0htB8rjPBjHWQrX60jAH0UPqBac1YpdgN8Ag09P7uUbjYEoaf0PTAHIM3OvhZzx9hoaXfcNRixpx+aFoewkh1wY45NCgz X-Received: by 2002:a05:6214:4a5b:b0:6a0:4571:e0c8 with SMTP id ph27-20020a0562144a5b00b006a04571e0c8mr3999896qvb.18.1713451882078; Thu, 18 Apr 2024 07:51:22 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240415-fix-cocci-v1-0-477afb23728b@chromium.org> <20240417155112.GQ12561@pendragon.ideasonboard.com> <20240418105310.GV12561@pendragon.ideasonboard.com> In-Reply-To: <20240418105310.GV12561@pendragon.ideasonboard.com> From: Ricardo Ribalda Date: Thu, 18 Apr 2024 16:51:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/35] media: Fix coccinelle warning/errors To: Laurent Pinchart Cc: Dan Carpenter , Martin Tuma , Mauro Carvalho Chehab , Hans Verkuil , Hugues Fruchet , Alain Volmat , Maxime Coquelin , Alexandre Torgue , Paul Kocialkowski , Greg Kroah-Hartman , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Matthias Brugger , AngeloGioacchino Del Regno , Hans Verkuil , Sergey Kozlov , Abylay Ospan , Ezequiel Garcia , Dmitry Osipenko , Stanimir Varbanov , Vikash Garodia , "Bryan O'Donoghue" , Bjorn Andersson , Konrad Dybcio , Benjamin Mugnier , Sylvain Petinot , Jacopo Mondi , Kieran Bingham , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Pavel Machek , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Oleg Drokin Content-Type: text/plain; charset="UTF-8" Hi Laurent On Thu, 18 Apr 2024 at 12:53, Laurent Pinchart wrote: > > Hi Ricardo, > > On Wed, Apr 17, 2024 at 06:19:14PM +0200, Ricardo Ribalda wrote: > > On Wed, 17 Apr 2024 at 17:51, Laurent Pinchart wrote: > > > On Tue, Apr 16, 2024 at 11:47:17AM +0300, Dan Carpenter wrote: > > > > In my opinion, it's better to just ignore old warnings. > > > > > > I agree. Whatever checkers we enable, whatever code we test, there will > > > always be false positives. A CI system needs to be able to ignore those > > > false positives and only warn about new issues. > > > > We already have support for that: > > https://gitlab.freedesktop.org/linux-media/media-ci/-/tree/main/testdata/static?ref_type=heads > > Those are manually written filters. Would it be possible to reduce the > manual step to flagging something as a false positive, and have a > machine build the filters ? > Do you expect that the list of exceptions will grow? I hope that once the CI is in place we will fix the warnings before they land in the tree. > > But it would be great if those lists were as small as possible: > > > > - If we have a lot of warnings, two error messages can be combined and > > will scape the filters > > eg: > > print(AAAA); > > print(BBBB); > > > AABBBAAB > > > > - The filters might hide new errors if they are too broad > > > > > > Most of the patches in this series are simple and make a nicer code: > > Eg the non return minmax() , > > Other patches show real integer overflows. > > > > Now that the patches are ready, let's bite the bullet and try to > > reduce our technical debt. > > > > > > When code is new the warnings are going to be mostly correct. The > > > > original author is there and knows what the code does. Someone has > > > > the hardware ready to test any changes. High value, low burden. > > > > > > > > When the code is old only the false positives are left. No one is > > > > testing the code. It's low value, high burden. > > > > > > > > Plus it puts static checker authors in a difficult place because now > > > > people have to work around our mistakes. It creates animosity. > > > > > > > > Now we have to hold ourselves to a much higher standard for false > > > > positives. It sounds like I'm complaining and lazy, right? But Oleg > > > > Drokin has told me previously that I spend too much time trying to > > > > silence false positives instead of working on new code. He's has a > > > > point which is that actually we have limited amount of time and we have > > > > to make choices about what's the most useful thing we can do. > > > > > > > > So what I do and what the zero day bot does is we look at warnings one > > > > time and we re-review old warnings whenever a file is changed. > > > > > > > > Kernel developers are very good at addressing static checker warnings > > > > and fixing the real issues... People sometimes ask me to create a > > > > database of warnings which I have reviewed but the answer is that > > > > anything old can be ignored. As I write this, I've had a thought that > > > > instead of a database of false positives maybe we should record a > > > > database of real bugs to ensure that the fixes for anything real is > > > > applied. > > -- > Regards, > > Laurent Pinchart -- Ricardo Ribalda