From patchwork Mon Jan 19 11:31:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 25849 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0CD1CC32E7 for ; Mon, 19 Jan 2026 11:31:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6A16B61FC5; Mon, 19 Jan 2026 12:31:13 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="arMcvaY5"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 62EE561FBF for ; Mon, 19 Jan 2026 12:31:08 +0100 (CET) Received: from pb-laptop.local (185.221.143.114.nat.pool.zt.hu [185.221.143.114]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 24FE4C7B for ; Mon, 19 Jan 2026 12:30:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768822238; bh=SciAsgSRkrmF8HdcmTNvyPv/RmUR13NN79Xl5+b+6xQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=arMcvaY5cHk6Ux/2G9rQSi2PTH9WpMWVu5RwbBMF5JtoBxr+L/Eli2F+A8f/TYBh6 CtkBxfgD8SkL8Rn4lMMC+51waBicgOD08+5DUdwgd5DN4pyNXu01TKN/WD1j/SKJfD F2jCvKdTVQU6j8nSGeFjRDETJM9cy5LZJHVeOMBo= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 4/5] libcamera: base: log: Remove `LogInvalid` check Date: Mon, 19 Jan 2026 12:31:02 +0100 Message-ID: <20260119113104.3560802-5-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119113104.3560802-1-barnabas.pocze@ideasonboard.com> References: <20260119113104.3560802-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" A `LogMessage` instance cannot be moved or copied, so a severity of `LogInvalid` is only possible if the message was constructed with that log level explicitly. However, being a completely internal type, this does not occur. So remove the check. And even if it does, it's probably still better to print the message than to drop it silently. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/base/log.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index da45b0d65..7d308afae 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -857,10 +857,6 @@ LogMessage::LogMessage(const char *fileName, unsigned int line, LogMessage::~LogMessage() { - /* Don't print anything if we have been moved to another LogMessage. */ - if (severity_ == LogInvalid) - return; - Logger *logger = Logger::instance(); if (!logger) return;