From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (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 A4A1B383C9F for ; Tue, 2 Jun 2026 20:49:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780433374; cv=none; b=aDPR1JsspqwVsBM0a5OHU7nm0MjYqt8JJHp505+69+LEkgQNs4C33DS7kBUuGfJxuJwuvjZg9DLGiK+k7AzDW/JDWFaTL8NKTobmDRBJAFfg80dSQ0/ARY7uX+3y3XlTWhOCueIHYZn3HSUciZEGVRrDKGcJKrHnADUrJnaC3VU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780433374; c=relaxed/simple; bh=SSjM/41cdaJcwa5KJDd/lylcZRO73Asc+WntgS91QDg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dIlawoaRgpeRdrOgk9Oz/+LkpjR6DodFzymXYVHmzs0edznoOWw2ZFtdZZYSAlpmFHjAJ75V9ZEgKK8XGphEEPP0AFuW2rOk4g6KD+5TsHAOXZqedxWAju1nwJ99e3kFXT3MQ5kvG7LTq1kzZyMQ9JcvcWyQOvpM7CKKZSDHOgc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UNH5PWnI; arc=none smtp.client-ip=209.85.210.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UNH5PWnI" Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-7e6cdd78fe6so970354a34.2 for ; Tue, 02 Jun 2026 13:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780433372; x=1781038172; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=NKw3hIWRjVZW+uZHVG4NZBRGHQ2bV/RpfcwyBVfNs6I=; b=UNH5PWnIWFyT8HCGlYBbFiwdu6i9CCFSCHHFKm9TqM+LbkePWhnqWpXdETkbitK1Vo ly73SvfH6nIVocgSv4EeeUMW+HIcrZEvNiQqf3BUzWoYDIq0i0sbTOtRGP+aQgaocifR c+jCrD5m6ciLWcapxH5MpCBM/gVD5mgM0a5LQ2NjcQqOVJ6aa0StQcitPAQS81jFKR8K YaBhzZM5YEyn92ovut5vGvzwWf6xrZrhWCdakRR6eVP6gtS//nGOcTNv6m0lZIEz1/H1 seHvqV7W+LSP/A4fsne5Y58O50qCyWoet0QGPUvNfngjV1XlNkechuskofm0NBf2GaXF /Ihw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780433372; x=1781038172; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NKw3hIWRjVZW+uZHVG4NZBRGHQ2bV/RpfcwyBVfNs6I=; b=s2J6FRTVymz2w1f88IG1lJVTpkGe4A0LIlJiKA5qqtyXbNYz812BwgD27XrLXEChYI dWdHL+4oHFHjcKfALnqyD5X6kR1guZuzJMdEK0bTqyOiWwTudcPwLczdGJOVoc3DRyvD yP/9xzRRf/QyvDjP6CK5YE8c5R7Bnjzqa77n467s9rYgxTo7TYyquK3vbVeRRv4wtztI Ptl5klKrcXYUf/r/paJVfn26OZmCbKUErexlcwDXPfViyOGtRLhARjM/3vpytlbqOOcr 4ACVnl0J3Kvf0ye5zz4nM8irlUPhugHIIgJnak0qOIZe6Do8eBjPojScEL913egc9K2+ 8Gdw== X-Gm-Message-State: AOJu0YwFmAwKpDuMl2NnJvDLyAEMZat1VKEr77Dr5yaoqN/kmn3E2e7N dv0GDNej+MJk/5ioH8Vi1ZbsHGcGrV+wxDzY6rsoxpY234TlqrM+KDdj67uHinFZXXI= X-Gm-Gg: Acq92OFEnObRnC9sWInYbCXB+spP7nP+A/KRBVvA1dI9tbsY/RSDEl4Eeh1sSgOnAfm Twrbt4FfxgcacfSvpL0jsA/WsoFAkL7uRZvJWA0lnYJExECjG4oaBTQoiHTxpiaymh8ZaMUiCTX bsuu5UNGJIPKoX8dvYsgK9sFgskiUbZWkLFxErITQvjF9uvlDprcl++DkrEZEHllvrkkjxYza7W ScfmlS2H4gN6qFsgZghO9ixK4MgzxuDY1lsVSV0G2L4x7SdzVgYlcVE5Vb3rCS58mloklFEXk5e TzpHB2YrKnDdXmJr/Xezn4WUD/b/fghSWl9NTEyMAk+v/JgHnfeLwR19LozOFa0pnAwh4cdfwNA v4KtdoGTDvz0paFwIvMMjVYFTVTALsULbLMU6dtPi+XxBP2O3aPqd4MpUVK4acMKBIaB3nGYWsS fY/uzqnmYf28xO9ha+49Vd6txGUw0kgqLiMdqKQ4mKPXy5gHIoO1E30c9r4O0sDPo= X-Received: by 2002:a05:6830:3981:b0:7d9:f50f:968a with SMTP id 46e09a7af769-7e6e9497246mr152181a34.5.1780433372630; Tue, 02 Jun 2026 13:49:32 -0700 (PDT) Received: from linuxescape (23-88-128-2.fttp.usinternet.com. [23.88.128.2]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7e6e746a50bsm341821a34.2.2026.06.02.13.49.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 13:49:32 -0700 (PDT) Date: Tue, 2 Jun 2026 15:49:30 -0500 From: Maxwell Doose To: Peter Rosin Cc: open list Subject: Re: [PATCH v3] mux: core: Replace manual put_device() with __free(put_device) Message-ID: <20260602154930.30265351@linuxescape> In-Reply-To: References: <20260602164407.343565-1-m32285159@gmail.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 2 Jun 2026 22:37:06 +0200 Peter Rosin wrote: > On 2026-06-02 18:44, Maxwell Doose wrote: > > The current code for returning on failure in mux_get() uses manual > > put_device() calls. Refactor and replace them with a new variable for > > the pointer to the underlying device and __free(put_device). > > I hinted at it in the reply to v1, and seeing it confirms it methinks. > For me, __free() works well for RAII, but the pattern here isn't RAII. > Acquisition happened before init and the scope of the variable isn't > the lifetime either. It feels a bit clumsy. So, this patch is not a > clear improvement and therefore not worth it. Sorry. > > Cheers, > Peter > That's fair. Have a good night though! -- best regards, max