Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp739922lqb; Wed, 17 Apr 2024 09:20:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVWikNa9AKmzvSBHWZCIFTJIeHA465j/U84XrkpMUVb/DNr4r1EWQmlEU3SyWlwPPwnojG7M6c1F6L+rFI1ygrq1ocKJgBPUZmTuE8s4g== X-Google-Smtp-Source: AGHT+IGKGQfB0/GGJSGtdA7IHt13DV4FkUXDM30pDXv/+ImjjtTEfvNrR4WgjS34Zv2sGbV5hSkp X-Received: by 2002:a17:903:41cc:b0:1e3:e1c4:eaf3 with SMTP id u12-20020a17090341cc00b001e3e1c4eaf3mr17535128ple.43.1713370838869; Wed, 17 Apr 2024 09:20:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713370838; cv=pass; d=google.com; s=arc-20160816; b=ABR15ZPuvmBXVL1hVSImhpk0o5CqiFbFNRtuPKSRLjJogWW2po8OFFZECE9do7I8gJ HSYYNG5zYI1m/JR/MaX4Nm3U7c8Ckp/+EBbi5PaM2ppXrF99dJnKhZxNNrgtt+LQ2VJD /1aPNc9kZWXHA6/iKgF+BrXc5Q+JPYuRpiaZCME+TuOMZ2WiJZv8ayYupxT5G6jVH6yo DxWuDwZj94YYE0Zh6NPd/zYLbeHdqSAABCV6AIWN67DUz+MJfYuR9Lm8/mOUle0vnsKy 0r/tAfwW2iU8I+07imck6TszBBSEHaUxYuYatCkjx9nwt2Jc8DJKaRdo41b6qnyIscmE zw8A== 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=taaoAprv/l78nPfrpJUaaECkLiisEqHYV1iSW1K7qDE=; fh=1tNXlTOQr7TjxrYnsyWUzvmlQW9h6RRuGEHxbHCMZ4Y=; b=Jr/emBID+AoHwWyPeC1emHA+O48+SZ9tPwc0hin8Ks+KqvJJotEGIaQiGXC9HEGaL0 P4myv9Z2rCxkCIjG50t4vmWNBDWZjVTRsBAo8/PXra+FDp/Hi8HePEEu0d7JJKE9BEhp HbkxqauKrNu0NARIz3XWwG8ygLT5xNyt7opWz63m0BLViuaCMrHY7fxTS/eiyyPXokoc oVrqTJ11mWRE+fJIBLzyKG2oD94ITlTPrsEZ7jbQozdKZ6hXJamQJ3UrTISKy2srQwgB n4k3RE5M+pNgSev5imQIb5df2SzdRsQGwOqKil+ueU+lsyW6ox6ILbLURp9bbAuljyCV K+SQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kyvqRE83; 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-148896-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148896-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u9-20020a170903124900b001e832ed6fc0si1116876plh.606.2024.04.17.09.20.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 09:20:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148896-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kyvqRE83; 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-148896-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148896-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7FE62280E0D for ; Wed, 17 Apr 2024 16:20:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7BEA15CD5C; Wed, 17 Apr 2024 16:19:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="kyvqRE83" Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.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 3A44315252D for ; Wed, 17 Apr 2024 16:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713370794; cv=none; b=ccVUs89xmtEncj4LRgqw/DX4fsLZ6N/Yn5OzZ78yWLAe4xnOYUNDgmNKiARVdiuZ3bkEr5nFPc92CRWM0Wr+zxMo7GY5T0XT2L8mBqfI21gCloHl+8T0hJNQom2giaE21jIjoU+/v1v2MMoG4yIIRXVaBzIVDzPIoUEByO2VGVI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713370794; c=relaxed/simple; bh=fPxUcbghkVzBBb3O5m3J0h86wBDuD+Z0gMmR/qCLOwk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=g9ed+pDc/sSsn0MCITbyELl4aKK4DxWvBzGIJWH7KIRoZUaZeYrKSCCEgJ+Bsdu0O3I4QMuM68orl96WnBopeRgfzLCvsTBRGdpj1acGfpl7Aaa5F7B7/6lyiugHYOwXUb/EDAkRfom0xg3GAnPVChd8xED6OvPozz5zSGCCV+Q= 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=kyvqRE83; arc=none smtp.client-ip=209.85.210.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-ot1-f48.google.com with SMTP id 46e09a7af769-6e9e1a52b74so1049057a34.0 for ; Wed, 17 Apr 2024 09:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713370792; x=1713975592; 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=taaoAprv/l78nPfrpJUaaECkLiisEqHYV1iSW1K7qDE=; b=kyvqRE83DW4jAyKNfayG2hBT3z+nH1qZs1oP1n+kltCurhL2NfeAEckvUuK7unt4f/ XuagkCAz8n/m8G547BGhV41hpsi7jbKWFcOpGfXbknjWmE6RJMkZ9dl4+1RmU609Nj+p 1FR4Sx86c6qNqeacFuCymCdX6AbICCdCikcNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713370792; x=1713975592; 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=taaoAprv/l78nPfrpJUaaECkLiisEqHYV1iSW1K7qDE=; b=QHVZl6u2NITAqKuxK/p2qoKCNq755HGp4u1iRDj3U0DTKQMNw6lXg8w1Vou9Ni1pxP Hhc+AT5w6gNAxvubwfDAKvOtgFtEaJ2xJ+ooeNXQz6gI4LmSuTWwcvmaaZY8RZsHynsI scU7RC6UKwG1y9oDVze6WDb7wy/tvmEwLbvKUF0sCFUWXcS5n+hMyWfIpsXGkIUeJGw/ CUQnE4SoZTWKhZncKspUqtHHiKwgmevNzVbM1mQ8S3OAM/YxOhN/OX7wHAEMi2chF+ZY B/SpKQg2l1Zdf5h4xsXAobVvwQOmgXS6Rv/uuf79BrHrg0fvH7xy9qecMHzpNR9v6c37 1LHQ== X-Forwarded-Encrypted: i=1; AJvYcCU986wyJTeF0Me91meS6pgD8XQ9djBpXkqe3dwLRxWtroLQSE33Y/itsfv1UrgwSsBgVpS8pmHxmwH3QQhL/1iKuQSwsStVTTzQFX8u X-Gm-Message-State: AOJu0YxNof196y59Dt1byjhElohWilhBY04pjGj3OHBamr07n2jn3K+1 tl9rGLmW0E97S/6/emWDAZL4dxeWekNtdxUpcoMj7+WUSNuvj68hA5EZoMsqBbekbW+g+Q8Z4BY l2A== X-Received: by 2002:aca:2806:0:b0:3c7:2efe:3ae with SMTP id 6-20020aca2806000000b003c72efe03aemr2412956oix.40.1713370792205; Wed, 17 Apr 2024 09:19:52 -0700 (PDT) Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com. [209.85.210.45]) by smtp.gmail.com with ESMTPSA id ck20-20020a056808251400b003c5db0dabb7sm2464998oib.40.2024.04.17.09.19.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Apr 2024 09:19:51 -0700 (PDT) Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-6eb6b9e1808so2499446a34.3 for ; Wed, 17 Apr 2024 09:19:51 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVyxPB8LM5/rBIjQmRgWWx32q9Kw6A1USNiuS0rTjlz+A08I4RV5nU7TvMFb4hZdoPb4hdMci14NPXmYAYSksw/XlE+l7LPJ58zYvch X-Received: by 2002:ad4:4f23:0:b0:69b:5445:6ab0 with SMTP id fc3-20020ad44f23000000b0069b54456ab0mr19079283qvb.46.1713370770447; Wed, 17 Apr 2024 09:19:30 -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> In-Reply-To: <20240417155112.GQ12561@pendragon.ideasonboard.com> From: Ricardo Ribalda Date: Wed, 17 Apr 2024 18:19:14 +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 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 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. Regards! > > > 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